From dac86ef857efa234026d6c53617c36ace2ab421c Mon Sep 17 00:00:00 2001 From: appflowy Date: Thu, 13 Jan 2022 11:16:26 +0800 Subject: [PATCH] refactor flowy-core pb --- .../lib/user/presentation/welcome_screen.dart | 2 +- .../workspace/application/app/app_bloc.dart | 4 +- .../workspace/application/doc/doc_bloc.dart | 4 +- .../workspace/application/doc/share_bloc.dart | 4 +- .../workspace/application/menu/menu_bloc.dart | 2 +- .../application/menu/menu_user_bloc.dart | 2 +- .../application/trash/trash_bloc.dart | 2 +- .../workspace/application/view/view_bloc.dart | 2 +- .../application/workspace/welcome_bloc.dart | 2 +- .../lib/workspace/domain/i_trash.dart | 2 +- .../lib/workspace/domain/i_user.dart | 2 +- .../lib/workspace/domain/i_view.dart | 2 +- .../app_flowy/lib/workspace/domain/image.dart | 2 +- .../lib/workspace/domain/view_ext.dart | 2 +- .../infrastructure/deps_resolver.dart | 4 +- .../workspace/infrastructure/i_app_impl.dart | 2 +- .../infrastructure/i_trash_impl.dart | 2 +- .../workspace/infrastructure/i_user_impl.dart | 6 +- .../workspace/infrastructure/i_view_impl.dart | 2 +- .../infrastructure/i_workspace_impl.dart | 2 +- .../infrastructure/repos/app_repo.dart | 6 +- .../infrastructure/repos/doc_repo.dart | 2 +- .../infrastructure/repos/trash_repo.dart | 4 +- .../infrastructure/repos/user_repo.dart | 3 +- .../infrastructure/repos/view_repo.dart | 6 +- .../infrastructure/repos/workspace_repo.dart | 7 +- .../presentation/stack_page/doc/doc_page.dart | 2 +- .../stack_page/doc/doc_stack_page.dart | 4 +- .../stack_page/trash/widget/trash_cell.dart | 2 +- .../presentation/widgets/home_top_bar.dart | 3 +- .../presentation/widgets/menu/menu.dart | 4 +- .../menu/widget/app/header/add_button.dart | 2 +- .../menu/widget/app/header/header.dart | 2 +- .../widgets/menu/widget/app/menu_app.dart | 4 +- .../widgets/menu/widget/app/section/item.dart | 2 +- .../menu/widget/app/section/section.dart | 2 +- .../{app_create.pb.dart => app.pb.dart} | 626 +++- ...{app_query.pbenum.dart => app.pbenum.dart} | 2 +- ...app_create.pbjson.dart => app.pbjson.dart} | 100 +- ...export.pbserver.dart => app.pbserver.dart} | 4 +- .../flowy-core-data-model/app_query.pb.dart | 99 - .../app_query.pbjson.dart | 30 - .../flowy-core-data-model/app_update.pb.dart | 327 -- .../app_update.pbenum.dart | 7 - .../app_update.pbjson.dart | 50 - .../flowy-core-data-model/protobuf.dart | 17 +- .../{export.pb.dart => share.pb.dart} | 6 +- .../{export.pbenum.dart => share.pbenum.dart} | 2 +- .../{export.pbjson.dart => share.pbjson.dart} | 2 +- ...uery.pbserver.dart => share.pbserver.dart} | 4 +- .../{trash_create.pb.dart => trash.pb.dart} | 6 +- ...h_create.pbenum.dart => trash.pbenum.dart} | 2 +- ...h_create.pbjson.dart => trash.pbjson.dart} | 2 +- ...date.pbserver.dart => trash.pbserver.dart} | 4 +- .../trash_create.pbserver.dart | 9 - .../{view_create.pb.dart => view.pb.dart} | 699 +++- ...ew_create.pbenum.dart => view.pbenum.dart} | 2 +- ...ew_create.pbjson.dart => view.pbjson.dart} | 108 +- ...reate.pbserver.dart => view.pbserver.dart} | 4 +- .../view_create.pbserver.dart | 9 - .../flowy-core-data-model/view_query.pb.dart | 140 - .../view_query.pbenum.dart | 7 - .../view_query.pbjson.dart | 40 - .../view_query.pbserver.dart | 9 - .../flowy-core-data-model/view_update.pb.dart | 267 -- .../view_update.pbenum.dart | 7 - .../view_update.pbjson.dart | 46 - .../view_update.pbserver.dart | 9 - .../flowy-core-data-model/workspace.pb.dart | 697 ++++ ...eate.pbenum.dart => workspace.pbenum.dart} | 2 +- .../workspace.pbjson.dart | 129 + .../workspace.pbserver.dart | 9 + .../workspace_create.pb.dart | 296 -- .../workspace_create.pbenum.dart | 7 - .../workspace_create.pbjson.dart | 57 - .../workspace_create.pbserver.dart | 9 - .../workspace_query.pb.dart | 131 - .../workspace_query.pbenum.dart | 7 - .../workspace_query.pbjson.dart | 36 - .../workspace_query.pbserver.dart | 9 - .../workspace_setting.pb.dart | 92 - .../workspace_setting.pbenum.dart | 7 - .../workspace_setting.pbjson.dart | 24 - .../workspace_setting.pbserver.dart | 9 - .../workspace_update.pb.dart | 213 -- .../workspace_update.pbenum.dart | 7 - .../workspace_update.pbjson.dart | 42 - .../workspace_update.pbserver.dart | 9 - ...able.pb.dart => dart_notification.pb.dart} | 4 +- ...num.dart => dart_notification.pbenum.dart} | 2 +- ...son.dart => dart_notification.pbjson.dart} | 2 +- .../dart_notification.pbserver.dart | 9 + .../flowy-core/observable.pbserver.dart | 9 - .../lib/protobuf/flowy-core/protobuf.dart | 2 +- .../flowy-document/observable.pbenum.dart | 24 - .../flowy-document/observable.pbjson.dart | 20 - .../flowy-document/observable.pbserver.dart | 9 - .../lib/protobuf/flowy-document/protobuf.dart | 1 - .../dart_notification.pb.dart} | 4 +- ...num.dart => dart_notification.pbenum.dart} | 2 +- ...son.dart => dart_notification.pbjson.dart} | 2 +- .../dart_notification.pbserver.dart | 9 + .../protobuf/flowy-user/observable.pb.dart | 11 - .../flowy-user/observable.pbserver.dart | 9 - .../lib/protobuf/flowy-user/protobuf.dart | 2 +- frontend/rust-lib/flowy-core/Flowy.toml | 2 +- frontend/rust-lib/flowy-core/src/context.rs | 2 +- .../observable.rs => dart_notification.rs} | 2 - .../rust-lib/flowy-core/src/event_handler.rs | 112 - frontend/rust-lib/flowy-core/src/lib.rs | 3 +- frontend/rust-lib/flowy-core/src/module.rs | 1 - .../rust-lib/flowy-core/src/notify/mod.rs | 3 - .../{observable.rs => dart_notification.rs} | 75 +- .../flowy-core/src/protobuf/model/mod.rs | 4 +- ...servable.proto => dart_notification.proto} | 0 .../flowy-core/src/services/app/controller.rs | 12 +- .../flowy-core/src/services/app/sql.rs | 15 +- .../src/services/trash/controller.rs | 2 +- .../flowy-core/src/services/trash/sql.rs | 12 +- .../src/services/view/controller.rs | 12 +- .../flowy-core/src/services/view/sql.rs | 15 +- .../src/services/workspace/controller.rs | 7 +- .../src/services/workspace/event_handler.rs | 113 +- .../flowy-core/src/services/workspace/sql.rs | 7 +- frontend/rust-lib/flowy-document/Flowy.toml | 3 +- frontend/rust-lib/flowy-document/src/lib.rs | 2 +- .../rust-lib/flowy-document/src/notify/mod.rs | 1 - .../flowy-document/src/notify/observable.rs | 16 - .../flowy-document/src/protobuf/model/mod.rs | 3 - .../src/protobuf/model/observable.rs | 92 - .../src/protobuf/proto/observable.proto | 5 - frontend/rust-lib/flowy-user/Flowy.toml | 2 +- .../observable.rs => dart_notification.rs} | 0 frontend/rust-lib/flowy-user/src/lib.rs | 2 +- .../rust-lib/flowy-user/src/notify/mod.rs | 2 - .../{observable.rs => dart_notification.rs} | 34 +- .../flowy-user/src/protobuf/model/mod.rs | 4 +- ...servable.proto => dart_notification.proto} | 1 - .../flowy-user/src/services/user_session.rs | 2 +- .../flowy-core-data-model/src/entities/app.rs | 233 ++ .../src/entities/app/app_create.rs | 111 - .../src/entities/app/app_query.rs | 39 - .../src/entities/app/app_update.rs | 93 - .../src/entities/app/mod.rs | 6 - .../entities/{share/export.rs => share.rs} | 0 .../src/entities/share/mod.rs | 3 - .../{trash/trash_create.rs => trash.rs} | 0 .../src/entities/trash/mod.rs | 2 - .../entities/{view/view_create.rs => view.rs} | 222 +- .../src/entities/view/mod.rs | 7 - .../src/entities/view/view_query.rs | 65 - .../src/entities/view/view_update.rs | 105 - .../src/entities/workspace.rs | 158 + .../src/entities/workspace/mod.rs | 9 - .../entities/workspace/workspace_create.rs | 72 - .../src/entities/workspace/workspace_query.rs | 38 - .../entities/workspace/workspace_setting.rs | 11 - .../entities/workspace/workspace_update.rs | 48 - .../src/protobuf/model/app.rs | 2797 ++++++++++++++++ .../src/protobuf/model/app_create.rs | 1485 --------- .../src/protobuf/model/app_query.rs | 368 --- .../src/protobuf/model/app_update.rs | 1028 ------ .../src/protobuf/model/document | 41 - .../src/protobuf/model/mod.rs | 41 +- .../protobuf/model/{export.rs => share.rs} | 4 +- .../model/{trash_create.rs => trash.rs} | 106 +- .../src/protobuf/model/view.rs | 2917 +++++++++++++++++ .../src/protobuf/model/view_create.rs | 1582 --------- .../src/protobuf/model/view_query.rs | 532 --- .../src/protobuf/model/view_update.rs | 886 ----- .../src/protobuf/model/workspace.rs | 2381 ++++++++++++++ .../src/protobuf/model/workspace_create.rs | 1025 ------ .../src/protobuf/model/workspace_query.rs | 450 --- .../src/protobuf/model/workspace_setting.rs | 317 -- .../src/protobuf/model/workspace_update.rs | 714 ---- .../src/protobuf/proto/app.proto | 51 + .../src/protobuf/proto/app_create.proto | 31 - .../src/protobuf/proto/app_query.proto | 8 - .../src/protobuf/proto/app_update.proto | 17 - .../proto/{export.proto => share.proto} | 0 .../proto/{trash_create.proto => trash.proto} | 0 .../proto/{view_create.proto => view.proto} | 45 +- .../src/protobuf/proto/view_query.proto | 11 - .../src/protobuf/proto/view_update.proto | 14 - .../src/protobuf/proto/workspace.proto | 43 + .../src/protobuf/proto/workspace_create.proto | 22 - .../src/protobuf/proto/workspace_query.proto | 8 - .../protobuf/proto/workspace_setting.proto | 8 - .../src/protobuf/proto/workspace_update.proto | 12 - .../src/derive_cache/derive_cache.rs | 45 +- 190 files changed, 11262 insertions(+), 12183 deletions(-) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{app_create.pb.dart => app.pb.dart} (52%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{app_query.pbenum.dart => app.pbenum.dart} (90%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{app_create.pbjson.dart => app.pbjson.dart} (55%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{export.pbserver.dart => app.pbserver.dart} (86%) delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_query.pb.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_query.pbjson.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_update.pb.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_update.pbenum.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_update.pbjson.dart rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{export.pb.dart => share.pb.dart} (98%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{export.pbenum.dart => share.pbenum.dart} (97%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{export.pbjson.dart => share.pbjson.dart} (98%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{app_query.pbserver.dart => share.pbserver.dart} (84%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{trash_create.pb.dart => trash.pb.dart} (99%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{trash_create.pbenum.dart => trash.pbenum.dart} (97%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{trash_create.pbjson.dart => trash.pbjson.dart} (99%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{app_update.pbserver.dart => trash.pbserver.dart} (84%) delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash_create.pbserver.dart rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{view_create.pb.dart => view.pb.dart} (52%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{view_create.pbenum.dart => view.pbenum.dart} (97%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{view_create.pbjson.dart => view.pbjson.dart} (59%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{app_create.pbserver.dart => view.pbserver.dart} (84%) delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_create.pbserver.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pb.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pbenum.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pbjson.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pbserver.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pb.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pbenum.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pbjson.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pbserver.dart create mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace.pb.dart rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/{app_create.pbenum.dart => workspace.pbenum.dart} (90%) create mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace.pbjson.dart create mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace.pbserver.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pb.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pbenum.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pbjson.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pbserver.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pb.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pbenum.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pbjson.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pbserver.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pb.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pbenum.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pbjson.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pbserver.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pb.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pbenum.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pbjson.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pbserver.dart rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/{observable.pb.dart => dart_notification.pb.dart} (79%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/{observable.pbenum.dart => dart_notification.pbenum.dart} (98%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/{observable.pbjson.dart => dart_notification.pbjson.dart} (97%) create mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/dart_notification.pbserver.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbserver.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pbenum.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pbjson.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pbserver.dart rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/{flowy-document/observable.pb.dart => flowy-user/dart_notification.pb.dart} (79%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/{observable.pbenum.dart => dart_notification.pbenum.dart} (97%) rename frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/{observable.pbjson.dart => dart_notification.pbjson.dart} (96%) create mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/dart_notification.pbserver.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pb.dart delete mode 100644 frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbserver.dart rename frontend/rust-lib/flowy-core/src/{notify/observable.rs => dart_notification.rs} (91%) delete mode 100644 frontend/rust-lib/flowy-core/src/event_handler.rs delete mode 100644 frontend/rust-lib/flowy-core/src/notify/mod.rs rename frontend/rust-lib/flowy-core/src/protobuf/model/{observable.rs => dart_notification.rs} (62%) rename frontend/rust-lib/flowy-core/src/protobuf/proto/{observable.proto => dart_notification.proto} (100%) delete mode 100644 frontend/rust-lib/flowy-document/src/notify/mod.rs delete mode 100644 frontend/rust-lib/flowy-document/src/notify/observable.rs delete mode 100644 frontend/rust-lib/flowy-document/src/protobuf/model/observable.rs delete mode 100644 frontend/rust-lib/flowy-document/src/protobuf/proto/observable.proto rename frontend/rust-lib/flowy-user/src/{notify/observable.rs => dart_notification.rs} (100%) delete mode 100644 frontend/rust-lib/flowy-user/src/notify/mod.rs rename frontend/rust-lib/flowy-user/src/protobuf/model/{observable.rs => dart_notification.rs} (71%) rename frontend/rust-lib/flowy-user/src/protobuf/proto/{observable.proto => dart_notification.proto} (99%) create mode 100644 shared-lib/flowy-core-data-model/src/entities/app.rs delete mode 100644 shared-lib/flowy-core-data-model/src/entities/app/app_create.rs delete mode 100644 shared-lib/flowy-core-data-model/src/entities/app/app_query.rs delete mode 100644 shared-lib/flowy-core-data-model/src/entities/app/app_update.rs delete mode 100644 shared-lib/flowy-core-data-model/src/entities/app/mod.rs rename shared-lib/flowy-core-data-model/src/entities/{share/export.rs => share.rs} (100%) delete mode 100644 shared-lib/flowy-core-data-model/src/entities/share/mod.rs rename shared-lib/flowy-core-data-model/src/entities/{trash/trash_create.rs => trash.rs} (100%) delete mode 100644 shared-lib/flowy-core-data-model/src/entities/trash/mod.rs rename shared-lib/flowy-core-data-model/src/entities/{view/view_create.rs => view.rs} (51%) delete mode 100644 shared-lib/flowy-core-data-model/src/entities/view/mod.rs delete mode 100644 shared-lib/flowy-core-data-model/src/entities/view/view_query.rs delete mode 100644 shared-lib/flowy-core-data-model/src/entities/view/view_update.rs create mode 100644 shared-lib/flowy-core-data-model/src/entities/workspace.rs delete mode 100644 shared-lib/flowy-core-data-model/src/entities/workspace/mod.rs delete mode 100644 shared-lib/flowy-core-data-model/src/entities/workspace/workspace_create.rs delete mode 100644 shared-lib/flowy-core-data-model/src/entities/workspace/workspace_query.rs delete mode 100644 shared-lib/flowy-core-data-model/src/entities/workspace/workspace_setting.rs delete mode 100644 shared-lib/flowy-core-data-model/src/entities/workspace/workspace_update.rs create mode 100644 shared-lib/flowy-core-data-model/src/protobuf/model/app.rs delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/model/app_create.rs delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/model/app_query.rs delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/model/app_update.rs delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/model/document rename shared-lib/flowy-core-data-model/src/protobuf/model/{export.rs => share.rs} (99%) rename shared-lib/flowy-core-data-model/src/protobuf/model/{trash_create.rs => trash.rs} (88%) create mode 100644 shared-lib/flowy-core-data-model/src/protobuf/model/view.rs delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/model/view_create.rs delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/model/view_query.rs delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/model/view_update.rs create mode 100644 shared-lib/flowy-core-data-model/src/protobuf/model/workspace.rs delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/model/workspace_create.rs delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/model/workspace_query.rs delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/model/workspace_setting.rs delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/model/workspace_update.rs create mode 100644 shared-lib/flowy-core-data-model/src/protobuf/proto/app.proto delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/proto/app_create.proto delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/proto/app_query.proto delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/proto/app_update.proto rename shared-lib/flowy-core-data-model/src/protobuf/proto/{export.proto => share.proto} (100%) rename shared-lib/flowy-core-data-model/src/protobuf/proto/{trash_create.proto => trash.proto} (100%) rename shared-lib/flowy-core-data-model/src/protobuf/proto/{view_create.proto => view.proto} (57%) delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/proto/view_query.proto delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/proto/view_update.proto create mode 100644 shared-lib/flowy-core-data-model/src/protobuf/proto/workspace.proto delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_create.proto delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_query.proto delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_setting.proto delete mode 100644 shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_update.proto diff --git a/frontend/app_flowy/lib/user/presentation/welcome_screen.dart b/frontend/app_flowy/lib/user/presentation/welcome_screen.dart index 4bb1e593c1..88b72ad043 100644 --- a/frontend/app_flowy/lib/user/presentation/welcome_screen.dart +++ b/frontend/app_flowy/lib/user/presentation/welcome_screen.dart @@ -5,7 +5,7 @@ import 'package:flowy_infra/theme.dart'; import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart'; import 'package:flowy_infra_ui/style_widget/button.dart'; import 'package:flowy_infra_ui/widget/error_page.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:app_flowy/workspace/infrastructure/repos/user_repo.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/app/app_bloc.dart b/frontend/app_flowy/lib/workspace/application/app/app_bloc.dart index 58df458cd9..77efab66de 100644 --- a/frontend/app_flowy/lib/workspace/application/app/app_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/app/app_bloc.dart @@ -1,7 +1,7 @@ import 'package:app_flowy/workspace/domain/i_app.dart'; import 'package:flowy_log/flowy_log.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/app_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.dart b/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.dart index 9dc22118ad..e9f213f859 100644 --- a/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.dart @@ -2,8 +2,8 @@ import 'dart:convert'; import 'package:app_flowy/workspace/domain/i_trash.dart'; import 'package:app_flowy/workspace/domain/i_view.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; import 'package:flutter_quill/flutter_quill.dart'; import 'package:flowy_log/flowy_log.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/doc/share_bloc.dart b/frontend/app_flowy/lib/workspace/application/doc/share_bloc.dart index e89571e63c..9ddc722d20 100644 --- a/frontend/app_flowy/lib/workspace/application/doc/share_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/doc/share_bloc.dart @@ -1,7 +1,7 @@ import 'package:app_flowy/workspace/domain/i_share.dart'; import 'package:app_flowy/workspace/infrastructure/markdown/delta_markdown.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/export.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/share.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.dart b/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.dart index 9f6df6f71d..1e8e36518b 100644 --- a/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.dart @@ -4,7 +4,7 @@ import 'package:app_flowy/workspace/domain/page_stack/page_stack.dart'; import 'package:app_flowy/workspace/presentation/stack_page/blank/blank_page.dart'; import 'package:dartz/dartz.dart'; import 'package:flowy_log/flowy_log.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/app_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/menu/menu_user_bloc.dart b/frontend/app_flowy/lib/workspace/application/menu/menu_user_bloc.dart index d96b8ff4be..770f6f11f2 100644 --- a/frontend/app_flowy/lib/workspace/application/menu/menu_user_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/menu/menu_user_bloc.dart @@ -1,6 +1,6 @@ import 'package:app_flowy/workspace/domain/i_user.dart'; import 'package:flowy_log/flowy_log.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.dart b/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.dart index e2d5e337ea..be6979c1d1 100644 --- a/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.dart @@ -1,7 +1,7 @@ import 'package:app_flowy/workspace/domain/i_trash.dart'; import 'package:dartz/dartz.dart'; import 'package:flowy_log/flowy_log.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/view/view_bloc.dart b/frontend/app_flowy/lib/workspace/application/view/view_bloc.dart index eade3522d5..112fc701de 100644 --- a/frontend/app_flowy/lib/workspace/application/view/view_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/view/view_bloc.dart @@ -1,5 +1,5 @@ import 'package:dartz/dartz.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; diff --git a/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.dart b/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.dart index db4ed8c4e5..7291b88a97 100644 --- a/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.dart +++ b/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.dart @@ -1,7 +1,7 @@ import 'package:app_flowy/workspace/domain/i_user.dart'; import 'package:app_flowy/workspace/infrastructure/repos/user_repo.dart'; import 'package:flowy_log/flowy_log.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/frontend/app_flowy/lib/workspace/domain/i_trash.dart b/frontend/app_flowy/lib/workspace/domain/i_trash.dart index d237a2054e..76f07b75e7 100644 --- a/frontend/app_flowy/lib/workspace/domain/i_trash.dart +++ b/frontend/app_flowy/lib/workspace/domain/i_trash.dart @@ -1,6 +1,6 @@ import 'dart:async'; import 'package:dartz/dartz.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; abstract class ITrash { diff --git a/frontend/app_flowy/lib/workspace/domain/i_user.dart b/frontend/app_flowy/lib/workspace/domain/i_user.dart index 46ca8bf023..b0e3173988 100644 --- a/frontend/app_flowy/lib/workspace/domain/i_user.dart +++ b/frontend/app_flowy/lib/workspace/domain/i_user.dart @@ -2,7 +2,7 @@ import 'package:dartz/dartz.dart'; import 'package:flowy_infra/notifier.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart'; export 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile; abstract class IUser { diff --git a/frontend/app_flowy/lib/workspace/domain/i_view.dart b/frontend/app_flowy/lib/workspace/domain/i_view.dart index 94c927114f..f769be99fe 100644 --- a/frontend/app_flowy/lib/workspace/domain/i_view.dart +++ b/frontend/app_flowy/lib/workspace/domain/i_view.dart @@ -1,4 +1,4 @@ -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:dartz/dartz.dart'; import 'package:flowy_infra/notifier.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; diff --git a/frontend/app_flowy/lib/workspace/domain/image.dart b/frontend/app_flowy/lib/workspace/domain/image.dart index de61f144e6..4c2507f0ba 100644 --- a/frontend/app_flowy/lib/workspace/domain/image.dart +++ b/frontend/app_flowy/lib/workspace/domain/image.dart @@ -1,4 +1,4 @@ -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flutter/material.dart'; import 'package:flowy_infra/image.dart'; diff --git a/frontend/app_flowy/lib/workspace/domain/view_ext.dart b/frontend/app_flowy/lib/workspace/domain/view_ext.dart index babd42b1c7..8029b8255a 100644 --- a/frontend/app_flowy/lib/workspace/domain/view_ext.dart +++ b/frontend/app_flowy/lib/workspace/domain/view_ext.dart @@ -1,7 +1,7 @@ import 'package:app_flowy/workspace/domain/page_stack/page_stack.dart'; import 'package:app_flowy/workspace/presentation/stack_page/blank/blank_page.dart'; import 'package:app_flowy/workspace/presentation/stack_page/doc/doc_stack_page.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; extension ToHomeStackContext on View { HomeStackContext stackContext() { diff --git a/frontend/app_flowy/lib/workspace/infrastructure/deps_resolver.dart b/frontend/app_flowy/lib/workspace/infrastructure/deps_resolver.dart index 46ac5608e6..5badf3b775 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/deps_resolver.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/deps_resolver.dart @@ -21,8 +21,8 @@ import 'package:app_flowy/workspace/infrastructure/repos/trash_repo.dart'; import 'package:app_flowy/workspace/infrastructure/repos/view_repo.dart'; import 'package:app_flowy/workspace/infrastructure/repos/workspace_repo.dart'; import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/app_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:get_it/get_it.dart'; import 'i_share_impl.dart'; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/i_app_impl.dart b/frontend/app_flowy/lib/workspace/infrastructure/i_app_impl.dart index 6530fd67a9..1b4eaa49c8 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/i_app_impl.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/i_app_impl.dart @@ -1,7 +1,7 @@ import 'package:app_flowy/workspace/infrastructure/repos/app_repo.dart'; import 'package:dartz/dartz.dart'; import 'package:app_flowy/workspace/domain/i_app.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; export 'package:app_flowy/workspace/domain/i_app.dart'; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/i_trash_impl.dart b/frontend/app_flowy/lib/workspace/infrastructure/i_trash_impl.dart index 68366f6b71..bb8531e223 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/i_trash_impl.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/i_trash_impl.dart @@ -1,7 +1,7 @@ import 'package:app_flowy/workspace/domain/i_trash.dart'; import 'package:app_flowy/workspace/infrastructure/repos/trash_repo.dart'; import 'package:dartz/dartz.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; class ITrashImpl implements ITrash { diff --git a/frontend/app_flowy/lib/workspace/infrastructure/i_user_impl.dart b/frontend/app_flowy/lib/workspace/infrastructure/i_user_impl.dart index 76d9680751..b6735a6cc3 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/i_user_impl.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/i_user_impl.dart @@ -6,11 +6,11 @@ import 'package:app_flowy/workspace/domain/i_user.dart'; import 'package:app_flowy/workspace/infrastructure/repos/user_repo.dart'; import 'package:flowy_infra/notifier.dart'; import 'package:flowy_sdk/protobuf/dart-notify/protobuf.dart'; -import 'package:flowy_sdk/protobuf/flowy-core/observable.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/dart_notification.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-user-data-model/errors.pb.dart'; // import 'package:flowy_sdk/protobuf/flowy-user/errors.pb.dart' as user_error; -import 'package:flowy_sdk/protobuf/flowy-user/observable.pb.dart' as user; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-user/dart_notification.pb.dart' as user; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; export 'package:app_flowy/workspace/domain/i_user.dart'; export 'package:app_flowy/workspace/infrastructure/repos/user_repo.dart'; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/i_view_impl.dart b/frontend/app_flowy/lib/workspace/infrastructure/i_view_impl.dart index 116cafaeb3..07c4ff3b34 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/i_view_impl.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/i_view_impl.dart @@ -2,7 +2,7 @@ import 'package:app_flowy/workspace/domain/i_view.dart'; import 'package:app_flowy/workspace/infrastructure/repos/view_repo.dart'; import 'package:flowy_infra/notifier.dart'; import 'package:dartz/dartz.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; class IViewImpl extends IView { diff --git a/frontend/app_flowy/lib/workspace/infrastructure/i_workspace_impl.dart b/frontend/app_flowy/lib/workspace/infrastructure/i_workspace_impl.dart index eefd841fe3..d957106db3 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/i_workspace_impl.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/i_workspace_impl.dart @@ -1,7 +1,7 @@ import 'package:app_flowy/workspace/domain/i_workspace.dart'; import 'package:app_flowy/workspace/infrastructure/repos/workspace_repo.dart'; import 'package:dartz/dartz.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/app_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; export 'package:app_flowy/workspace/domain/i_workspace.dart'; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/app_repo.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/app_repo.dart index faa2de5dee..d7c344674d 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/repos/app_repo.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/app_repo.dart @@ -5,10 +5,8 @@ import 'package:dartz/dartz.dart'; import 'package:flowy_log/flowy_log.dart'; import 'package:flowy_sdk/dispatch/dispatch.dart'; import 'package:flowy_sdk/protobuf/dart-notify/subject.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/app_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/app_query.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/app_update.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-core/observable.pb.dart'; import 'package:flowy_sdk/rust_stream.dart'; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/doc_repo.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/doc_repo.dart index ae1bde158a..98e7aa0d98 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/repos/doc_repo.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/doc_repo.dart @@ -1,7 +1,7 @@ import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/dispatch/dispatch.dart'; import 'package:flowy_sdk/protobuf/flowy-collaboration/doc.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_query.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; class DocRepository { diff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/trash_repo.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/trash_repo.dart index 67a17d2172..a746901c94 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/repos/trash_repo.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/trash_repo.dart @@ -5,9 +5,9 @@ import 'package:app_flowy/workspace/infrastructure/repos/helper.dart'; import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/dispatch/dispatch.dart'; import 'package:flowy_sdk/protobuf/dart-notify/subject.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core/observable.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/dart_notification.pb.dart'; import 'package:flowy_sdk/rust_stream.dart'; class TrashRepo { diff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/user_repo.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/user_repo.dart index f1cf1cbcd5..843f12922e 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/repos/user_repo.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/user_repo.dart @@ -1,8 +1,7 @@ import 'dart:async'; import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/dispatch/dispatch.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace_query.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart'; import 'package:app_flowy/workspace/domain/i_user.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/view_repo.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/view_repo.dart index 2ef19a3060..519fc45f11 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/repos/view_repo.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/view_repo.dart @@ -3,11 +3,9 @@ import 'dart:typed_data'; import 'package:dartz/dartz.dart'; import 'package:flowy_sdk/dispatch/dispatch.dart'; import 'package:flowy_sdk/protobuf/dart-notify/subject.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_query.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_update.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core/observable.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/dart_notification.pb.dart'; import 'package:flowy_sdk/rust_stream.dart'; import 'package:app_flowy/workspace/domain/i_view.dart'; diff --git a/frontend/app_flowy/lib/workspace/infrastructure/repos/workspace_repo.dart b/frontend/app_flowy/lib/workspace/infrastructure/repos/workspace_repo.dart index 1e2fd189a3..3da75484d3 100644 --- a/frontend/app_flowy/lib/workspace/infrastructure/repos/workspace_repo.dart +++ b/frontend/app_flowy/lib/workspace/infrastructure/repos/workspace_repo.dart @@ -7,11 +7,10 @@ import 'package:flowy_log/flowy_log.dart'; import 'package:flowy_sdk/dispatch/dispatch.dart'; import 'package:flowy_sdk/protobuf/dart-notify/subject.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/app_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace_query.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core/observable.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core/dart_notification.pb.dart'; import 'package:flowy_sdk/rust_stream.dart'; import 'package:app_flowy/generated/locale_keys.g.dart'; diff --git a/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_page.dart b/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_page.dart index 7e353bcd97..6989b85a74 100644 --- a/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_page.dart +++ b/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_page.dart @@ -4,7 +4,7 @@ import 'package:flowy_infra_ui/style_widget/scrolling/styled_scroll_bar.dart'; import 'package:flowy_infra_ui/widget/spacing.dart'; import 'package:flutter_quill/flutter_quill.dart' as quill; import 'package:flowy_infra_ui/widget/error_page.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:styled_widget/styled_widget.dart'; diff --git a/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_stack_page.dart b/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_stack_page.dart index ee6ffc9632..de758736b1 100644 --- a/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_stack_page.dart +++ b/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/doc_stack_page.dart @@ -12,8 +12,8 @@ import 'package:flowy_infra/theme.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/widget/rounded_button.dart'; import 'package:flowy_log/flowy_log.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/export.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/share.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; import 'package:flutter/material.dart'; import 'package:dartz/dartz.dart' as dartz; diff --git a/frontend/app_flowy/lib/workspace/presentation/stack_page/trash/widget/trash_cell.dart b/frontend/app_flowy/lib/workspace/presentation/stack_page/trash/widget/trash_cell.dart index 35e7591c91..eff734c87e 100644 --- a/frontend/app_flowy/lib/workspace/presentation/stack_page/trash/widget/trash_cell.dart +++ b/frontend/app_flowy/lib/workspace/presentation/stack_page/trash/widget/trash_cell.dart @@ -2,7 +2,7 @@ import 'package:flowy_infra/image.dart'; import 'package:flowy_infra_ui/style_widget/icon_button.dart'; import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/widget/spacing.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/trash.pb.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; import 'package:fixnum/fixnum.dart' as $fixnum; diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/home_top_bar.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/home_top_bar.dart index aa8f6c0fe4..7645d8d331 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/home_top_bar.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/home_top_bar.dart @@ -4,8 +4,7 @@ import 'package:app_flowy/workspace/presentation/home/home_sizes.dart'; import 'package:app_flowy/workspace/presentation/home/navigation.dart'; import 'package:flowy_infra/theme.dart'; import 'package:flowy_infra_ui/widget/spacing.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pbenum.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flutter/material.dart'; import 'package:flowy_infra_ui/style_widget/extension.dart'; import 'package:flowy_infra_ui/style_widget/text.dart'; diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/menu.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/menu.dart index 535dbb38f2..f432524c50 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/menu.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/menu.dart @@ -4,8 +4,8 @@ import 'package:flowy_infra/size.dart'; import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart'; import 'package:flowy_infra_ui/widget/spacing.dart'; import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace_setting.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/workspace.pb.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:provider/provider.dart'; diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/header/add_button.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/header/add_button.dart index 23286c103b..b198d9da1e 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/header/add_button.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/header/add_button.dart @@ -4,7 +4,7 @@ import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/style_widget/hover.dart'; import 'package:flowy_infra_ui/style_widget/icon_button.dart'; import 'package:flowy_infra_ui/style_widget/text.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:styled_widget/styled_widget.dart'; diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/header/header.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/header/header.dart index c6349f03fd..a96e51b9f3 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/header/header.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/header/header.dart @@ -6,7 +6,7 @@ import 'package:flowy_infra/flowy_icon_data_icons.dart'; import 'package:flowy_infra/theme.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart'; import 'package:flowy_infra_ui/style_widget/text.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/app_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:app_flowy/workspace/application/app/app_bloc.dart'; diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/menu_app.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/menu_app.dart index b5a62df3c1..9d827efa8b 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/menu_app.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/menu_app.dart @@ -1,8 +1,8 @@ import 'package:app_flowy/workspace/presentation/widgets/menu/menu.dart'; import 'package:app_flowy/workspace/presentation/widgets/menu/widget/app/header/header.dart'; import 'package:expandable/expandable.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/app_create.pb.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/app.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:app_flowy/startup/startup.dart'; diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/item.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/item.dart index e83c995dd2..2eadb0f6e9 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/item.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/item.dart @@ -8,7 +8,7 @@ import 'package:flowy_infra/theme.dart'; import 'package:flowy_infra_ui/style_widget/hover.dart'; import 'package:flowy_infra_ui/style_widget/text.dart'; import 'package:flowy_infra_ui/widget/spacing.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:styled_widget/styled_widget.dart'; diff --git a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/section.dart b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/section.dart index 18afa563a6..468d6083f4 100644 --- a/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/section.dart +++ b/frontend/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/section.dart @@ -3,7 +3,7 @@ import 'package:app_flowy/workspace/domain/page_stack/page_stack.dart'; import 'package:app_flowy/workspace/domain/view_ext.dart'; import 'package:app_flowy/workspace/presentation/widgets/menu/menu.dart'; import 'package:app_flowy/workspace/presentation/widgets/menu/widget/app/menu_app.dart'; -import 'package:flowy_sdk/protobuf/flowy-core-data-model/view_create.pb.dart'; +import 'package:flowy_sdk/protobuf/flowy-core-data-model/view.pb.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:styled_widget/styled_widget.dart'; diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_create.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app.pb.dart similarity index 52% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_create.pb.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app.pb.dart index b7e8cf65dc..18e4925f87 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_create.pb.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app.pb.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: app_create.proto +// source: app.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 @@ -10,7 +10,195 @@ import 'dart:core' as $core; import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; -import 'view_create.pb.dart' as $0; +import 'view.pb.dart' as $0; + +class App extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'App', createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'workspaceId') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') + ..aOM<$0.RepeatedView>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'belongings', subBuilder: $0.RepeatedView.create) + ..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'version') + ..aInt64(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'modifiedTime') + ..aInt64(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'createTime') + ..hasRequiredFields = false + ; + + App._() : super(); + factory App({ + $core.String? id, + $core.String? workspaceId, + $core.String? name, + $core.String? desc, + $0.RepeatedView? belongings, + $fixnum.Int64? version, + $fixnum.Int64? modifiedTime, + $fixnum.Int64? createTime, + }) { + final _result = create(); + if (id != null) { + _result.id = id; + } + if (workspaceId != null) { + _result.workspaceId = workspaceId; + } + if (name != null) { + _result.name = name; + } + if (desc != null) { + _result.desc = desc; + } + if (belongings != null) { + _result.belongings = belongings; + } + if (version != null) { + _result.version = version; + } + if (modifiedTime != null) { + _result.modifiedTime = modifiedTime; + } + if (createTime != null) { + _result.createTime = createTime; + } + return _result; + } + factory App.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory App.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') + App clone() => App()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + App copyWith(void Function(App) updates) => super.copyWith((message) => updates(message as App)) as App; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static App create() => App._(); + App createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static App getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static App? _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 workspaceId => $_getSZ(1); + @$pb.TagNumber(2) + set workspaceId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasWorkspaceId() => $_has(1); + @$pb.TagNumber(2) + void clearWorkspaceId() => 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.RepeatedView get belongings => $_getN(4); + @$pb.TagNumber(5) + set belongings($0.RepeatedView v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasBelongings() => $_has(4); + @$pb.TagNumber(5) + void clearBelongings() => clearField(5); + @$pb.TagNumber(5) + $0.RepeatedView ensureBelongings() => $_ensure(4); + + @$pb.TagNumber(6) + $fixnum.Int64 get version => $_getI64(5); + @$pb.TagNumber(6) + set version($fixnum.Int64 v) { $_setInt64(5, v); } + @$pb.TagNumber(6) + $core.bool hasVersion() => $_has(5); + @$pb.TagNumber(6) + void clearVersion() => clearField(6); + + @$pb.TagNumber(7) + $fixnum.Int64 get modifiedTime => $_getI64(6); + @$pb.TagNumber(7) + set modifiedTime($fixnum.Int64 v) { $_setInt64(6, v); } + @$pb.TagNumber(7) + $core.bool hasModifiedTime() => $_has(6); + @$pb.TagNumber(7) + void clearModifiedTime() => clearField(7); + + @$pb.TagNumber(8) + $fixnum.Int64 get createTime => $_getI64(7); + @$pb.TagNumber(8) + set createTime($fixnum.Int64 v) { $_setInt64(7, v); } + @$pb.TagNumber(8) + $core.bool hasCreateTime() => $_has(7); + @$pb.TagNumber(8) + void clearCreateTime() => clearField(8); +} + +class RepeatedApp extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RepeatedApp', createEmptyInstance: create) + ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'items', $pb.PbFieldType.PM, subBuilder: App.create) + ..hasRequiredFields = false + ; + + RepeatedApp._() : super(); + factory RepeatedApp({ + $core.Iterable? items, + }) { + final _result = create(); + if (items != null) { + _result.items.addAll(items); + } + return _result; + } + factory RepeatedApp.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RepeatedApp.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') + RepeatedApp clone() => RepeatedApp()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RepeatedApp copyWith(void Function(RepeatedApp) updates) => super.copyWith((message) => updates(message as RepeatedApp)) as RepeatedApp; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static RepeatedApp create() => RepeatedApp._(); + RepeatedApp createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RepeatedApp getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RepeatedApp? _defaultInstance; + + @$pb.TagNumber(1) + $core.List get items => $_getList(0); +} class CreateAppRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateAppRequest', createEmptyInstance: create) @@ -241,36 +429,155 @@ class CreateAppParams extends $pb.GeneratedMessage { ColorStyle ensureColorStyle() => $_ensure(3); } -class App extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'App', createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'workspaceId') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') - ..aOM<$0.RepeatedView>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'belongings', subBuilder: $0.RepeatedView.create) - ..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'version') - ..aInt64(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'modifiedTime') - ..aInt64(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'createTime') +class QueryAppRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'QueryAppRequest', createEmptyInstance: create) + ..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'appIds') ..hasRequiredFields = false ; - App._() : super(); - factory App({ - $core.String? id, - $core.String? workspaceId, - $core.String? name, - $core.String? desc, - $0.RepeatedView? belongings, - $fixnum.Int64? version, - $fixnum.Int64? modifiedTime, - $fixnum.Int64? createTime, + QueryAppRequest._() : super(); + factory QueryAppRequest({ + $core.Iterable<$core.String>? appIds, }) { final _result = create(); - if (id != null) { - _result.id = id; + if (appIds != null) { + _result.appIds.addAll(appIds); } - if (workspaceId != null) { - _result.workspaceId = workspaceId; + return _result; + } + factory QueryAppRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory QueryAppRequest.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') + QueryAppRequest clone() => QueryAppRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + QueryAppRequest copyWith(void Function(QueryAppRequest) updates) => super.copyWith((message) => updates(message as QueryAppRequest)) as QueryAppRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static QueryAppRequest create() => QueryAppRequest._(); + QueryAppRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static QueryAppRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static QueryAppRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.String> get appIds => $_getList(0); +} + +class AppId extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'AppId', createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'appId') + ..hasRequiredFields = false + ; + + AppId._() : super(); + factory AppId({ + $core.String? appId, + }) { + final _result = create(); + if (appId != null) { + _result.appId = appId; + } + return _result; + } + factory AppId.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory AppId.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') + AppId clone() => AppId()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + AppId copyWith(void Function(AppId) updates) => super.copyWith((message) => updates(message as AppId)) as AppId; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static AppId create() => AppId._(); + AppId createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static AppId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static AppId? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get appId => $_getSZ(0); + @$pb.TagNumber(1) + set appId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasAppId() => $_has(0); + @$pb.TagNumber(1) + void clearAppId() => clearField(1); +} + +enum UpdateAppRequest_OneOfName { + name, + notSet +} + +enum UpdateAppRequest_OneOfDesc { + desc, + notSet +} + +enum UpdateAppRequest_OneOfColorStyle { + colorStyle, + notSet +} + +enum UpdateAppRequest_OneOfIsTrash { + isTrash, + notSet +} + +class UpdateAppRequest extends $pb.GeneratedMessage { + static const $core.Map<$core.int, UpdateAppRequest_OneOfName> _UpdateAppRequest_OneOfNameByTag = { + 2 : UpdateAppRequest_OneOfName.name, + 0 : UpdateAppRequest_OneOfName.notSet + }; + static const $core.Map<$core.int, UpdateAppRequest_OneOfDesc> _UpdateAppRequest_OneOfDescByTag = { + 3 : UpdateAppRequest_OneOfDesc.desc, + 0 : UpdateAppRequest_OneOfDesc.notSet + }; + static const $core.Map<$core.int, UpdateAppRequest_OneOfColorStyle> _UpdateAppRequest_OneOfColorStyleByTag = { + 4 : UpdateAppRequest_OneOfColorStyle.colorStyle, + 0 : UpdateAppRequest_OneOfColorStyle.notSet + }; + static const $core.Map<$core.int, UpdateAppRequest_OneOfIsTrash> _UpdateAppRequest_OneOfIsTrashByTag = { + 5 : UpdateAppRequest_OneOfIsTrash.isTrash, + 0 : UpdateAppRequest_OneOfIsTrash.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateAppRequest', createEmptyInstance: create) + ..oo(0, [2]) + ..oo(1, [3]) + ..oo(2, [4]) + ..oo(3, [5]) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'appId') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') + ..aOM(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'colorStyle', subBuilder: ColorStyle.create) + ..aOB(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isTrash') + ..hasRequiredFields = false + ; + + UpdateAppRequest._() : super(); + factory UpdateAppRequest({ + $core.String? appId, + $core.String? name, + $core.String? desc, + ColorStyle? colorStyle, + $core.bool? isTrash, + }) { + final _result = create(); + if (appId != null) { + _result.appId = appId; } if (name != null) { _result.name = name; @@ -278,154 +585,249 @@ class App extends $pb.GeneratedMessage { if (desc != null) { _result.desc = desc; } - if (belongings != null) { - _result.belongings = belongings; + if (colorStyle != null) { + _result.colorStyle = colorStyle; } - if (version != null) { - _result.version = version; - } - if (modifiedTime != null) { - _result.modifiedTime = modifiedTime; - } - if (createTime != null) { - _result.createTime = createTime; + if (isTrash != null) { + _result.isTrash = isTrash; } return _result; } - factory App.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory App.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + factory UpdateAppRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateAppRequest.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') - App clone() => App()..mergeFromMessage(this); + UpdateAppRequest clone() => UpdateAppRequest()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - App copyWith(void Function(App) updates) => super.copyWith((message) => updates(message as App)) as App; // ignore: deprecated_member_use + UpdateAppRequest copyWith(void Function(UpdateAppRequest) updates) => super.copyWith((message) => updates(message as UpdateAppRequest)) as UpdateAppRequest; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static App create() => App._(); - App createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static UpdateAppRequest create() => UpdateAppRequest._(); + UpdateAppRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static App getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static App? _defaultInstance; + static UpdateAppRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateAppRequest? _defaultInstance; + + UpdateAppRequest_OneOfName whichOneOfName() => _UpdateAppRequest_OneOfNameByTag[$_whichOneof(0)]!; + void clearOneOfName() => clearField($_whichOneof(0)); + + UpdateAppRequest_OneOfDesc whichOneOfDesc() => _UpdateAppRequest_OneOfDescByTag[$_whichOneof(1)]!; + void clearOneOfDesc() => clearField($_whichOneof(1)); + + UpdateAppRequest_OneOfColorStyle whichOneOfColorStyle() => _UpdateAppRequest_OneOfColorStyleByTag[$_whichOneof(2)]!; + void clearOneOfColorStyle() => clearField($_whichOneof(2)); + + UpdateAppRequest_OneOfIsTrash whichOneOfIsTrash() => _UpdateAppRequest_OneOfIsTrashByTag[$_whichOneof(3)]!; + void clearOneOfIsTrash() => clearField($_whichOneof(3)); @$pb.TagNumber(1) - $core.String get id => $_getSZ(0); + $core.String get appId => $_getSZ(0); @$pb.TagNumber(1) - set id($core.String v) { $_setString(0, v); } + set appId($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); + $core.bool hasAppId() => $_has(0); @$pb.TagNumber(1) - void clearId() => clearField(1); + void clearAppId() => clearField(1); @$pb.TagNumber(2) - $core.String get workspaceId => $_getSZ(1); + $core.String get name => $_getSZ(1); @$pb.TagNumber(2) - set workspaceId($core.String v) { $_setString(1, v); } + set name($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) - $core.bool hasWorkspaceId() => $_has(1); + $core.bool hasName() => $_has(1); @$pb.TagNumber(2) - void clearWorkspaceId() => clearField(2); + void clearName() => clearField(2); @$pb.TagNumber(3) - $core.String get name => $_getSZ(2); + $core.String get desc => $_getSZ(2); @$pb.TagNumber(3) - set name($core.String v) { $_setString(2, v); } + set desc($core.String v) { $_setString(2, v); } @$pb.TagNumber(3) - $core.bool hasName() => $_has(2); + $core.bool hasDesc() => $_has(2); @$pb.TagNumber(3) - void clearName() => clearField(3); + void clearDesc() => clearField(3); @$pb.TagNumber(4) - $core.String get desc => $_getSZ(3); + ColorStyle get colorStyle => $_getN(3); @$pb.TagNumber(4) - set desc($core.String v) { $_setString(3, v); } + set colorStyle(ColorStyle v) { setField(4, v); } @$pb.TagNumber(4) - $core.bool hasDesc() => $_has(3); + $core.bool hasColorStyle() => $_has(3); @$pb.TagNumber(4) - void clearDesc() => clearField(4); + void clearColorStyle() => clearField(4); + @$pb.TagNumber(4) + ColorStyle ensureColorStyle() => $_ensure(3); @$pb.TagNumber(5) - $0.RepeatedView get belongings => $_getN(4); + $core.bool get isTrash => $_getBF(4); @$pb.TagNumber(5) - set belongings($0.RepeatedView v) { setField(5, v); } + set isTrash($core.bool v) { $_setBool(4, v); } @$pb.TagNumber(5) - $core.bool hasBelongings() => $_has(4); + $core.bool hasIsTrash() => $_has(4); @$pb.TagNumber(5) - void clearBelongings() => clearField(5); - @$pb.TagNumber(5) - $0.RepeatedView ensureBelongings() => $_ensure(4); - - @$pb.TagNumber(6) - $fixnum.Int64 get version => $_getI64(5); - @$pb.TagNumber(6) - set version($fixnum.Int64 v) { $_setInt64(5, v); } - @$pb.TagNumber(6) - $core.bool hasVersion() => $_has(5); - @$pb.TagNumber(6) - void clearVersion() => clearField(6); - - @$pb.TagNumber(7) - $fixnum.Int64 get modifiedTime => $_getI64(6); - @$pb.TagNumber(7) - set modifiedTime($fixnum.Int64 v) { $_setInt64(6, v); } - @$pb.TagNumber(7) - $core.bool hasModifiedTime() => $_has(6); - @$pb.TagNumber(7) - void clearModifiedTime() => clearField(7); - - @$pb.TagNumber(8) - $fixnum.Int64 get createTime => $_getI64(7); - @$pb.TagNumber(8) - set createTime($fixnum.Int64 v) { $_setInt64(7, v); } - @$pb.TagNumber(8) - $core.bool hasCreateTime() => $_has(7); - @$pb.TagNumber(8) - void clearCreateTime() => clearField(8); + void clearIsTrash() => clearField(5); } -class RepeatedApp extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RepeatedApp', createEmptyInstance: create) - ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'items', $pb.PbFieldType.PM, subBuilder: App.create) +enum UpdateAppParams_OneOfName { + name, + notSet +} + +enum UpdateAppParams_OneOfDesc { + desc, + notSet +} + +enum UpdateAppParams_OneOfColorStyle { + colorStyle, + notSet +} + +enum UpdateAppParams_OneOfIsTrash { + isTrash, + notSet +} + +class UpdateAppParams extends $pb.GeneratedMessage { + static const $core.Map<$core.int, UpdateAppParams_OneOfName> _UpdateAppParams_OneOfNameByTag = { + 2 : UpdateAppParams_OneOfName.name, + 0 : UpdateAppParams_OneOfName.notSet + }; + static const $core.Map<$core.int, UpdateAppParams_OneOfDesc> _UpdateAppParams_OneOfDescByTag = { + 3 : UpdateAppParams_OneOfDesc.desc, + 0 : UpdateAppParams_OneOfDesc.notSet + }; + static const $core.Map<$core.int, UpdateAppParams_OneOfColorStyle> _UpdateAppParams_OneOfColorStyleByTag = { + 4 : UpdateAppParams_OneOfColorStyle.colorStyle, + 0 : UpdateAppParams_OneOfColorStyle.notSet + }; + static const $core.Map<$core.int, UpdateAppParams_OneOfIsTrash> _UpdateAppParams_OneOfIsTrashByTag = { + 5 : UpdateAppParams_OneOfIsTrash.isTrash, + 0 : UpdateAppParams_OneOfIsTrash.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateAppParams', createEmptyInstance: create) + ..oo(0, [2]) + ..oo(1, [3]) + ..oo(2, [4]) + ..oo(3, [5]) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'appId') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') + ..aOM(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'colorStyle', subBuilder: ColorStyle.create) + ..aOB(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isTrash') ..hasRequiredFields = false ; - RepeatedApp._() : super(); - factory RepeatedApp({ - $core.Iterable? items, + UpdateAppParams._() : super(); + factory UpdateAppParams({ + $core.String? appId, + $core.String? name, + $core.String? desc, + ColorStyle? colorStyle, + $core.bool? isTrash, }) { final _result = create(); - if (items != null) { - _result.items.addAll(items); + if (appId != null) { + _result.appId = appId; + } + if (name != null) { + _result.name = name; + } + if (desc != null) { + _result.desc = desc; + } + if (colorStyle != null) { + _result.colorStyle = colorStyle; + } + if (isTrash != null) { + _result.isTrash = isTrash; } return _result; } - factory RepeatedApp.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory RepeatedApp.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + factory UpdateAppParams.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateAppParams.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') - RepeatedApp clone() => RepeatedApp()..mergeFromMessage(this); + UpdateAppParams clone() => UpdateAppParams()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - RepeatedApp copyWith(void Function(RepeatedApp) updates) => super.copyWith((message) => updates(message as RepeatedApp)) as RepeatedApp; // ignore: deprecated_member_use + UpdateAppParams copyWith(void Function(UpdateAppParams) updates) => super.copyWith((message) => updates(message as UpdateAppParams)) as UpdateAppParams; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static RepeatedApp create() => RepeatedApp._(); - RepeatedApp createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static UpdateAppParams create() => UpdateAppParams._(); + UpdateAppParams createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static RepeatedApp getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RepeatedApp? _defaultInstance; + static UpdateAppParams getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateAppParams? _defaultInstance; + + UpdateAppParams_OneOfName whichOneOfName() => _UpdateAppParams_OneOfNameByTag[$_whichOneof(0)]!; + void clearOneOfName() => clearField($_whichOneof(0)); + + UpdateAppParams_OneOfDesc whichOneOfDesc() => _UpdateAppParams_OneOfDescByTag[$_whichOneof(1)]!; + void clearOneOfDesc() => clearField($_whichOneof(1)); + + UpdateAppParams_OneOfColorStyle whichOneOfColorStyle() => _UpdateAppParams_OneOfColorStyleByTag[$_whichOneof(2)]!; + void clearOneOfColorStyle() => clearField($_whichOneof(2)); + + UpdateAppParams_OneOfIsTrash whichOneOfIsTrash() => _UpdateAppParams_OneOfIsTrashByTag[$_whichOneof(3)]!; + void clearOneOfIsTrash() => clearField($_whichOneof(3)); @$pb.TagNumber(1) - $core.List get items => $_getList(0); + $core.String get appId => $_getSZ(0); + @$pb.TagNumber(1) + set appId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasAppId() => $_has(0); + @$pb.TagNumber(1) + void clearAppId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => clearField(2); + + @$pb.TagNumber(3) + $core.String get desc => $_getSZ(2); + @$pb.TagNumber(3) + set desc($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasDesc() => $_has(2); + @$pb.TagNumber(3) + void clearDesc() => clearField(3); + + @$pb.TagNumber(4) + ColorStyle get colorStyle => $_getN(3); + @$pb.TagNumber(4) + set colorStyle(ColorStyle v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasColorStyle() => $_has(3); + @$pb.TagNumber(4) + void clearColorStyle() => clearField(4); + @$pb.TagNumber(4) + ColorStyle ensureColorStyle() => $_ensure(3); + + @$pb.TagNumber(5) + $core.bool get isTrash => $_getBF(4); + @$pb.TagNumber(5) + set isTrash($core.bool v) { $_setBool(4, v); } + @$pb.TagNumber(5) + $core.bool hasIsTrash() => $_has(4); + @$pb.TagNumber(5) + void clearIsTrash() => clearField(5); } diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_query.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app.pbenum.dart similarity index 90% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_query.pbenum.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app.pbenum.dart index b22bc4dbed..8a9d217efb 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_query.pbenum.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app.pbenum.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: app_query.proto +// source: app.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-core-data-model/app_create.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app.pbjson.dart similarity index 55% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_create.pbjson.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app.pbjson.dart index d81563f98e..dfdb05293e 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_create.pbjson.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app.pbjson.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: app_create.proto +// source: app.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 @@ -8,6 +8,33 @@ import 'dart:core' as $core; import 'dart:convert' as $convert; import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use appDescriptor instead') +const App$json = const { + '1': 'App', + '2': const [ + const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + const {'1': 'workspace_id', '3': 2, '4': 1, '5': 9, '10': 'workspaceId'}, + const {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, + const {'1': 'desc', '3': 4, '4': 1, '5': 9, '10': 'desc'}, + const {'1': 'belongings', '3': 5, '4': 1, '5': 11, '6': '.RepeatedView', '10': 'belongings'}, + const {'1': 'version', '3': 6, '4': 1, '5': 3, '10': 'version'}, + const {'1': 'modified_time', '3': 7, '4': 1, '5': 3, '10': 'modifiedTime'}, + const {'1': 'create_time', '3': 8, '4': 1, '5': 3, '10': 'createTime'}, + ], +}; + +/// Descriptor for `App`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List appDescriptor = $convert.base64Decode('CgNBcHASDgoCaWQYASABKAlSAmlkEiEKDHdvcmtzcGFjZV9pZBgCIAEoCVILd29ya3NwYWNlSWQSEgoEbmFtZRgDIAEoCVIEbmFtZRISCgRkZXNjGAQgASgJUgRkZXNjEi0KCmJlbG9uZ2luZ3MYBSABKAsyDS5SZXBlYXRlZFZpZXdSCmJlbG9uZ2luZ3MSGAoHdmVyc2lvbhgGIAEoA1IHdmVyc2lvbhIjCg1tb2RpZmllZF90aW1lGAcgASgDUgxtb2RpZmllZFRpbWUSHwoLY3JlYXRlX3RpbWUYCCABKANSCmNyZWF0ZVRpbWU='); +@$core.Deprecated('Use repeatedAppDescriptor instead') +const RepeatedApp$json = const { + '1': 'RepeatedApp', + '2': const [ + const {'1': 'items', '3': 1, '4': 3, '5': 11, '6': '.App', '10': 'items'}, + ], +}; + +/// Descriptor for `RepeatedApp`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List repeatedAppDescriptor = $convert.base64Decode('CgtSZXBlYXRlZEFwcBIaCgVpdGVtcxgBIAMoCzIELkFwcFIFaXRlbXM='); @$core.Deprecated('Use createAppRequestDescriptor instead') const CreateAppRequest$json = const { '1': 'CreateAppRequest', @@ -44,30 +71,63 @@ const CreateAppParams$json = const { /// Descriptor for `CreateAppParams`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List createAppParamsDescriptor = $convert.base64Decode('Cg9DcmVhdGVBcHBQYXJhbXMSIQoMd29ya3NwYWNlX2lkGAEgASgJUgt3b3Jrc3BhY2VJZBISCgRuYW1lGAIgASgJUgRuYW1lEhIKBGRlc2MYAyABKAlSBGRlc2MSLAoLY29sb3Jfc3R5bGUYBCABKAsyCy5Db2xvclN0eWxlUgpjb2xvclN0eWxl'); -@$core.Deprecated('Use appDescriptor instead') -const App$json = const { - '1': 'App', +@$core.Deprecated('Use queryAppRequestDescriptor instead') +const QueryAppRequest$json = const { + '1': 'QueryAppRequest', '2': const [ - const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - const {'1': 'workspace_id', '3': 2, '4': 1, '5': 9, '10': 'workspaceId'}, - const {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'}, - const {'1': 'desc', '3': 4, '4': 1, '5': 9, '10': 'desc'}, - const {'1': 'belongings', '3': 5, '4': 1, '5': 11, '6': '.RepeatedView', '10': 'belongings'}, - const {'1': 'version', '3': 6, '4': 1, '5': 3, '10': 'version'}, - const {'1': 'modified_time', '3': 7, '4': 1, '5': 3, '10': 'modifiedTime'}, - const {'1': 'create_time', '3': 8, '4': 1, '5': 3, '10': 'createTime'}, + const {'1': 'app_ids', '3': 1, '4': 3, '5': 9, '10': 'appIds'}, ], }; -/// Descriptor for `App`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List appDescriptor = $convert.base64Decode('CgNBcHASDgoCaWQYASABKAlSAmlkEiEKDHdvcmtzcGFjZV9pZBgCIAEoCVILd29ya3NwYWNlSWQSEgoEbmFtZRgDIAEoCVIEbmFtZRISCgRkZXNjGAQgASgJUgRkZXNjEi0KCmJlbG9uZ2luZ3MYBSABKAsyDS5SZXBlYXRlZFZpZXdSCmJlbG9uZ2luZ3MSGAoHdmVyc2lvbhgGIAEoA1IHdmVyc2lvbhIjCg1tb2RpZmllZF90aW1lGAcgASgDUgxtb2RpZmllZFRpbWUSHwoLY3JlYXRlX3RpbWUYCCABKANSCmNyZWF0ZVRpbWU='); -@$core.Deprecated('Use repeatedAppDescriptor instead') -const RepeatedApp$json = const { - '1': 'RepeatedApp', +/// Descriptor for `QueryAppRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List queryAppRequestDescriptor = $convert.base64Decode('Cg9RdWVyeUFwcFJlcXVlc3QSFwoHYXBwX2lkcxgBIAMoCVIGYXBwSWRz'); +@$core.Deprecated('Use appIdDescriptor instead') +const AppId$json = const { + '1': 'AppId', '2': const [ - const {'1': 'items', '3': 1, '4': 3, '5': 11, '6': '.App', '10': 'items'}, + const {'1': 'app_id', '3': 1, '4': 1, '5': 9, '10': 'appId'}, ], }; -/// Descriptor for `RepeatedApp`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List repeatedAppDescriptor = $convert.base64Decode('CgtSZXBlYXRlZEFwcBIaCgVpdGVtcxgBIAMoCzIELkFwcFIFaXRlbXM='); +/// Descriptor for `AppId`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List appIdDescriptor = $convert.base64Decode('CgVBcHBJZBIVCgZhcHBfaWQYASABKAlSBWFwcElk'); +@$core.Deprecated('Use updateAppRequestDescriptor instead') +const UpdateAppRequest$json = const { + '1': 'UpdateAppRequest', + '2': const [ + const {'1': 'app_id', '3': 1, '4': 1, '5': 9, '10': 'appId'}, + const {'1': 'name', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'name'}, + const {'1': 'desc', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'desc'}, + const {'1': 'color_style', '3': 4, '4': 1, '5': 11, '6': '.ColorStyle', '9': 2, '10': 'colorStyle'}, + const {'1': 'is_trash', '3': 5, '4': 1, '5': 8, '9': 3, '10': 'isTrash'}, + ], + '8': const [ + const {'1': 'one_of_name'}, + const {'1': 'one_of_desc'}, + const {'1': 'one_of_color_style'}, + const {'1': 'one_of_is_trash'}, + ], +}; + +/// Descriptor for `UpdateAppRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateAppRequestDescriptor = $convert.base64Decode('ChBVcGRhdGVBcHBSZXF1ZXN0EhUKBmFwcF9pZBgBIAEoCVIFYXBwSWQSFAoEbmFtZRgCIAEoCUgAUgRuYW1lEhQKBGRlc2MYAyABKAlIAVIEZGVzYxIuCgtjb2xvcl9zdHlsZRgEIAEoCzILLkNvbG9yU3R5bGVIAlIKY29sb3JTdHlsZRIbCghpc190cmFzaBgFIAEoCEgDUgdpc1RyYXNoQg0KC29uZV9vZl9uYW1lQg0KC29uZV9vZl9kZXNjQhQKEm9uZV9vZl9jb2xvcl9zdHlsZUIRCg9vbmVfb2ZfaXNfdHJhc2g='); +@$core.Deprecated('Use updateAppParamsDescriptor instead') +const UpdateAppParams$json = const { + '1': 'UpdateAppParams', + '2': const [ + const {'1': 'app_id', '3': 1, '4': 1, '5': 9, '10': 'appId'}, + const {'1': 'name', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'name'}, + const {'1': 'desc', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'desc'}, + const {'1': 'color_style', '3': 4, '4': 1, '5': 11, '6': '.ColorStyle', '9': 2, '10': 'colorStyle'}, + const {'1': 'is_trash', '3': 5, '4': 1, '5': 8, '9': 3, '10': 'isTrash'}, + ], + '8': const [ + const {'1': 'one_of_name'}, + const {'1': 'one_of_desc'}, + const {'1': 'one_of_color_style'}, + const {'1': 'one_of_is_trash'}, + ], +}; + +/// Descriptor for `UpdateAppParams`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateAppParamsDescriptor = $convert.base64Decode('Cg9VcGRhdGVBcHBQYXJhbXMSFQoGYXBwX2lkGAEgASgJUgVhcHBJZBIUCgRuYW1lGAIgASgJSABSBG5hbWUSFAoEZGVzYxgDIAEoCUgBUgRkZXNjEi4KC2NvbG9yX3N0eWxlGAQgASgLMgsuQ29sb3JTdHlsZUgCUgpjb2xvclN0eWxlEhsKCGlzX3RyYXNoGAUgASgISANSB2lzVHJhc2hCDQoLb25lX29mX25hbWVCDQoLb25lX29mX2Rlc2NCFAoSb25lX29mX2NvbG9yX3N0eWxlQhEKD29uZV9vZl9pc190cmFzaA=='); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/export.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app.pbserver.dart similarity index 86% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/export.pbserver.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app.pbserver.dart index 45057b282b..6226f20d93 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/export.pbserver.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app.pbserver.dart @@ -1,9 +1,9 @@ /// // Generated code. Do not modify. -// source: export.proto +// source: app.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 'export.pb.dart'; +export 'app.pb.dart'; diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_query.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_query.pb.dart deleted file mode 100644 index 7f28318a0d..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_query.pb.dart +++ /dev/null @@ -1,99 +0,0 @@ -/// -// Generated code. Do not modify. -// source: app_query.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; - -class QueryAppRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'QueryAppRequest', createEmptyInstance: create) - ..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'appIds') - ..hasRequiredFields = false - ; - - QueryAppRequest._() : super(); - factory QueryAppRequest({ - $core.Iterable<$core.String>? appIds, - }) { - final _result = create(); - if (appIds != null) { - _result.appIds.addAll(appIds); - } - return _result; - } - factory QueryAppRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory QueryAppRequest.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') - QueryAppRequest clone() => QueryAppRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - QueryAppRequest copyWith(void Function(QueryAppRequest) updates) => super.copyWith((message) => updates(message as QueryAppRequest)) as QueryAppRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static QueryAppRequest create() => QueryAppRequest._(); - QueryAppRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static QueryAppRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static QueryAppRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.List<$core.String> get appIds => $_getList(0); -} - -class AppId extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'AppId', createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'appId') - ..hasRequiredFields = false - ; - - AppId._() : super(); - factory AppId({ - $core.String? appId, - }) { - final _result = create(); - if (appId != null) { - _result.appId = appId; - } - return _result; - } - factory AppId.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory AppId.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') - AppId clone() => AppId()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - AppId copyWith(void Function(AppId) updates) => super.copyWith((message) => updates(message as AppId)) as AppId; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static AppId create() => AppId._(); - AppId createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static AppId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static AppId? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get appId => $_getSZ(0); - @$pb.TagNumber(1) - set appId($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasAppId() => $_has(0); - @$pb.TagNumber(1) - void clearAppId() => clearField(1); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_query.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_query.pbjson.dart deleted file mode 100644 index afa8e01778..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_query.pbjson.dart +++ /dev/null @@ -1,30 +0,0 @@ -/// -// Generated code. Do not modify. -// source: app_query.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 queryAppRequestDescriptor instead') -const QueryAppRequest$json = const { - '1': 'QueryAppRequest', - '2': const [ - const {'1': 'app_ids', '3': 1, '4': 3, '5': 9, '10': 'appIds'}, - ], -}; - -/// Descriptor for `QueryAppRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List queryAppRequestDescriptor = $convert.base64Decode('Cg9RdWVyeUFwcFJlcXVlc3QSFwoHYXBwX2lkcxgBIAMoCVIGYXBwSWRz'); -@$core.Deprecated('Use appIdDescriptor instead') -const AppId$json = const { - '1': 'AppId', - '2': const [ - const {'1': 'app_id', '3': 1, '4': 1, '5': 9, '10': 'appId'}, - ], -}; - -/// Descriptor for `AppId`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List appIdDescriptor = $convert.base64Decode('CgVBcHBJZBIVCgZhcHBfaWQYASABKAlSBWFwcElk'); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_update.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_update.pb.dart deleted file mode 100644 index dc4502adde..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_update.pb.dart +++ /dev/null @@ -1,327 +0,0 @@ -/// -// Generated code. Do not modify. -// source: app_update.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 'app_create.pb.dart' as $0; - -enum UpdateAppRequest_OneOfName { - name, - notSet -} - -enum UpdateAppRequest_OneOfDesc { - desc, - notSet -} - -enum UpdateAppRequest_OneOfColorStyle { - colorStyle, - notSet -} - -enum UpdateAppRequest_OneOfIsTrash { - isTrash, - notSet -} - -class UpdateAppRequest extends $pb.GeneratedMessage { - static const $core.Map<$core.int, UpdateAppRequest_OneOfName> _UpdateAppRequest_OneOfNameByTag = { - 2 : UpdateAppRequest_OneOfName.name, - 0 : UpdateAppRequest_OneOfName.notSet - }; - static const $core.Map<$core.int, UpdateAppRequest_OneOfDesc> _UpdateAppRequest_OneOfDescByTag = { - 3 : UpdateAppRequest_OneOfDesc.desc, - 0 : UpdateAppRequest_OneOfDesc.notSet - }; - static const $core.Map<$core.int, UpdateAppRequest_OneOfColorStyle> _UpdateAppRequest_OneOfColorStyleByTag = { - 4 : UpdateAppRequest_OneOfColorStyle.colorStyle, - 0 : UpdateAppRequest_OneOfColorStyle.notSet - }; - static const $core.Map<$core.int, UpdateAppRequest_OneOfIsTrash> _UpdateAppRequest_OneOfIsTrashByTag = { - 5 : UpdateAppRequest_OneOfIsTrash.isTrash, - 0 : UpdateAppRequest_OneOfIsTrash.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateAppRequest', createEmptyInstance: create) - ..oo(0, [2]) - ..oo(1, [3]) - ..oo(2, [4]) - ..oo(3, [5]) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'appId') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') - ..aOM<$0.ColorStyle>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'colorStyle', subBuilder: $0.ColorStyle.create) - ..aOB(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isTrash') - ..hasRequiredFields = false - ; - - UpdateAppRequest._() : super(); - factory UpdateAppRequest({ - $core.String? appId, - $core.String? name, - $core.String? desc, - $0.ColorStyle? colorStyle, - $core.bool? isTrash, - }) { - final _result = create(); - if (appId != null) { - _result.appId = appId; - } - if (name != null) { - _result.name = name; - } - if (desc != null) { - _result.desc = desc; - } - if (colorStyle != null) { - _result.colorStyle = colorStyle; - } - if (isTrash != null) { - _result.isTrash = isTrash; - } - return _result; - } - factory UpdateAppRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory UpdateAppRequest.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') - UpdateAppRequest clone() => UpdateAppRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - UpdateAppRequest copyWith(void Function(UpdateAppRequest) updates) => super.copyWith((message) => updates(message as UpdateAppRequest)) as UpdateAppRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static UpdateAppRequest create() => UpdateAppRequest._(); - UpdateAppRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static UpdateAppRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static UpdateAppRequest? _defaultInstance; - - UpdateAppRequest_OneOfName whichOneOfName() => _UpdateAppRequest_OneOfNameByTag[$_whichOneof(0)]!; - void clearOneOfName() => clearField($_whichOneof(0)); - - UpdateAppRequest_OneOfDesc whichOneOfDesc() => _UpdateAppRequest_OneOfDescByTag[$_whichOneof(1)]!; - void clearOneOfDesc() => clearField($_whichOneof(1)); - - UpdateAppRequest_OneOfColorStyle whichOneOfColorStyle() => _UpdateAppRequest_OneOfColorStyleByTag[$_whichOneof(2)]!; - void clearOneOfColorStyle() => clearField($_whichOneof(2)); - - UpdateAppRequest_OneOfIsTrash whichOneOfIsTrash() => _UpdateAppRequest_OneOfIsTrashByTag[$_whichOneof(3)]!; - void clearOneOfIsTrash() => clearField($_whichOneof(3)); - - @$pb.TagNumber(1) - $core.String get appId => $_getSZ(0); - @$pb.TagNumber(1) - set appId($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasAppId() => $_has(0); - @$pb.TagNumber(1) - void clearAppId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get name => $_getSZ(1); - @$pb.TagNumber(2) - set name($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasName() => $_has(1); - @$pb.TagNumber(2) - void clearName() => clearField(2); - - @$pb.TagNumber(3) - $core.String get desc => $_getSZ(2); - @$pb.TagNumber(3) - set desc($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasDesc() => $_has(2); - @$pb.TagNumber(3) - void clearDesc() => clearField(3); - - @$pb.TagNumber(4) - $0.ColorStyle get colorStyle => $_getN(3); - @$pb.TagNumber(4) - set colorStyle($0.ColorStyle v) { setField(4, v); } - @$pb.TagNumber(4) - $core.bool hasColorStyle() => $_has(3); - @$pb.TagNumber(4) - void clearColorStyle() => clearField(4); - @$pb.TagNumber(4) - $0.ColorStyle ensureColorStyle() => $_ensure(3); - - @$pb.TagNumber(5) - $core.bool get isTrash => $_getBF(4); - @$pb.TagNumber(5) - set isTrash($core.bool v) { $_setBool(4, v); } - @$pb.TagNumber(5) - $core.bool hasIsTrash() => $_has(4); - @$pb.TagNumber(5) - void clearIsTrash() => clearField(5); -} - -enum UpdateAppParams_OneOfName { - name, - notSet -} - -enum UpdateAppParams_OneOfDesc { - desc, - notSet -} - -enum UpdateAppParams_OneOfColorStyle { - colorStyle, - notSet -} - -enum UpdateAppParams_OneOfIsTrash { - isTrash, - notSet -} - -class UpdateAppParams extends $pb.GeneratedMessage { - static const $core.Map<$core.int, UpdateAppParams_OneOfName> _UpdateAppParams_OneOfNameByTag = { - 2 : UpdateAppParams_OneOfName.name, - 0 : UpdateAppParams_OneOfName.notSet - }; - static const $core.Map<$core.int, UpdateAppParams_OneOfDesc> _UpdateAppParams_OneOfDescByTag = { - 3 : UpdateAppParams_OneOfDesc.desc, - 0 : UpdateAppParams_OneOfDesc.notSet - }; - static const $core.Map<$core.int, UpdateAppParams_OneOfColorStyle> _UpdateAppParams_OneOfColorStyleByTag = { - 4 : UpdateAppParams_OneOfColorStyle.colorStyle, - 0 : UpdateAppParams_OneOfColorStyle.notSet - }; - static const $core.Map<$core.int, UpdateAppParams_OneOfIsTrash> _UpdateAppParams_OneOfIsTrashByTag = { - 5 : UpdateAppParams_OneOfIsTrash.isTrash, - 0 : UpdateAppParams_OneOfIsTrash.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateAppParams', createEmptyInstance: create) - ..oo(0, [2]) - ..oo(1, [3]) - ..oo(2, [4]) - ..oo(3, [5]) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'appId') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') - ..aOM<$0.ColorStyle>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'colorStyle', subBuilder: $0.ColorStyle.create) - ..aOB(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isTrash') - ..hasRequiredFields = false - ; - - UpdateAppParams._() : super(); - factory UpdateAppParams({ - $core.String? appId, - $core.String? name, - $core.String? desc, - $0.ColorStyle? colorStyle, - $core.bool? isTrash, - }) { - final _result = create(); - if (appId != null) { - _result.appId = appId; - } - if (name != null) { - _result.name = name; - } - if (desc != null) { - _result.desc = desc; - } - if (colorStyle != null) { - _result.colorStyle = colorStyle; - } - if (isTrash != null) { - _result.isTrash = isTrash; - } - return _result; - } - factory UpdateAppParams.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory UpdateAppParams.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') - UpdateAppParams clone() => UpdateAppParams()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - UpdateAppParams copyWith(void Function(UpdateAppParams) updates) => super.copyWith((message) => updates(message as UpdateAppParams)) as UpdateAppParams; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static UpdateAppParams create() => UpdateAppParams._(); - UpdateAppParams createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static UpdateAppParams getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static UpdateAppParams? _defaultInstance; - - UpdateAppParams_OneOfName whichOneOfName() => _UpdateAppParams_OneOfNameByTag[$_whichOneof(0)]!; - void clearOneOfName() => clearField($_whichOneof(0)); - - UpdateAppParams_OneOfDesc whichOneOfDesc() => _UpdateAppParams_OneOfDescByTag[$_whichOneof(1)]!; - void clearOneOfDesc() => clearField($_whichOneof(1)); - - UpdateAppParams_OneOfColorStyle whichOneOfColorStyle() => _UpdateAppParams_OneOfColorStyleByTag[$_whichOneof(2)]!; - void clearOneOfColorStyle() => clearField($_whichOneof(2)); - - UpdateAppParams_OneOfIsTrash whichOneOfIsTrash() => _UpdateAppParams_OneOfIsTrashByTag[$_whichOneof(3)]!; - void clearOneOfIsTrash() => clearField($_whichOneof(3)); - - @$pb.TagNumber(1) - $core.String get appId => $_getSZ(0); - @$pb.TagNumber(1) - set appId($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasAppId() => $_has(0); - @$pb.TagNumber(1) - void clearAppId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get name => $_getSZ(1); - @$pb.TagNumber(2) - set name($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasName() => $_has(1); - @$pb.TagNumber(2) - void clearName() => clearField(2); - - @$pb.TagNumber(3) - $core.String get desc => $_getSZ(2); - @$pb.TagNumber(3) - set desc($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasDesc() => $_has(2); - @$pb.TagNumber(3) - void clearDesc() => clearField(3); - - @$pb.TagNumber(4) - $0.ColorStyle get colorStyle => $_getN(3); - @$pb.TagNumber(4) - set colorStyle($0.ColorStyle v) { setField(4, v); } - @$pb.TagNumber(4) - $core.bool hasColorStyle() => $_has(3); - @$pb.TagNumber(4) - void clearColorStyle() => clearField(4); - @$pb.TagNumber(4) - $0.ColorStyle ensureColorStyle() => $_ensure(3); - - @$pb.TagNumber(5) - $core.bool get isTrash => $_getBF(4); - @$pb.TagNumber(5) - set isTrash($core.bool v) { $_setBool(4, v); } - @$pb.TagNumber(5) - $core.bool hasIsTrash() => $_has(4); - @$pb.TagNumber(5) - void clearIsTrash() => clearField(5); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_update.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_update.pbenum.dart deleted file mode 100644 index 9af158e7ca..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_update.pbenum.dart +++ /dev/null @@ -1,7 +0,0 @@ -/// -// Generated code. Do not modify. -// source: app_update.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-core-data-model/app_update.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_update.pbjson.dart deleted file mode 100644 index 3f5340b5ff..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_update.pbjson.dart +++ /dev/null @@ -1,50 +0,0 @@ -/// -// Generated code. Do not modify. -// source: app_update.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 updateAppRequestDescriptor instead') -const UpdateAppRequest$json = const { - '1': 'UpdateAppRequest', - '2': const [ - const {'1': 'app_id', '3': 1, '4': 1, '5': 9, '10': 'appId'}, - const {'1': 'name', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'name'}, - const {'1': 'desc', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'desc'}, - const {'1': 'color_style', '3': 4, '4': 1, '5': 11, '6': '.ColorStyle', '9': 2, '10': 'colorStyle'}, - const {'1': 'is_trash', '3': 5, '4': 1, '5': 8, '9': 3, '10': 'isTrash'}, - ], - '8': const [ - const {'1': 'one_of_name'}, - const {'1': 'one_of_desc'}, - const {'1': 'one_of_color_style'}, - const {'1': 'one_of_is_trash'}, - ], -}; - -/// Descriptor for `UpdateAppRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List updateAppRequestDescriptor = $convert.base64Decode('ChBVcGRhdGVBcHBSZXF1ZXN0EhUKBmFwcF9pZBgBIAEoCVIFYXBwSWQSFAoEbmFtZRgCIAEoCUgAUgRuYW1lEhQKBGRlc2MYAyABKAlIAVIEZGVzYxIuCgtjb2xvcl9zdHlsZRgEIAEoCzILLkNvbG9yU3R5bGVIAlIKY29sb3JTdHlsZRIbCghpc190cmFzaBgFIAEoCEgDUgdpc1RyYXNoQg0KC29uZV9vZl9uYW1lQg0KC29uZV9vZl9kZXNjQhQKEm9uZV9vZl9jb2xvcl9zdHlsZUIRCg9vbmVfb2ZfaXNfdHJhc2g='); -@$core.Deprecated('Use updateAppParamsDescriptor instead') -const UpdateAppParams$json = const { - '1': 'UpdateAppParams', - '2': const [ - const {'1': 'app_id', '3': 1, '4': 1, '5': 9, '10': 'appId'}, - const {'1': 'name', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'name'}, - const {'1': 'desc', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'desc'}, - const {'1': 'color_style', '3': 4, '4': 1, '5': 11, '6': '.ColorStyle', '9': 2, '10': 'colorStyle'}, - const {'1': 'is_trash', '3': 5, '4': 1, '5': 8, '9': 3, '10': 'isTrash'}, - ], - '8': const [ - const {'1': 'one_of_name'}, - const {'1': 'one_of_desc'}, - const {'1': 'one_of_color_style'}, - const {'1': 'one_of_is_trash'}, - ], -}; - -/// Descriptor for `UpdateAppParams`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List updateAppParamsDescriptor = $convert.base64Decode('Cg9VcGRhdGVBcHBQYXJhbXMSFQoGYXBwX2lkGAEgASgJUgVhcHBJZBIUCgRuYW1lGAIgASgJSABSBG5hbWUSFAoEZGVzYxgDIAEoCUgBUgRkZXNjEi4KC2NvbG9yX3N0eWxlGAQgASgLMgsuQ29sb3JTdHlsZUgCUgpjb2xvclN0eWxlEhsKCGlzX3RyYXNoGAUgASgISANSB2lzVHJhc2hCDQoLb25lX29mX25hbWVCDQoLb25lX29mX2Rlc2NCFAoSb25lX29mX2NvbG9yX3N0eWxlQhEKD29uZV9vZl9pc190cmFzaA=='); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/protobuf.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/protobuf.dart index 01abeaf271..469bda5c99 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/protobuf.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/protobuf.dart @@ -1,14 +1,7 @@ // Auto-generated, do not edit -export './view_update.pb.dart'; -export './workspace_setting.pb.dart'; -export './app_query.pb.dart'; +export './share.pb.dart'; +export './app.pb.dart'; export './errors.pb.dart'; -export './workspace_update.pb.dart'; -export './app_create.pb.dart'; -export './workspace_query.pb.dart'; -export './view_create.pb.dart'; -export './workspace_create.pb.dart'; -export './app_update.pb.dart'; -export './view_query.pb.dart'; -export './trash_create.pb.dart'; -export './export.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-core-data-model/export.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/share.pb.dart similarity index 98% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/export.pb.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/share.pb.dart index 9aa1e297d9..7674639dc3 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/export.pb.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/share.pb.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: export.proto +// source: share.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 @@ -9,9 +9,9 @@ import 'dart:core' as $core; import 'package:protobuf/protobuf.dart' as $pb; -import 'export.pbenum.dart'; +import 'share.pbenum.dart'; -export 'export.pbenum.dart'; +export 'share.pbenum.dart'; class ExportRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ExportRequest', createEmptyInstance: create) diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/export.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/share.pbenum.dart similarity index 97% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/export.pbenum.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/share.pbenum.dart index 011b134883..aa1d037ab7 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/export.pbenum.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/share.pbenum.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: export.proto +// source: share.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-core-data-model/export.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/share.pbjson.dart similarity index 98% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/export.pbjson.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/share.pbjson.dart index 05d7aac4d4..29c16a4733 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/export.pbjson.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/share.pbjson.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: export.proto +// source: share.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 diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_query.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/share.pbserver.dart similarity index 84% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_query.pbserver.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/share.pbserver.dart index 37a06ce563..2fa95db4fe 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_query.pbserver.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/share.pbserver.dart @@ -1,9 +1,9 @@ /// // Generated code. Do not modify. -// source: app_query.proto +// source: share.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 'app_query.pb.dart'; +export 'share.pb.dart'; diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash_create.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash.pb.dart similarity index 99% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash_create.pb.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash.pb.dart index 4db9dd31ce..a84753b86a 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash_create.pb.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash.pb.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: trash_create.proto +// source: trash.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 @@ -10,9 +10,9 @@ import 'dart:core' as $core; import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; -import 'trash_create.pbenum.dart'; +import 'trash.pbenum.dart'; -export 'trash_create.pbenum.dart'; +export 'trash.pbenum.dart'; class RepeatedTrashId extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RepeatedTrashId', createEmptyInstance: create) diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash_create.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash.pbenum.dart similarity index 97% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash_create.pbenum.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash.pbenum.dart index 1f14aadc5d..526e649012 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash_create.pbenum.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash.pbenum.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: trash_create.proto +// source: trash.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-core-data-model/trash_create.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash.pbjson.dart similarity index 99% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash_create.pbjson.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash.pbjson.dart index 24ad0235e9..0e8973a2d6 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash_create.pbjson.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash.pbjson.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: trash_create.proto +// source: trash.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 diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_update.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash.pbserver.dart similarity index 84% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_update.pbserver.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash.pbserver.dart index e3b4a25226..be05fbe149 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_update.pbserver.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash.pbserver.dart @@ -1,9 +1,9 @@ /// // Generated code. Do not modify. -// source: app_update.proto +// source: trash.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 'app_update.pb.dart'; +export 'trash.pb.dart'; diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash_create.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash_create.pbserver.dart deleted file mode 100644 index 459d663489..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/trash_create.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: trash_create.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 'trash_create.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_create.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view.pb.dart similarity index 52% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_create.pb.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view.pb.dart index cb4492bb12..6719facbbe 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_create.pb.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view.pb.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: view_create.proto +// source: view.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 @@ -10,9 +10,211 @@ import 'dart:core' as $core; import 'package:fixnum/fixnum.dart' as $fixnum; import 'package:protobuf/protobuf.dart' as $pb; -import 'view_create.pbenum.dart'; +import 'view.pbenum.dart'; -export 'view_create.pbenum.dart'; +export 'view.pbenum.dart'; + +class View extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'View', 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(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'viewType', $pb.PbFieldType.OE, defaultOrMaker: ViewType.Blank, valueOf: ViewType.valueOf, enumValues: ViewType.values) + ..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'version') + ..aOM(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'belongings', subBuilder: RepeatedView.create) + ..aInt64(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'modifiedTime') + ..aInt64(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'createTime') + ..hasRequiredFields = false + ; + + View._() : super(); + factory View({ + $core.String? id, + $core.String? belongToId, + $core.String? name, + $core.String? desc, + ViewType? viewType, + $fixnum.Int64? version, + RepeatedView? belongings, + $fixnum.Int64? modifiedTime, + $fixnum.Int64? createTime, + }) { + 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 (viewType != null) { + _result.viewType = viewType; + } + if (version != null) { + _result.version = version; + } + if (belongings != null) { + _result.belongings = belongings; + } + if (modifiedTime != null) { + _result.modifiedTime = modifiedTime; + } + if (createTime != null) { + _result.createTime = createTime; + } + return _result; + } + factory View.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory View.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') + View clone() => View()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + View copyWith(void Function(View) updates) => super.copyWith((message) => updates(message as View)) as View; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static View create() => View._(); + View createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static View getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static View? _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) + ViewType get viewType => $_getN(4); + @$pb.TagNumber(5) + set viewType(ViewType v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasViewType() => $_has(4); + @$pb.TagNumber(5) + void clearViewType() => clearField(5); + + @$pb.TagNumber(6) + $fixnum.Int64 get version => $_getI64(5); + @$pb.TagNumber(6) + set version($fixnum.Int64 v) { $_setInt64(5, v); } + @$pb.TagNumber(6) + $core.bool hasVersion() => $_has(5); + @$pb.TagNumber(6) + void clearVersion() => clearField(6); + + @$pb.TagNumber(7) + RepeatedView get belongings => $_getN(6); + @$pb.TagNumber(7) + set belongings(RepeatedView v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasBelongings() => $_has(6); + @$pb.TagNumber(7) + void clearBelongings() => clearField(7); + @$pb.TagNumber(7) + RepeatedView ensureBelongings() => $_ensure(6); + + @$pb.TagNumber(8) + $fixnum.Int64 get modifiedTime => $_getI64(7); + @$pb.TagNumber(8) + set modifiedTime($fixnum.Int64 v) { $_setInt64(7, v); } + @$pb.TagNumber(8) + $core.bool hasModifiedTime() => $_has(7); + @$pb.TagNumber(8) + void clearModifiedTime() => clearField(8); + + @$pb.TagNumber(9) + $fixnum.Int64 get createTime => $_getI64(8); + @$pb.TagNumber(9) + set createTime($fixnum.Int64 v) { $_setInt64(8, v); } + @$pb.TagNumber(9) + $core.bool hasCreateTime() => $_has(8); + @$pb.TagNumber(9) + void clearCreateTime() => clearField(9); +} + +class RepeatedView extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RepeatedView', createEmptyInstance: create) + ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'items', $pb.PbFieldType.PM, subBuilder: View.create) + ..hasRequiredFields = false + ; + + RepeatedView._() : super(); + factory RepeatedView({ + $core.Iterable? items, + }) { + final _result = create(); + if (items != null) { + _result.items.addAll(items); + } + 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); + @$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); + @$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 + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static RepeatedView create() => RepeatedView._(); + RepeatedView createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RepeatedView getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RepeatedView? _defaultInstance; + + @$pb.TagNumber(1) + $core.List get items => $_getList(0); +} enum CreateViewRequest_OneOfThumbnail { thumbnail, @@ -261,176 +463,103 @@ class CreateViewParams extends $pb.GeneratedMessage { void clearViewId() => clearField(7); } -class View extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'View', 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(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'viewType', $pb.PbFieldType.OE, defaultOrMaker: ViewType.Blank, valueOf: ViewType.valueOf, enumValues: ViewType.values) - ..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'version') - ..aOM(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'belongings', subBuilder: RepeatedView.create) - ..aInt64(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'modifiedTime') - ..aInt64(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'createTime') +class QueryViewRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'QueryViewRequest', createEmptyInstance: create) + ..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'viewIds') ..hasRequiredFields = false ; - View._() : super(); - factory View({ - $core.String? id, - $core.String? belongToId, - $core.String? name, - $core.String? desc, - ViewType? viewType, - $fixnum.Int64? version, - RepeatedView? belongings, - $fixnum.Int64? modifiedTime, - $fixnum.Int64? createTime, + QueryViewRequest._() : super(); + factory QueryViewRequest({ + $core.Iterable<$core.String>? viewIds, }) { 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 (viewType != null) { - _result.viewType = viewType; - } - if (version != null) { - _result.version = version; - } - if (belongings != null) { - _result.belongings = belongings; - } - if (modifiedTime != null) { - _result.modifiedTime = modifiedTime; - } - if (createTime != null) { - _result.createTime = createTime; + if (viewIds != null) { + _result.viewIds.addAll(viewIds); } return _result; } - factory View.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory View.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + factory QueryViewRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory QueryViewRequest.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') - View clone() => View()..mergeFromMessage(this); + QueryViewRequest clone() => QueryViewRequest()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - View copyWith(void Function(View) updates) => super.copyWith((message) => updates(message as View)) as View; // ignore: deprecated_member_use + QueryViewRequest copyWith(void Function(QueryViewRequest) updates) => super.copyWith((message) => updates(message as QueryViewRequest)) as QueryViewRequest; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static View create() => View._(); - View createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static QueryViewRequest create() => QueryViewRequest._(); + QueryViewRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static View getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static View? _defaultInstance; + static QueryViewRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static QueryViewRequest? _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) - ViewType get viewType => $_getN(4); - @$pb.TagNumber(5) - set viewType(ViewType v) { setField(5, v); } - @$pb.TagNumber(5) - $core.bool hasViewType() => $_has(4); - @$pb.TagNumber(5) - void clearViewType() => clearField(5); - - @$pb.TagNumber(6) - $fixnum.Int64 get version => $_getI64(5); - @$pb.TagNumber(6) - set version($fixnum.Int64 v) { $_setInt64(5, v); } - @$pb.TagNumber(6) - $core.bool hasVersion() => $_has(5); - @$pb.TagNumber(6) - void clearVersion() => clearField(6); - - @$pb.TagNumber(7) - RepeatedView get belongings => $_getN(6); - @$pb.TagNumber(7) - set belongings(RepeatedView v) { setField(7, v); } - @$pb.TagNumber(7) - $core.bool hasBelongings() => $_has(6); - @$pb.TagNumber(7) - void clearBelongings() => clearField(7); - @$pb.TagNumber(7) - RepeatedView ensureBelongings() => $_ensure(6); - - @$pb.TagNumber(8) - $fixnum.Int64 get modifiedTime => $_getI64(7); - @$pb.TagNumber(8) - set modifiedTime($fixnum.Int64 v) { $_setInt64(7, v); } - @$pb.TagNumber(8) - $core.bool hasModifiedTime() => $_has(7); - @$pb.TagNumber(8) - void clearModifiedTime() => clearField(8); - - @$pb.TagNumber(9) - $fixnum.Int64 get createTime => $_getI64(8); - @$pb.TagNumber(9) - set createTime($fixnum.Int64 v) { $_setInt64(8, v); } - @$pb.TagNumber(9) - $core.bool hasCreateTime() => $_has(8); - @$pb.TagNumber(9) - void clearCreateTime() => clearField(9); + $core.List<$core.String> get viewIds => $_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(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'items', $pb.PbFieldType.PM, subBuilder: View.create) +class ViewId extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ViewId', createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'viewId') ..hasRequiredFields = false ; - RepeatedView._() : super(); - factory RepeatedView({ - $core.Iterable? items, + ViewId._() : super(); + factory ViewId({ + $core.String? viewId, + }) { + final _result = create(); + if (viewId != null) { + _result.viewId = viewId; + } + return _result; + } + factory ViewId.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ViewId.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') + ViewId clone() => ViewId()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ViewId copyWith(void Function(ViewId) updates) => super.copyWith((message) => updates(message as ViewId)) as ViewId; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static ViewId create() => ViewId._(); + ViewId createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ViewId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ViewId? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get viewId => $_getSZ(0); + @$pb.TagNumber(1) + set viewId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasViewId() => $_has(0); + @$pb.TagNumber(1) + void clearViewId() => 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) { @@ -438,28 +567,284 @@ 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 createRepeated() => $pb.PbList(); + static RepeatedViewId create() => RepeatedViewId._(); + RepeatedViewId createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static RepeatedView getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RepeatedView? _defaultInstance; + static RepeatedViewId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RepeatedViewId? _defaultInstance; @$pb.TagNumber(1) - $core.List get items => $_getList(0); + $core.List<$core.String> get items => $_getList(0); +} + +enum UpdateViewRequest_OneOfName { + name, + notSet +} + +enum UpdateViewRequest_OneOfDesc { + desc, + notSet +} + +enum UpdateViewRequest_OneOfThumbnail { + thumbnail, + notSet +} + +class UpdateViewRequest extends $pb.GeneratedMessage { + static const $core.Map<$core.int, UpdateViewRequest_OneOfName> _UpdateViewRequest_OneOfNameByTag = { + 2 : UpdateViewRequest_OneOfName.name, + 0 : UpdateViewRequest_OneOfName.notSet + }; + static const $core.Map<$core.int, UpdateViewRequest_OneOfDesc> _UpdateViewRequest_OneOfDescByTag = { + 3 : UpdateViewRequest_OneOfDesc.desc, + 0 : UpdateViewRequest_OneOfDesc.notSet + }; + static const $core.Map<$core.int, UpdateViewRequest_OneOfThumbnail> _UpdateViewRequest_OneOfThumbnailByTag = { + 4 : UpdateViewRequest_OneOfThumbnail.thumbnail, + 0 : UpdateViewRequest_OneOfThumbnail.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateViewRequest', createEmptyInstance: create) + ..oo(0, [2]) + ..oo(1, [3]) + ..oo(2, [4]) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'viewId') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'thumbnail') + ..hasRequiredFields = false + ; + + UpdateViewRequest._() : super(); + factory UpdateViewRequest({ + $core.String? viewId, + $core.String? name, + $core.String? desc, + $core.String? thumbnail, + }) { + final _result = create(); + if (viewId != null) { + _result.viewId = viewId; + } + if (name != null) { + _result.name = name; + } + if (desc != null) { + _result.desc = desc; + } + if (thumbnail != null) { + _result.thumbnail = thumbnail; + } + return _result; + } + factory UpdateViewRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateViewRequest.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') + UpdateViewRequest clone() => UpdateViewRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateViewRequest copyWith(void Function(UpdateViewRequest) updates) => super.copyWith((message) => updates(message as UpdateViewRequest)) as UpdateViewRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static UpdateViewRequest create() => UpdateViewRequest._(); + UpdateViewRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateViewRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateViewRequest? _defaultInstance; + + UpdateViewRequest_OneOfName whichOneOfName() => _UpdateViewRequest_OneOfNameByTag[$_whichOneof(0)]!; + void clearOneOfName() => clearField($_whichOneof(0)); + + UpdateViewRequest_OneOfDesc whichOneOfDesc() => _UpdateViewRequest_OneOfDescByTag[$_whichOneof(1)]!; + void clearOneOfDesc() => clearField($_whichOneof(1)); + + UpdateViewRequest_OneOfThumbnail whichOneOfThumbnail() => _UpdateViewRequest_OneOfThumbnailByTag[$_whichOneof(2)]!; + void clearOneOfThumbnail() => clearField($_whichOneof(2)); + + @$pb.TagNumber(1) + $core.String get viewId => $_getSZ(0); + @$pb.TagNumber(1) + set viewId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasViewId() => $_has(0); + @$pb.TagNumber(1) + void clearViewId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => clearField(2); + + @$pb.TagNumber(3) + $core.String get desc => $_getSZ(2); + @$pb.TagNumber(3) + set desc($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasDesc() => $_has(2); + @$pb.TagNumber(3) + void clearDesc() => clearField(3); + + @$pb.TagNumber(4) + $core.String get thumbnail => $_getSZ(3); + @$pb.TagNumber(4) + set thumbnail($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasThumbnail() => $_has(3); + @$pb.TagNumber(4) + void clearThumbnail() => clearField(4); +} + +enum UpdateViewParams_OneOfName { + name, + notSet +} + +enum UpdateViewParams_OneOfDesc { + desc, + notSet +} + +enum UpdateViewParams_OneOfThumbnail { + thumbnail, + notSet +} + +class UpdateViewParams extends $pb.GeneratedMessage { + static const $core.Map<$core.int, UpdateViewParams_OneOfName> _UpdateViewParams_OneOfNameByTag = { + 2 : UpdateViewParams_OneOfName.name, + 0 : UpdateViewParams_OneOfName.notSet + }; + static const $core.Map<$core.int, UpdateViewParams_OneOfDesc> _UpdateViewParams_OneOfDescByTag = { + 3 : UpdateViewParams_OneOfDesc.desc, + 0 : UpdateViewParams_OneOfDesc.notSet + }; + static const $core.Map<$core.int, UpdateViewParams_OneOfThumbnail> _UpdateViewParams_OneOfThumbnailByTag = { + 4 : UpdateViewParams_OneOfThumbnail.thumbnail, + 0 : UpdateViewParams_OneOfThumbnail.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateViewParams', createEmptyInstance: create) + ..oo(0, [2]) + ..oo(1, [3]) + ..oo(2, [4]) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'viewId') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'thumbnail') + ..hasRequiredFields = false + ; + + UpdateViewParams._() : super(); + factory UpdateViewParams({ + $core.String? viewId, + $core.String? name, + $core.String? desc, + $core.String? thumbnail, + }) { + final _result = create(); + if (viewId != null) { + _result.viewId = viewId; + } + if (name != null) { + _result.name = name; + } + if (desc != null) { + _result.desc = desc; + } + if (thumbnail != null) { + _result.thumbnail = thumbnail; + } + return _result; + } + factory UpdateViewParams.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateViewParams.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') + UpdateViewParams clone() => UpdateViewParams()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateViewParams copyWith(void Function(UpdateViewParams) updates) => super.copyWith((message) => updates(message as UpdateViewParams)) as UpdateViewParams; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static UpdateViewParams create() => UpdateViewParams._(); + UpdateViewParams createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateViewParams getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateViewParams? _defaultInstance; + + UpdateViewParams_OneOfName whichOneOfName() => _UpdateViewParams_OneOfNameByTag[$_whichOneof(0)]!; + void clearOneOfName() => clearField($_whichOneof(0)); + + UpdateViewParams_OneOfDesc whichOneOfDesc() => _UpdateViewParams_OneOfDescByTag[$_whichOneof(1)]!; + void clearOneOfDesc() => clearField($_whichOneof(1)); + + UpdateViewParams_OneOfThumbnail whichOneOfThumbnail() => _UpdateViewParams_OneOfThumbnailByTag[$_whichOneof(2)]!; + void clearOneOfThumbnail() => clearField($_whichOneof(2)); + + @$pb.TagNumber(1) + $core.String get viewId => $_getSZ(0); + @$pb.TagNumber(1) + set viewId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasViewId() => $_has(0); + @$pb.TagNumber(1) + void clearViewId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => clearField(2); + + @$pb.TagNumber(3) + $core.String get desc => $_getSZ(2); + @$pb.TagNumber(3) + set desc($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasDesc() => $_has(2); + @$pb.TagNumber(3) + void clearDesc() => clearField(3); + + @$pb.TagNumber(4) + $core.String get thumbnail => $_getSZ(3); + @$pb.TagNumber(4) + set thumbnail($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasThumbnail() => $_has(3); + @$pb.TagNumber(4) + void clearThumbnail() => clearField(4); } diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_create.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view.pbenum.dart similarity index 97% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_create.pbenum.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view.pbenum.dart index 790a0bd3d1..66b3e7fa16 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_create.pbenum.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view.pbenum.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: view_create.proto +// source: view.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-core-data-model/view_create.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view.pbjson.dart similarity index 59% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_create.pbjson.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view.pbjson.dart index c6c4bc2ea8..91c8dd6fa5 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_create.pbjson.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view.pbjson.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: view_create.proto +// source: view.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 @@ -19,6 +19,34 @@ const ViewType$json = const { /// Descriptor for `ViewType`. Decode as a `google.protobuf.EnumDescriptorProto`. final $typed_data.Uint8List viewTypeDescriptor = $convert.base64Decode('CghWaWV3VHlwZRIJCgVCbGFuaxAAEgcKA0RvYxAB'); +@$core.Deprecated('Use viewDescriptor instead') +const View$json = const { + '1': 'View', + '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': 'view_type', '3': 5, '4': 1, '5': 14, '6': '.ViewType', '10': 'viewType'}, + const {'1': 'version', '3': 6, '4': 1, '5': 3, '10': 'version'}, + const {'1': 'belongings', '3': 7, '4': 1, '5': 11, '6': '.RepeatedView', '10': 'belongings'}, + const {'1': 'modified_time', '3': 8, '4': 1, '5': 3, '10': 'modifiedTime'}, + const {'1': 'create_time', '3': 9, '4': 1, '5': 3, '10': 'createTime'}, + ], +}; + +/// Descriptor for `View`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List viewDescriptor = $convert.base64Decode('CgRWaWV3Eg4KAmlkGAEgASgJUgJpZBIgCgxiZWxvbmdfdG9faWQYAiABKAlSCmJlbG9uZ1RvSWQSEgoEbmFtZRgDIAEoCVIEbmFtZRISCgRkZXNjGAQgASgJUgRkZXNjEiYKCXZpZXdfdHlwZRgFIAEoDjIJLlZpZXdUeXBlUgh2aWV3VHlwZRIYCgd2ZXJzaW9uGAYgASgDUgd2ZXJzaW9uEi0KCmJlbG9uZ2luZ3MYByABKAsyDS5SZXBlYXRlZFZpZXdSCmJlbG9uZ2luZ3MSIwoNbW9kaWZpZWRfdGltZRgIIAEoA1IMbW9kaWZpZWRUaW1lEh8KC2NyZWF0ZV90aW1lGAkgASgDUgpjcmVhdGVUaW1l'); +@$core.Deprecated('Use repeatedViewDescriptor instead') +const RepeatedView$json = const { + '1': 'RepeatedView', + '2': const [ + const {'1': 'items', '3': 1, '4': 3, '5': 11, '6': '.View', '10': 'items'}, + ], +}; + +/// Descriptor for `RepeatedView`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List repeatedViewDescriptor = $convert.base64Decode('CgxSZXBlYXRlZFZpZXcSGwoFaXRlbXMYASADKAsyBS5WaWV3UgVpdGVtcw=='); @$core.Deprecated('Use createViewRequestDescriptor instead') const CreateViewRequest$json = const { '1': 'CreateViewRequest', @@ -52,31 +80,69 @@ const CreateViewParams$json = const { /// Descriptor for `CreateViewParams`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List createViewParamsDescriptor = $convert.base64Decode('ChBDcmVhdGVWaWV3UGFyYW1zEiAKDGJlbG9uZ190b19pZBgBIAEoCVIKYmVsb25nVG9JZBISCgRuYW1lGAIgASgJUgRuYW1lEhIKBGRlc2MYAyABKAlSBGRlc2MSHAoJdGh1bWJuYWlsGAQgASgJUgl0aHVtYm5haWwSJgoJdmlld190eXBlGAUgASgOMgkuVmlld1R5cGVSCHZpZXdUeXBlEhsKCXZpZXdfZGF0YRgGIAEoCVIIdmlld0RhdGESFwoHdmlld19pZBgHIAEoCVIGdmlld0lk'); -@$core.Deprecated('Use viewDescriptor instead') -const View$json = const { - '1': 'View', +@$core.Deprecated('Use queryViewRequestDescriptor instead') +const QueryViewRequest$json = const { + '1': 'QueryViewRequest', '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': 'view_type', '3': 5, '4': 1, '5': 14, '6': '.ViewType', '10': 'viewType'}, - const {'1': 'version', '3': 6, '4': 1, '5': 3, '10': 'version'}, - const {'1': 'belongings', '3': 7, '4': 1, '5': 11, '6': '.RepeatedView', '10': 'belongings'}, - const {'1': 'modified_time', '3': 8, '4': 1, '5': 3, '10': 'modifiedTime'}, - const {'1': 'create_time', '3': 9, '4': 1, '5': 3, '10': 'createTime'}, + const {'1': 'view_ids', '3': 1, '4': 3, '5': 9, '10': 'viewIds'}, ], }; -/// Descriptor for `View`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List viewDescriptor = $convert.base64Decode('CgRWaWV3Eg4KAmlkGAEgASgJUgJpZBIgCgxiZWxvbmdfdG9faWQYAiABKAlSCmJlbG9uZ1RvSWQSEgoEbmFtZRgDIAEoCVIEbmFtZRISCgRkZXNjGAQgASgJUgRkZXNjEiYKCXZpZXdfdHlwZRgFIAEoDjIJLlZpZXdUeXBlUgh2aWV3VHlwZRIYCgd2ZXJzaW9uGAYgASgDUgd2ZXJzaW9uEi0KCmJlbG9uZ2luZ3MYByABKAsyDS5SZXBlYXRlZFZpZXdSCmJlbG9uZ2luZ3MSIwoNbW9kaWZpZWRfdGltZRgIIAEoA1IMbW9kaWZpZWRUaW1lEh8KC2NyZWF0ZV90aW1lGAkgASgDUgpjcmVhdGVUaW1l'); -@$core.Deprecated('Use repeatedViewDescriptor instead') -const RepeatedView$json = const { - '1': 'RepeatedView', +/// Descriptor for `QueryViewRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List queryViewRequestDescriptor = $convert.base64Decode('ChBRdWVyeVZpZXdSZXF1ZXN0EhkKCHZpZXdfaWRzGAEgAygJUgd2aWV3SWRz'); +@$core.Deprecated('Use viewIdDescriptor instead') +const ViewId$json = const { + '1': 'ViewId', '2': const [ - const {'1': 'items', '3': 1, '4': 3, '5': 11, '6': '.View', '10': 'items'}, + const {'1': 'view_id', '3': 1, '4': 1, '5': 9, '10': 'viewId'}, ], }; -/// Descriptor for `RepeatedView`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List repeatedViewDescriptor = $convert.base64Decode('CgxSZXBlYXRlZFZpZXcSGwoFaXRlbXMYASADKAsyBS5WaWV3UgVpdGVtcw=='); +/// Descriptor for `ViewId`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List viewIdDescriptor = $convert.base64Decode('CgZWaWV3SWQSFwoHdmlld19pZBgBIAEoCVIGdmlld0lk'); +@$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 updateViewRequestDescriptor instead') +const UpdateViewRequest$json = const { + '1': 'UpdateViewRequest', + '2': const [ + const {'1': 'view_id', '3': 1, '4': 1, '5': 9, '10': 'viewId'}, + const {'1': 'name', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'name'}, + const {'1': 'desc', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'desc'}, + const {'1': 'thumbnail', '3': 4, '4': 1, '5': 9, '9': 2, '10': 'thumbnail'}, + ], + '8': const [ + const {'1': 'one_of_name'}, + const {'1': 'one_of_desc'}, + const {'1': 'one_of_thumbnail'}, + ], +}; + +/// Descriptor for `UpdateViewRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateViewRequestDescriptor = $convert.base64Decode('ChFVcGRhdGVWaWV3UmVxdWVzdBIXCgd2aWV3X2lkGAEgASgJUgZ2aWV3SWQSFAoEbmFtZRgCIAEoCUgAUgRuYW1lEhQKBGRlc2MYAyABKAlIAVIEZGVzYxIeCgl0aHVtYm5haWwYBCABKAlIAlIJdGh1bWJuYWlsQg0KC29uZV9vZl9uYW1lQg0KC29uZV9vZl9kZXNjQhIKEG9uZV9vZl90aHVtYm5haWw='); +@$core.Deprecated('Use updateViewParamsDescriptor instead') +const UpdateViewParams$json = const { + '1': 'UpdateViewParams', + '2': const [ + const {'1': 'view_id', '3': 1, '4': 1, '5': 9, '10': 'viewId'}, + const {'1': 'name', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'name'}, + const {'1': 'desc', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'desc'}, + const {'1': 'thumbnail', '3': 4, '4': 1, '5': 9, '9': 2, '10': 'thumbnail'}, + ], + '8': const [ + const {'1': 'one_of_name'}, + const {'1': 'one_of_desc'}, + const {'1': 'one_of_thumbnail'}, + ], +}; + +/// Descriptor for `UpdateViewParams`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateViewParamsDescriptor = $convert.base64Decode('ChBVcGRhdGVWaWV3UGFyYW1zEhcKB3ZpZXdfaWQYASABKAlSBnZpZXdJZBIUCgRuYW1lGAIgASgJSABSBG5hbWUSFAoEZGVzYxgDIAEoCUgBUgRkZXNjEh4KCXRodW1ibmFpbBgEIAEoCUgCUgl0aHVtYm5haWxCDQoLb25lX29mX25hbWVCDQoLb25lX29mX2Rlc2NCEgoQb25lX29mX3RodW1ibmFpbA=='); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_create.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view.pbserver.dart similarity index 84% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_create.pbserver.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view.pbserver.dart index 483a2f2667..29ec5ac1d4 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_create.pbserver.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view.pbserver.dart @@ -1,9 +1,9 @@ /// // Generated code. Do not modify. -// source: app_create.proto +// source: view.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 'app_create.pb.dart'; +export 'view.pb.dart'; diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_create.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_create.pbserver.dart deleted file mode 100644 index 8bfbe9d7d2..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_create.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: view_create.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_create.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pb.dart deleted file mode 100644 index bf00d73219..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pb.dart +++ /dev/null @@ -1,140 +0,0 @@ -/// -// Generated code. Do not modify. -// source: view_query.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; - -class QueryViewRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'QueryViewRequest', createEmptyInstance: create) - ..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'viewIds') - ..hasRequiredFields = false - ; - - QueryViewRequest._() : super(); - factory QueryViewRequest({ - $core.Iterable<$core.String>? viewIds, - }) { - final _result = create(); - if (viewIds != null) { - _result.viewIds.addAll(viewIds); - } - return _result; - } - factory QueryViewRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory QueryViewRequest.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') - QueryViewRequest clone() => QueryViewRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - QueryViewRequest copyWith(void Function(QueryViewRequest) updates) => super.copyWith((message) => updates(message as QueryViewRequest)) as QueryViewRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static QueryViewRequest create() => QueryViewRequest._(); - QueryViewRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static QueryViewRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static QueryViewRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.List<$core.String> get viewIds => $_getList(0); -} - -class ViewId extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ViewId', createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'viewId') - ..hasRequiredFields = false - ; - - ViewId._() : super(); - factory ViewId({ - $core.String? viewId, - }) { - final _result = create(); - if (viewId != null) { - _result.viewId = viewId; - } - return _result; - } - factory ViewId.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory ViewId.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') - ViewId clone() => ViewId()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ViewId copyWith(void Function(ViewId) updates) => super.copyWith((message) => updates(message as ViewId)) as ViewId; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static ViewId create() => ViewId._(); - ViewId createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static ViewId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static ViewId? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get viewId => $_getSZ(0); - @$pb.TagNumber(1) - set viewId($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasViewId() => $_has(0); - @$pb.TagNumber(1) - void clearViewId() => 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 createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static RepeatedViewId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RepeatedViewId? _defaultInstance; - - @$pb.TagNumber(1) - $core.List<$core.String> get items => $_getList(0); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pbenum.dart deleted file mode 100644 index 4cb16cfd45..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pbenum.dart +++ /dev/null @@ -1,7 +0,0 @@ -/// -// Generated code. Do not modify. -// source: view_query.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-core-data-model/view_query.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pbjson.dart deleted file mode 100644 index 1da98e004e..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pbjson.dart +++ /dev/null @@ -1,40 +0,0 @@ -/// -// Generated code. Do not modify. -// source: view_query.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 queryViewRequestDescriptor instead') -const QueryViewRequest$json = const { - '1': 'QueryViewRequest', - '2': const [ - const {'1': 'view_ids', '3': 1, '4': 3, '5': 9, '10': 'viewIds'}, - ], -}; - -/// Descriptor for `QueryViewRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List queryViewRequestDescriptor = $convert.base64Decode('ChBRdWVyeVZpZXdSZXF1ZXN0EhkKCHZpZXdfaWRzGAEgAygJUgd2aWV3SWRz'); -@$core.Deprecated('Use viewIdDescriptor instead') -const ViewId$json = const { - '1': 'ViewId', - '2': const [ - const {'1': 'view_id', '3': 1, '4': 1, '5': 9, '10': 'viewId'}, - ], -}; - -/// Descriptor for `ViewId`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List viewIdDescriptor = $convert.base64Decode('CgZWaWV3SWQSFwoHdmlld19pZBgBIAEoCVIGdmlld0lk'); -@$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='); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pbserver.dart deleted file mode 100644 index e57b4ae5ce..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_query.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: view_query.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_query.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pb.dart deleted file mode 100644 index d140281932..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pb.dart +++ /dev/null @@ -1,267 +0,0 @@ -/// -// Generated code. Do not modify. -// source: view_update.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; - -enum UpdateViewRequest_OneOfName { - name, - notSet -} - -enum UpdateViewRequest_OneOfDesc { - desc, - notSet -} - -enum UpdateViewRequest_OneOfThumbnail { - thumbnail, - notSet -} - -class UpdateViewRequest extends $pb.GeneratedMessage { - static const $core.Map<$core.int, UpdateViewRequest_OneOfName> _UpdateViewRequest_OneOfNameByTag = { - 2 : UpdateViewRequest_OneOfName.name, - 0 : UpdateViewRequest_OneOfName.notSet - }; - static const $core.Map<$core.int, UpdateViewRequest_OneOfDesc> _UpdateViewRequest_OneOfDescByTag = { - 3 : UpdateViewRequest_OneOfDesc.desc, - 0 : UpdateViewRequest_OneOfDesc.notSet - }; - static const $core.Map<$core.int, UpdateViewRequest_OneOfThumbnail> _UpdateViewRequest_OneOfThumbnailByTag = { - 4 : UpdateViewRequest_OneOfThumbnail.thumbnail, - 0 : UpdateViewRequest_OneOfThumbnail.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateViewRequest', createEmptyInstance: create) - ..oo(0, [2]) - ..oo(1, [3]) - ..oo(2, [4]) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'viewId') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'thumbnail') - ..hasRequiredFields = false - ; - - UpdateViewRequest._() : super(); - factory UpdateViewRequest({ - $core.String? viewId, - $core.String? name, - $core.String? desc, - $core.String? thumbnail, - }) { - final _result = create(); - if (viewId != null) { - _result.viewId = viewId; - } - if (name != null) { - _result.name = name; - } - if (desc != null) { - _result.desc = desc; - } - if (thumbnail != null) { - _result.thumbnail = thumbnail; - } - return _result; - } - factory UpdateViewRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory UpdateViewRequest.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') - UpdateViewRequest clone() => UpdateViewRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - UpdateViewRequest copyWith(void Function(UpdateViewRequest) updates) => super.copyWith((message) => updates(message as UpdateViewRequest)) as UpdateViewRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static UpdateViewRequest create() => UpdateViewRequest._(); - UpdateViewRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static UpdateViewRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static UpdateViewRequest? _defaultInstance; - - UpdateViewRequest_OneOfName whichOneOfName() => _UpdateViewRequest_OneOfNameByTag[$_whichOneof(0)]!; - void clearOneOfName() => clearField($_whichOneof(0)); - - UpdateViewRequest_OneOfDesc whichOneOfDesc() => _UpdateViewRequest_OneOfDescByTag[$_whichOneof(1)]!; - void clearOneOfDesc() => clearField($_whichOneof(1)); - - UpdateViewRequest_OneOfThumbnail whichOneOfThumbnail() => _UpdateViewRequest_OneOfThumbnailByTag[$_whichOneof(2)]!; - void clearOneOfThumbnail() => clearField($_whichOneof(2)); - - @$pb.TagNumber(1) - $core.String get viewId => $_getSZ(0); - @$pb.TagNumber(1) - set viewId($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasViewId() => $_has(0); - @$pb.TagNumber(1) - void clearViewId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get name => $_getSZ(1); - @$pb.TagNumber(2) - set name($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasName() => $_has(1); - @$pb.TagNumber(2) - void clearName() => clearField(2); - - @$pb.TagNumber(3) - $core.String get desc => $_getSZ(2); - @$pb.TagNumber(3) - set desc($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasDesc() => $_has(2); - @$pb.TagNumber(3) - void clearDesc() => clearField(3); - - @$pb.TagNumber(4) - $core.String get thumbnail => $_getSZ(3); - @$pb.TagNumber(4) - set thumbnail($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasThumbnail() => $_has(3); - @$pb.TagNumber(4) - void clearThumbnail() => clearField(4); -} - -enum UpdateViewParams_OneOfName { - name, - notSet -} - -enum UpdateViewParams_OneOfDesc { - desc, - notSet -} - -enum UpdateViewParams_OneOfThumbnail { - thumbnail, - notSet -} - -class UpdateViewParams extends $pb.GeneratedMessage { - static const $core.Map<$core.int, UpdateViewParams_OneOfName> _UpdateViewParams_OneOfNameByTag = { - 2 : UpdateViewParams_OneOfName.name, - 0 : UpdateViewParams_OneOfName.notSet - }; - static const $core.Map<$core.int, UpdateViewParams_OneOfDesc> _UpdateViewParams_OneOfDescByTag = { - 3 : UpdateViewParams_OneOfDesc.desc, - 0 : UpdateViewParams_OneOfDesc.notSet - }; - static const $core.Map<$core.int, UpdateViewParams_OneOfThumbnail> _UpdateViewParams_OneOfThumbnailByTag = { - 4 : UpdateViewParams_OneOfThumbnail.thumbnail, - 0 : UpdateViewParams_OneOfThumbnail.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateViewParams', createEmptyInstance: create) - ..oo(0, [2]) - ..oo(1, [3]) - ..oo(2, [4]) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'viewId') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'thumbnail') - ..hasRequiredFields = false - ; - - UpdateViewParams._() : super(); - factory UpdateViewParams({ - $core.String? viewId, - $core.String? name, - $core.String? desc, - $core.String? thumbnail, - }) { - final _result = create(); - if (viewId != null) { - _result.viewId = viewId; - } - if (name != null) { - _result.name = name; - } - if (desc != null) { - _result.desc = desc; - } - if (thumbnail != null) { - _result.thumbnail = thumbnail; - } - return _result; - } - factory UpdateViewParams.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory UpdateViewParams.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') - UpdateViewParams clone() => UpdateViewParams()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - UpdateViewParams copyWith(void Function(UpdateViewParams) updates) => super.copyWith((message) => updates(message as UpdateViewParams)) as UpdateViewParams; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static UpdateViewParams create() => UpdateViewParams._(); - UpdateViewParams createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static UpdateViewParams getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static UpdateViewParams? _defaultInstance; - - UpdateViewParams_OneOfName whichOneOfName() => _UpdateViewParams_OneOfNameByTag[$_whichOneof(0)]!; - void clearOneOfName() => clearField($_whichOneof(0)); - - UpdateViewParams_OneOfDesc whichOneOfDesc() => _UpdateViewParams_OneOfDescByTag[$_whichOneof(1)]!; - void clearOneOfDesc() => clearField($_whichOneof(1)); - - UpdateViewParams_OneOfThumbnail whichOneOfThumbnail() => _UpdateViewParams_OneOfThumbnailByTag[$_whichOneof(2)]!; - void clearOneOfThumbnail() => clearField($_whichOneof(2)); - - @$pb.TagNumber(1) - $core.String get viewId => $_getSZ(0); - @$pb.TagNumber(1) - set viewId($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasViewId() => $_has(0); - @$pb.TagNumber(1) - void clearViewId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get name => $_getSZ(1); - @$pb.TagNumber(2) - set name($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasName() => $_has(1); - @$pb.TagNumber(2) - void clearName() => clearField(2); - - @$pb.TagNumber(3) - $core.String get desc => $_getSZ(2); - @$pb.TagNumber(3) - set desc($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasDesc() => $_has(2); - @$pb.TagNumber(3) - void clearDesc() => clearField(3); - - @$pb.TagNumber(4) - $core.String get thumbnail => $_getSZ(3); - @$pb.TagNumber(4) - set thumbnail($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasThumbnail() => $_has(3); - @$pb.TagNumber(4) - void clearThumbnail() => clearField(4); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pbenum.dart deleted file mode 100644 index 490fe8aa67..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pbenum.dart +++ /dev/null @@ -1,7 +0,0 @@ -/// -// Generated code. Do not modify. -// source: view_update.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-core-data-model/view_update.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pbjson.dart deleted file mode 100644 index 4114b5cc79..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pbjson.dart +++ /dev/null @@ -1,46 +0,0 @@ -/// -// Generated code. Do not modify. -// source: view_update.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 updateViewRequestDescriptor instead') -const UpdateViewRequest$json = const { - '1': 'UpdateViewRequest', - '2': const [ - const {'1': 'view_id', '3': 1, '4': 1, '5': 9, '10': 'viewId'}, - const {'1': 'name', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'name'}, - const {'1': 'desc', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'desc'}, - const {'1': 'thumbnail', '3': 4, '4': 1, '5': 9, '9': 2, '10': 'thumbnail'}, - ], - '8': const [ - const {'1': 'one_of_name'}, - const {'1': 'one_of_desc'}, - const {'1': 'one_of_thumbnail'}, - ], -}; - -/// Descriptor for `UpdateViewRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List updateViewRequestDescriptor = $convert.base64Decode('ChFVcGRhdGVWaWV3UmVxdWVzdBIXCgd2aWV3X2lkGAEgASgJUgZ2aWV3SWQSFAoEbmFtZRgCIAEoCUgAUgRuYW1lEhQKBGRlc2MYAyABKAlIAVIEZGVzYxIeCgl0aHVtYm5haWwYBCABKAlIAlIJdGh1bWJuYWlsQg0KC29uZV9vZl9uYW1lQg0KC29uZV9vZl9kZXNjQhIKEG9uZV9vZl90aHVtYm5haWw='); -@$core.Deprecated('Use updateViewParamsDescriptor instead') -const UpdateViewParams$json = const { - '1': 'UpdateViewParams', - '2': const [ - const {'1': 'view_id', '3': 1, '4': 1, '5': 9, '10': 'viewId'}, - const {'1': 'name', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'name'}, - const {'1': 'desc', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'desc'}, - const {'1': 'thumbnail', '3': 4, '4': 1, '5': 9, '9': 2, '10': 'thumbnail'}, - ], - '8': const [ - const {'1': 'one_of_name'}, - const {'1': 'one_of_desc'}, - const {'1': 'one_of_thumbnail'}, - ], -}; - -/// Descriptor for `UpdateViewParams`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List updateViewParamsDescriptor = $convert.base64Decode('ChBVcGRhdGVWaWV3UGFyYW1zEhcKB3ZpZXdfaWQYASABKAlSBnZpZXdJZBIUCgRuYW1lGAIgASgJSABSBG5hbWUSFAoEZGVzYxgDIAEoCUgBUgRkZXNjEh4KCXRodW1ibmFpbBgEIAEoCUgCUgl0aHVtYm5haWxCDQoLb25lX29mX25hbWVCDQoLb25lX29mX2Rlc2NCEgoQb25lX29mX3RodW1ibmFpbA=='); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pbserver.dart deleted file mode 100644 index 61e753e6f9..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/view_update.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: view_update.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_update.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace.pb.dart new file mode 100644 index 0000000000..29caef748a --- /dev/null +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace.pb.dart @@ -0,0 +1,697 @@ +/// +// Generated code. Do not modify. +// source: workspace.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:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'app.pb.dart' as $0; +import 'view.pb.dart' as $1; + +class Workspace extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Workspace', createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') + ..aOM<$0.RepeatedApp>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'apps', subBuilder: $0.RepeatedApp.create) + ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'modifiedTime') + ..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'createTime') + ..hasRequiredFields = false + ; + + Workspace._() : super(); + factory Workspace({ + $core.String? id, + $core.String? name, + $core.String? desc, + $0.RepeatedApp? apps, + $fixnum.Int64? modifiedTime, + $fixnum.Int64? createTime, + }) { + final _result = create(); + if (id != null) { + _result.id = id; + } + if (name != null) { + _result.name = name; + } + if (desc != null) { + _result.desc = desc; + } + if (apps != null) { + _result.apps = apps; + } + if (modifiedTime != null) { + _result.modifiedTime = modifiedTime; + } + if (createTime != null) { + _result.createTime = createTime; + } + return _result; + } + factory Workspace.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Workspace.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') + Workspace clone() => Workspace()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Workspace copyWith(void Function(Workspace) updates) => super.copyWith((message) => updates(message as Workspace)) as Workspace; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Workspace create() => Workspace._(); + Workspace createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Workspace getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Workspace? _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 name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => clearField(2); + + @$pb.TagNumber(3) + $core.String get desc => $_getSZ(2); + @$pb.TagNumber(3) + set desc($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasDesc() => $_has(2); + @$pb.TagNumber(3) + void clearDesc() => clearField(3); + + @$pb.TagNumber(4) + $0.RepeatedApp get apps => $_getN(3); + @$pb.TagNumber(4) + set apps($0.RepeatedApp v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasApps() => $_has(3); + @$pb.TagNumber(4) + void clearApps() => clearField(4); + @$pb.TagNumber(4) + $0.RepeatedApp ensureApps() => $_ensure(3); + + @$pb.TagNumber(5) + $fixnum.Int64 get modifiedTime => $_getI64(4); + @$pb.TagNumber(5) + set modifiedTime($fixnum.Int64 v) { $_setInt64(4, v); } + @$pb.TagNumber(5) + $core.bool hasModifiedTime() => $_has(4); + @$pb.TagNumber(5) + void clearModifiedTime() => clearField(5); + + @$pb.TagNumber(6) + $fixnum.Int64 get createTime => $_getI64(5); + @$pb.TagNumber(6) + set createTime($fixnum.Int64 v) { $_setInt64(5, v); } + @$pb.TagNumber(6) + $core.bool hasCreateTime() => $_has(5); + @$pb.TagNumber(6) + void clearCreateTime() => clearField(6); +} + +class RepeatedWorkspace extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RepeatedWorkspace', createEmptyInstance: create) + ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'items', $pb.PbFieldType.PM, subBuilder: Workspace.create) + ..hasRequiredFields = false + ; + + RepeatedWorkspace._() : super(); + factory RepeatedWorkspace({ + $core.Iterable? items, + }) { + final _result = create(); + if (items != null) { + _result.items.addAll(items); + } + return _result; + } + factory RepeatedWorkspace.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RepeatedWorkspace.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') + RepeatedWorkspace clone() => RepeatedWorkspace()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RepeatedWorkspace copyWith(void Function(RepeatedWorkspace) updates) => super.copyWith((message) => updates(message as RepeatedWorkspace)) as RepeatedWorkspace; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static RepeatedWorkspace create() => RepeatedWorkspace._(); + RepeatedWorkspace createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RepeatedWorkspace getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RepeatedWorkspace? _defaultInstance; + + @$pb.TagNumber(1) + $core.List get items => $_getList(0); +} + +class CreateWorkspaceRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateWorkspaceRequest', createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') + ..hasRequiredFields = false + ; + + CreateWorkspaceRequest._() : super(); + factory CreateWorkspaceRequest({ + $core.String? name, + $core.String? desc, + }) { + final _result = create(); + if (name != null) { + _result.name = name; + } + if (desc != null) { + _result.desc = desc; + } + return _result; + } + factory CreateWorkspaceRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateWorkspaceRequest.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') + CreateWorkspaceRequest clone() => CreateWorkspaceRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateWorkspaceRequest copyWith(void Function(CreateWorkspaceRequest) updates) => super.copyWith((message) => updates(message as CreateWorkspaceRequest)) as CreateWorkspaceRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static CreateWorkspaceRequest create() => CreateWorkspaceRequest._(); + CreateWorkspaceRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateWorkspaceRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateWorkspaceRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + @$pb.TagNumber(2) + $core.String get desc => $_getSZ(1); + @$pb.TagNumber(2) + set desc($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasDesc() => $_has(1); + @$pb.TagNumber(2) + void clearDesc() => clearField(2); +} + +class CreateWorkspaceParams extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateWorkspaceParams', createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') + ..hasRequiredFields = false + ; + + CreateWorkspaceParams._() : super(); + factory CreateWorkspaceParams({ + $core.String? name, + $core.String? desc, + }) { + final _result = create(); + if (name != null) { + _result.name = name; + } + if (desc != null) { + _result.desc = desc; + } + return _result; + } + factory CreateWorkspaceParams.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateWorkspaceParams.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') + CreateWorkspaceParams clone() => CreateWorkspaceParams()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateWorkspaceParams copyWith(void Function(CreateWorkspaceParams) updates) => super.copyWith((message) => updates(message as CreateWorkspaceParams)) as CreateWorkspaceParams; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static CreateWorkspaceParams create() => CreateWorkspaceParams._(); + CreateWorkspaceParams createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateWorkspaceParams getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateWorkspaceParams? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get name => $_getSZ(0); + @$pb.TagNumber(1) + set name($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasName() => $_has(0); + @$pb.TagNumber(1) + void clearName() => clearField(1); + + @$pb.TagNumber(2) + $core.String get desc => $_getSZ(1); + @$pb.TagNumber(2) + set desc($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasDesc() => $_has(1); + @$pb.TagNumber(2) + void clearDesc() => clearField(2); +} + +enum QueryWorkspaceRequest_OneOfWorkspaceId { + workspaceId, + notSet +} + +class QueryWorkspaceRequest extends $pb.GeneratedMessage { + static const $core.Map<$core.int, QueryWorkspaceRequest_OneOfWorkspaceId> _QueryWorkspaceRequest_OneOfWorkspaceIdByTag = { + 1 : QueryWorkspaceRequest_OneOfWorkspaceId.workspaceId, + 0 : QueryWorkspaceRequest_OneOfWorkspaceId.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'QueryWorkspaceRequest', createEmptyInstance: create) + ..oo(0, [1]) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'workspaceId') + ..hasRequiredFields = false + ; + + QueryWorkspaceRequest._() : super(); + factory QueryWorkspaceRequest({ + $core.String? workspaceId, + }) { + final _result = create(); + if (workspaceId != null) { + _result.workspaceId = workspaceId; + } + return _result; + } + factory QueryWorkspaceRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory QueryWorkspaceRequest.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') + QueryWorkspaceRequest clone() => QueryWorkspaceRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + QueryWorkspaceRequest copyWith(void Function(QueryWorkspaceRequest) updates) => super.copyWith((message) => updates(message as QueryWorkspaceRequest)) as QueryWorkspaceRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static QueryWorkspaceRequest create() => QueryWorkspaceRequest._(); + QueryWorkspaceRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static QueryWorkspaceRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static QueryWorkspaceRequest? _defaultInstance; + + QueryWorkspaceRequest_OneOfWorkspaceId whichOneOfWorkspaceId() => _QueryWorkspaceRequest_OneOfWorkspaceIdByTag[$_whichOneof(0)]!; + void clearOneOfWorkspaceId() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + $core.String get workspaceId => $_getSZ(0); + @$pb.TagNumber(1) + set workspaceId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWorkspaceId() => $_has(0); + @$pb.TagNumber(1) + void clearWorkspaceId() => clearField(1); +} + +enum WorkspaceId_OneOfWorkspaceId { + workspaceId, + notSet +} + +class WorkspaceId extends $pb.GeneratedMessage { + static const $core.Map<$core.int, WorkspaceId_OneOfWorkspaceId> _WorkspaceId_OneOfWorkspaceIdByTag = { + 1 : WorkspaceId_OneOfWorkspaceId.workspaceId, + 0 : WorkspaceId_OneOfWorkspaceId.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'WorkspaceId', createEmptyInstance: create) + ..oo(0, [1]) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'workspaceId') + ..hasRequiredFields = false + ; + + WorkspaceId._() : super(); + factory WorkspaceId({ + $core.String? workspaceId, + }) { + final _result = create(); + if (workspaceId != null) { + _result.workspaceId = workspaceId; + } + return _result; + } + factory WorkspaceId.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory WorkspaceId.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') + WorkspaceId clone() => WorkspaceId()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + WorkspaceId copyWith(void Function(WorkspaceId) updates) => super.copyWith((message) => updates(message as WorkspaceId)) as WorkspaceId; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static WorkspaceId create() => WorkspaceId._(); + WorkspaceId createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static WorkspaceId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static WorkspaceId? _defaultInstance; + + WorkspaceId_OneOfWorkspaceId whichOneOfWorkspaceId() => _WorkspaceId_OneOfWorkspaceIdByTag[$_whichOneof(0)]!; + void clearOneOfWorkspaceId() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + $core.String get workspaceId => $_getSZ(0); + @$pb.TagNumber(1) + set workspaceId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWorkspaceId() => $_has(0); + @$pb.TagNumber(1) + void clearWorkspaceId() => clearField(1); +} + +enum CurrentWorkspaceSetting_OneOfLatestView { + latestView, + notSet +} + +class CurrentWorkspaceSetting extends $pb.GeneratedMessage { + static const $core.Map<$core.int, CurrentWorkspaceSetting_OneOfLatestView> _CurrentWorkspaceSetting_OneOfLatestViewByTag = { + 2 : CurrentWorkspaceSetting_OneOfLatestView.latestView, + 0 : CurrentWorkspaceSetting_OneOfLatestView.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CurrentWorkspaceSetting', createEmptyInstance: create) + ..oo(0, [2]) + ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'workspace', subBuilder: Workspace.create) + ..aOM<$1.View>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'latestView', subBuilder: $1.View.create) + ..hasRequiredFields = false + ; + + CurrentWorkspaceSetting._() : super(); + factory CurrentWorkspaceSetting({ + Workspace? workspace, + $1.View? latestView, + }) { + final _result = create(); + if (workspace != null) { + _result.workspace = workspace; + } + if (latestView != null) { + _result.latestView = latestView; + } + return _result; + } + factory CurrentWorkspaceSetting.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CurrentWorkspaceSetting.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') + CurrentWorkspaceSetting clone() => CurrentWorkspaceSetting()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CurrentWorkspaceSetting copyWith(void Function(CurrentWorkspaceSetting) updates) => super.copyWith((message) => updates(message as CurrentWorkspaceSetting)) as CurrentWorkspaceSetting; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static CurrentWorkspaceSetting create() => CurrentWorkspaceSetting._(); + CurrentWorkspaceSetting createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CurrentWorkspaceSetting getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CurrentWorkspaceSetting? _defaultInstance; + + CurrentWorkspaceSetting_OneOfLatestView whichOneOfLatestView() => _CurrentWorkspaceSetting_OneOfLatestViewByTag[$_whichOneof(0)]!; + void clearOneOfLatestView() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + Workspace get workspace => $_getN(0); + @$pb.TagNumber(1) + set workspace(Workspace v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasWorkspace() => $_has(0); + @$pb.TagNumber(1) + void clearWorkspace() => clearField(1); + @$pb.TagNumber(1) + Workspace ensureWorkspace() => $_ensure(0); + + @$pb.TagNumber(2) + $1.View get latestView => $_getN(1); + @$pb.TagNumber(2) + set latestView($1.View v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasLatestView() => $_has(1); + @$pb.TagNumber(2) + void clearLatestView() => clearField(2); + @$pb.TagNumber(2) + $1.View ensureLatestView() => $_ensure(1); +} + +enum UpdateWorkspaceRequest_OneOfName { + name, + notSet +} + +enum UpdateWorkspaceRequest_OneOfDesc { + desc, + notSet +} + +class UpdateWorkspaceRequest extends $pb.GeneratedMessage { + static const $core.Map<$core.int, UpdateWorkspaceRequest_OneOfName> _UpdateWorkspaceRequest_OneOfNameByTag = { + 2 : UpdateWorkspaceRequest_OneOfName.name, + 0 : UpdateWorkspaceRequest_OneOfName.notSet + }; + static const $core.Map<$core.int, UpdateWorkspaceRequest_OneOfDesc> _UpdateWorkspaceRequest_OneOfDescByTag = { + 3 : UpdateWorkspaceRequest_OneOfDesc.desc, + 0 : UpdateWorkspaceRequest_OneOfDesc.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateWorkspaceRequest', createEmptyInstance: create) + ..oo(0, [2]) + ..oo(1, [3]) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') + ..hasRequiredFields = false + ; + + UpdateWorkspaceRequest._() : super(); + factory UpdateWorkspaceRequest({ + $core.String? id, + $core.String? name, + $core.String? desc, + }) { + final _result = create(); + if (id != null) { + _result.id = id; + } + if (name != null) { + _result.name = name; + } + if (desc != null) { + _result.desc = desc; + } + return _result; + } + factory UpdateWorkspaceRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateWorkspaceRequest.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') + UpdateWorkspaceRequest clone() => UpdateWorkspaceRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateWorkspaceRequest copyWith(void Function(UpdateWorkspaceRequest) updates) => super.copyWith((message) => updates(message as UpdateWorkspaceRequest)) as UpdateWorkspaceRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static UpdateWorkspaceRequest create() => UpdateWorkspaceRequest._(); + UpdateWorkspaceRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateWorkspaceRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateWorkspaceRequest? _defaultInstance; + + UpdateWorkspaceRequest_OneOfName whichOneOfName() => _UpdateWorkspaceRequest_OneOfNameByTag[$_whichOneof(0)]!; + void clearOneOfName() => clearField($_whichOneof(0)); + + UpdateWorkspaceRequest_OneOfDesc whichOneOfDesc() => _UpdateWorkspaceRequest_OneOfDescByTag[$_whichOneof(1)]!; + void clearOneOfDesc() => clearField($_whichOneof(1)); + + @$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 name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => clearField(2); + + @$pb.TagNumber(3) + $core.String get desc => $_getSZ(2); + @$pb.TagNumber(3) + set desc($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasDesc() => $_has(2); + @$pb.TagNumber(3) + void clearDesc() => clearField(3); +} + +enum UpdateWorkspaceParams_OneOfName { + name, + notSet +} + +enum UpdateWorkspaceParams_OneOfDesc { + desc, + notSet +} + +class UpdateWorkspaceParams extends $pb.GeneratedMessage { + static const $core.Map<$core.int, UpdateWorkspaceParams_OneOfName> _UpdateWorkspaceParams_OneOfNameByTag = { + 2 : UpdateWorkspaceParams_OneOfName.name, + 0 : UpdateWorkspaceParams_OneOfName.notSet + }; + static const $core.Map<$core.int, UpdateWorkspaceParams_OneOfDesc> _UpdateWorkspaceParams_OneOfDescByTag = { + 3 : UpdateWorkspaceParams_OneOfDesc.desc, + 0 : UpdateWorkspaceParams_OneOfDesc.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateWorkspaceParams', createEmptyInstance: create) + ..oo(0, [2]) + ..oo(1, [3]) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') + ..hasRequiredFields = false + ; + + UpdateWorkspaceParams._() : super(); + factory UpdateWorkspaceParams({ + $core.String? id, + $core.String? name, + $core.String? desc, + }) { + final _result = create(); + if (id != null) { + _result.id = id; + } + if (name != null) { + _result.name = name; + } + if (desc != null) { + _result.desc = desc; + } + return _result; + } + factory UpdateWorkspaceParams.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UpdateWorkspaceParams.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') + UpdateWorkspaceParams clone() => UpdateWorkspaceParams()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UpdateWorkspaceParams copyWith(void Function(UpdateWorkspaceParams) updates) => super.copyWith((message) => updates(message as UpdateWorkspaceParams)) as UpdateWorkspaceParams; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static UpdateWorkspaceParams create() => UpdateWorkspaceParams._(); + UpdateWorkspaceParams createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UpdateWorkspaceParams getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UpdateWorkspaceParams? _defaultInstance; + + UpdateWorkspaceParams_OneOfName whichOneOfName() => _UpdateWorkspaceParams_OneOfNameByTag[$_whichOneof(0)]!; + void clearOneOfName() => clearField($_whichOneof(0)); + + UpdateWorkspaceParams_OneOfDesc whichOneOfDesc() => _UpdateWorkspaceParams_OneOfDescByTag[$_whichOneof(1)]!; + void clearOneOfDesc() => clearField($_whichOneof(1)); + + @$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 name => $_getSZ(1); + @$pb.TagNumber(2) + set name($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasName() => $_has(1); + @$pb.TagNumber(2) + void clearName() => clearField(2); + + @$pb.TagNumber(3) + $core.String get desc => $_getSZ(2); + @$pb.TagNumber(3) + set desc($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasDesc() => $_has(2); + @$pb.TagNumber(3) + void clearDesc() => clearField(3); +} + diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_create.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace.pbenum.dart similarity index 90% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_create.pbenum.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace.pbenum.dart index bc2ea229d3..64d77dfbde 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/app_create.pbenum.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace.pbenum.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: app_create.proto +// source: workspace.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-core-data-model/workspace.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace.pbjson.dart new file mode 100644 index 0000000000..ac7b9df609 --- /dev/null +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace.pbjson.dart @@ -0,0 +1,129 @@ +/// +// Generated code. Do not modify. +// source: workspace.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 workspaceDescriptor instead') +const Workspace$json = const { + '1': 'Workspace', + '2': const [ + const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, + const {'1': 'desc', '3': 3, '4': 1, '5': 9, '10': 'desc'}, + const {'1': 'apps', '3': 4, '4': 1, '5': 11, '6': '.RepeatedApp', '10': 'apps'}, + const {'1': 'modified_time', '3': 5, '4': 1, '5': 3, '10': 'modifiedTime'}, + const {'1': 'create_time', '3': 6, '4': 1, '5': 3, '10': 'createTime'}, + ], +}; + +/// Descriptor for `Workspace`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List workspaceDescriptor = $convert.base64Decode('CglXb3Jrc3BhY2USDgoCaWQYASABKAlSAmlkEhIKBG5hbWUYAiABKAlSBG5hbWUSEgoEZGVzYxgDIAEoCVIEZGVzYxIgCgRhcHBzGAQgASgLMgwuUmVwZWF0ZWRBcHBSBGFwcHMSIwoNbW9kaWZpZWRfdGltZRgFIAEoA1IMbW9kaWZpZWRUaW1lEh8KC2NyZWF0ZV90aW1lGAYgASgDUgpjcmVhdGVUaW1l'); +@$core.Deprecated('Use repeatedWorkspaceDescriptor instead') +const RepeatedWorkspace$json = const { + '1': 'RepeatedWorkspace', + '2': const [ + const {'1': 'items', '3': 1, '4': 3, '5': 11, '6': '.Workspace', '10': 'items'}, + ], +}; + +/// Descriptor for `RepeatedWorkspace`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List repeatedWorkspaceDescriptor = $convert.base64Decode('ChFSZXBlYXRlZFdvcmtzcGFjZRIgCgVpdGVtcxgBIAMoCzIKLldvcmtzcGFjZVIFaXRlbXM='); +@$core.Deprecated('Use createWorkspaceRequestDescriptor instead') +const CreateWorkspaceRequest$json = const { + '1': 'CreateWorkspaceRequest', + '2': const [ + const {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + const {'1': 'desc', '3': 2, '4': 1, '5': 9, '10': 'desc'}, + ], +}; + +/// Descriptor for `CreateWorkspaceRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createWorkspaceRequestDescriptor = $convert.base64Decode('ChZDcmVhdGVXb3Jrc3BhY2VSZXF1ZXN0EhIKBG5hbWUYASABKAlSBG5hbWUSEgoEZGVzYxgCIAEoCVIEZGVzYw=='); +@$core.Deprecated('Use createWorkspaceParamsDescriptor instead') +const CreateWorkspaceParams$json = const { + '1': 'CreateWorkspaceParams', + '2': const [ + const {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, + const {'1': 'desc', '3': 2, '4': 1, '5': 9, '10': 'desc'}, + ], +}; + +/// Descriptor for `CreateWorkspaceParams`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createWorkspaceParamsDescriptor = $convert.base64Decode('ChVDcmVhdGVXb3Jrc3BhY2VQYXJhbXMSEgoEbmFtZRgBIAEoCVIEbmFtZRISCgRkZXNjGAIgASgJUgRkZXNj'); +@$core.Deprecated('Use queryWorkspaceRequestDescriptor instead') +const QueryWorkspaceRequest$json = const { + '1': 'QueryWorkspaceRequest', + '2': const [ + const {'1': 'workspace_id', '3': 1, '4': 1, '5': 9, '9': 0, '10': 'workspaceId'}, + ], + '8': const [ + const {'1': 'one_of_workspace_id'}, + ], +}; + +/// Descriptor for `QueryWorkspaceRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List queryWorkspaceRequestDescriptor = $convert.base64Decode('ChVRdWVyeVdvcmtzcGFjZVJlcXVlc3QSIwoMd29ya3NwYWNlX2lkGAEgASgJSABSC3dvcmtzcGFjZUlkQhUKE29uZV9vZl93b3Jrc3BhY2VfaWQ='); +@$core.Deprecated('Use workspaceIdDescriptor instead') +const WorkspaceId$json = const { + '1': 'WorkspaceId', + '2': const [ + const {'1': 'workspace_id', '3': 1, '4': 1, '5': 9, '9': 0, '10': 'workspaceId'}, + ], + '8': const [ + const {'1': 'one_of_workspace_id'}, + ], +}; + +/// Descriptor for `WorkspaceId`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List workspaceIdDescriptor = $convert.base64Decode('CgtXb3Jrc3BhY2VJZBIjCgx3b3Jrc3BhY2VfaWQYASABKAlIAFILd29ya3NwYWNlSWRCFQoTb25lX29mX3dvcmtzcGFjZV9pZA=='); +@$core.Deprecated('Use currentWorkspaceSettingDescriptor instead') +const CurrentWorkspaceSetting$json = const { + '1': 'CurrentWorkspaceSetting', + '2': const [ + const {'1': 'workspace', '3': 1, '4': 1, '5': 11, '6': '.Workspace', '10': 'workspace'}, + const {'1': 'latest_view', '3': 2, '4': 1, '5': 11, '6': '.View', '9': 0, '10': 'latestView'}, + ], + '8': const [ + const {'1': 'one_of_latest_view'}, + ], +}; + +/// Descriptor for `CurrentWorkspaceSetting`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List currentWorkspaceSettingDescriptor = $convert.base64Decode('ChdDdXJyZW50V29ya3NwYWNlU2V0dGluZxIoCgl3b3Jrc3BhY2UYASABKAsyCi5Xb3Jrc3BhY2VSCXdvcmtzcGFjZRIoCgtsYXRlc3RfdmlldxgCIAEoCzIFLlZpZXdIAFIKbGF0ZXN0Vmlld0IUChJvbmVfb2ZfbGF0ZXN0X3ZpZXc='); +@$core.Deprecated('Use updateWorkspaceRequestDescriptor instead') +const UpdateWorkspaceRequest$json = const { + '1': 'UpdateWorkspaceRequest', + '2': const [ + const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + const {'1': 'name', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'name'}, + const {'1': 'desc', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'desc'}, + ], + '8': const [ + const {'1': 'one_of_name'}, + const {'1': 'one_of_desc'}, + ], +}; + +/// Descriptor for `UpdateWorkspaceRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateWorkspaceRequestDescriptor = $convert.base64Decode('ChZVcGRhdGVXb3Jrc3BhY2VSZXF1ZXN0Eg4KAmlkGAEgASgJUgJpZBIUCgRuYW1lGAIgASgJSABSBG5hbWUSFAoEZGVzYxgDIAEoCUgBUgRkZXNjQg0KC29uZV9vZl9uYW1lQg0KC29uZV9vZl9kZXNj'); +@$core.Deprecated('Use updateWorkspaceParamsDescriptor instead') +const UpdateWorkspaceParams$json = const { + '1': 'UpdateWorkspaceParams', + '2': const [ + const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + const {'1': 'name', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'name'}, + const {'1': 'desc', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'desc'}, + ], + '8': const [ + const {'1': 'one_of_name'}, + const {'1': 'one_of_desc'}, + ], +}; + +/// Descriptor for `UpdateWorkspaceParams`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List updateWorkspaceParamsDescriptor = $convert.base64Decode('ChVVcGRhdGVXb3Jrc3BhY2VQYXJhbXMSDgoCaWQYASABKAlSAmlkEhQKBG5hbWUYAiABKAlIAFIEbmFtZRIUCgRkZXNjGAMgASgJSAFSBGRlc2NCDQoLb25lX29mX25hbWVCDQoLb25lX29mX2Rlc2M='); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace.pbserver.dart new file mode 100644 index 0000000000..ccfac2fa64 --- /dev/null +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace.pbserver.dart @@ -0,0 +1,9 @@ +/// +// Generated code. Do not modify. +// source: workspace.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 'workspace.pb.dart'; + diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pb.dart deleted file mode 100644 index edca76c0ac..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pb.dart +++ /dev/null @@ -1,296 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_create.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:fixnum/fixnum.dart' as $fixnum; -import 'package:protobuf/protobuf.dart' as $pb; - -import 'app_create.pb.dart' as $0; - -class CreateWorkspaceRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateWorkspaceRequest', createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') - ..hasRequiredFields = false - ; - - CreateWorkspaceRequest._() : super(); - factory CreateWorkspaceRequest({ - $core.String? name, - $core.String? desc, - }) { - final _result = create(); - if (name != null) { - _result.name = name; - } - if (desc != null) { - _result.desc = desc; - } - return _result; - } - factory CreateWorkspaceRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory CreateWorkspaceRequest.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') - CreateWorkspaceRequest clone() => CreateWorkspaceRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - CreateWorkspaceRequest copyWith(void Function(CreateWorkspaceRequest) updates) => super.copyWith((message) => updates(message as CreateWorkspaceRequest)) as CreateWorkspaceRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static CreateWorkspaceRequest create() => CreateWorkspaceRequest._(); - CreateWorkspaceRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static CreateWorkspaceRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CreateWorkspaceRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get name => $_getSZ(0); - @$pb.TagNumber(1) - set name($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasName() => $_has(0); - @$pb.TagNumber(1) - void clearName() => clearField(1); - - @$pb.TagNumber(2) - $core.String get desc => $_getSZ(1); - @$pb.TagNumber(2) - set desc($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasDesc() => $_has(1); - @$pb.TagNumber(2) - void clearDesc() => clearField(2); -} - -class CreateWorkspaceParams extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateWorkspaceParams', createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') - ..hasRequiredFields = false - ; - - CreateWorkspaceParams._() : super(); - factory CreateWorkspaceParams({ - $core.String? name, - $core.String? desc, - }) { - final _result = create(); - if (name != null) { - _result.name = name; - } - if (desc != null) { - _result.desc = desc; - } - return _result; - } - factory CreateWorkspaceParams.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory CreateWorkspaceParams.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') - CreateWorkspaceParams clone() => CreateWorkspaceParams()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - CreateWorkspaceParams copyWith(void Function(CreateWorkspaceParams) updates) => super.copyWith((message) => updates(message as CreateWorkspaceParams)) as CreateWorkspaceParams; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static CreateWorkspaceParams create() => CreateWorkspaceParams._(); - CreateWorkspaceParams createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static CreateWorkspaceParams getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CreateWorkspaceParams? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get name => $_getSZ(0); - @$pb.TagNumber(1) - set name($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasName() => $_has(0); - @$pb.TagNumber(1) - void clearName() => clearField(1); - - @$pb.TagNumber(2) - $core.String get desc => $_getSZ(1); - @$pb.TagNumber(2) - set desc($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasDesc() => $_has(1); - @$pb.TagNumber(2) - void clearDesc() => clearField(2); -} - -class Workspace extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Workspace', createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') - ..aOM<$0.RepeatedApp>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'apps', subBuilder: $0.RepeatedApp.create) - ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'modifiedTime') - ..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'createTime') - ..hasRequiredFields = false - ; - - Workspace._() : super(); - factory Workspace({ - $core.String? id, - $core.String? name, - $core.String? desc, - $0.RepeatedApp? apps, - $fixnum.Int64? modifiedTime, - $fixnum.Int64? createTime, - }) { - final _result = create(); - if (id != null) { - _result.id = id; - } - if (name != null) { - _result.name = name; - } - if (desc != null) { - _result.desc = desc; - } - if (apps != null) { - _result.apps = apps; - } - if (modifiedTime != null) { - _result.modifiedTime = modifiedTime; - } - if (createTime != null) { - _result.createTime = createTime; - } - return _result; - } - factory Workspace.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Workspace.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') - Workspace clone() => Workspace()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Workspace copyWith(void Function(Workspace) updates) => super.copyWith((message) => updates(message as Workspace)) as Workspace; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static Workspace create() => Workspace._(); - Workspace createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static Workspace getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static Workspace? _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 name => $_getSZ(1); - @$pb.TagNumber(2) - set name($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasName() => $_has(1); - @$pb.TagNumber(2) - void clearName() => clearField(2); - - @$pb.TagNumber(3) - $core.String get desc => $_getSZ(2); - @$pb.TagNumber(3) - set desc($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasDesc() => $_has(2); - @$pb.TagNumber(3) - void clearDesc() => clearField(3); - - @$pb.TagNumber(4) - $0.RepeatedApp get apps => $_getN(3); - @$pb.TagNumber(4) - set apps($0.RepeatedApp v) { setField(4, v); } - @$pb.TagNumber(4) - $core.bool hasApps() => $_has(3); - @$pb.TagNumber(4) - void clearApps() => clearField(4); - @$pb.TagNumber(4) - $0.RepeatedApp ensureApps() => $_ensure(3); - - @$pb.TagNumber(5) - $fixnum.Int64 get modifiedTime => $_getI64(4); - @$pb.TagNumber(5) - set modifiedTime($fixnum.Int64 v) { $_setInt64(4, v); } - @$pb.TagNumber(5) - $core.bool hasModifiedTime() => $_has(4); - @$pb.TagNumber(5) - void clearModifiedTime() => clearField(5); - - @$pb.TagNumber(6) - $fixnum.Int64 get createTime => $_getI64(5); - @$pb.TagNumber(6) - set createTime($fixnum.Int64 v) { $_setInt64(5, v); } - @$pb.TagNumber(6) - $core.bool hasCreateTime() => $_has(5); - @$pb.TagNumber(6) - void clearCreateTime() => clearField(6); -} - -class RepeatedWorkspace extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RepeatedWorkspace', createEmptyInstance: create) - ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'items', $pb.PbFieldType.PM, subBuilder: Workspace.create) - ..hasRequiredFields = false - ; - - RepeatedWorkspace._() : super(); - factory RepeatedWorkspace({ - $core.Iterable? items, - }) { - final _result = create(); - if (items != null) { - _result.items.addAll(items); - } - return _result; - } - factory RepeatedWorkspace.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory RepeatedWorkspace.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') - RepeatedWorkspace clone() => RepeatedWorkspace()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - RepeatedWorkspace copyWith(void Function(RepeatedWorkspace) updates) => super.copyWith((message) => updates(message as RepeatedWorkspace)) as RepeatedWorkspace; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static RepeatedWorkspace create() => RepeatedWorkspace._(); - RepeatedWorkspace createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static RepeatedWorkspace getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RepeatedWorkspace? _defaultInstance; - - @$pb.TagNumber(1) - $core.List get items => $_getList(0); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pbenum.dart deleted file mode 100644 index 9dece8fe1f..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pbenum.dart +++ /dev/null @@ -1,7 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_create.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-core-data-model/workspace_create.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pbjson.dart deleted file mode 100644 index acd631ec4b..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pbjson.dart +++ /dev/null @@ -1,57 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_create.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 createWorkspaceRequestDescriptor instead') -const CreateWorkspaceRequest$json = const { - '1': 'CreateWorkspaceRequest', - '2': const [ - const {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, - const {'1': 'desc', '3': 2, '4': 1, '5': 9, '10': 'desc'}, - ], -}; - -/// Descriptor for `CreateWorkspaceRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List createWorkspaceRequestDescriptor = $convert.base64Decode('ChZDcmVhdGVXb3Jrc3BhY2VSZXF1ZXN0EhIKBG5hbWUYASABKAlSBG5hbWUSEgoEZGVzYxgCIAEoCVIEZGVzYw=='); -@$core.Deprecated('Use createWorkspaceParamsDescriptor instead') -const CreateWorkspaceParams$json = const { - '1': 'CreateWorkspaceParams', - '2': const [ - const {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, - const {'1': 'desc', '3': 2, '4': 1, '5': 9, '10': 'desc'}, - ], -}; - -/// Descriptor for `CreateWorkspaceParams`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List createWorkspaceParamsDescriptor = $convert.base64Decode('ChVDcmVhdGVXb3Jrc3BhY2VQYXJhbXMSEgoEbmFtZRgBIAEoCVIEbmFtZRISCgRkZXNjGAIgASgJUgRkZXNj'); -@$core.Deprecated('Use workspaceDescriptor instead') -const Workspace$json = const { - '1': 'Workspace', - '2': const [ - const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, - const {'1': 'desc', '3': 3, '4': 1, '5': 9, '10': 'desc'}, - const {'1': 'apps', '3': 4, '4': 1, '5': 11, '6': '.RepeatedApp', '10': 'apps'}, - const {'1': 'modified_time', '3': 5, '4': 1, '5': 3, '10': 'modifiedTime'}, - const {'1': 'create_time', '3': 6, '4': 1, '5': 3, '10': 'createTime'}, - ], -}; - -/// Descriptor for `Workspace`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List workspaceDescriptor = $convert.base64Decode('CglXb3Jrc3BhY2USDgoCaWQYASABKAlSAmlkEhIKBG5hbWUYAiABKAlSBG5hbWUSEgoEZGVzYxgDIAEoCVIEZGVzYxIgCgRhcHBzGAQgASgLMgwuUmVwZWF0ZWRBcHBSBGFwcHMSIwoNbW9kaWZpZWRfdGltZRgFIAEoA1IMbW9kaWZpZWRUaW1lEh8KC2NyZWF0ZV90aW1lGAYgASgDUgpjcmVhdGVUaW1l'); -@$core.Deprecated('Use repeatedWorkspaceDescriptor instead') -const RepeatedWorkspace$json = const { - '1': 'RepeatedWorkspace', - '2': const [ - const {'1': 'items', '3': 1, '4': 3, '5': 11, '6': '.Workspace', '10': 'items'}, - ], -}; - -/// Descriptor for `RepeatedWorkspace`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List repeatedWorkspaceDescriptor = $convert.base64Decode('ChFSZXBlYXRlZFdvcmtzcGFjZRIgCgVpdGVtcxgBIAMoCzIKLldvcmtzcGFjZVIFaXRlbXM='); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pbserver.dart deleted file mode 100644 index bbec02b337..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_create.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_create.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 'workspace_create.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pb.dart deleted file mode 100644 index f25848e1e7..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pb.dart +++ /dev/null @@ -1,131 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_query.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; - -enum QueryWorkspaceRequest_OneOfWorkspaceId { - workspaceId, - notSet -} - -class QueryWorkspaceRequest extends $pb.GeneratedMessage { - static const $core.Map<$core.int, QueryWorkspaceRequest_OneOfWorkspaceId> _QueryWorkspaceRequest_OneOfWorkspaceIdByTag = { - 1 : QueryWorkspaceRequest_OneOfWorkspaceId.workspaceId, - 0 : QueryWorkspaceRequest_OneOfWorkspaceId.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'QueryWorkspaceRequest', createEmptyInstance: create) - ..oo(0, [1]) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'workspaceId') - ..hasRequiredFields = false - ; - - QueryWorkspaceRequest._() : super(); - factory QueryWorkspaceRequest({ - $core.String? workspaceId, - }) { - final _result = create(); - if (workspaceId != null) { - _result.workspaceId = workspaceId; - } - return _result; - } - factory QueryWorkspaceRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory QueryWorkspaceRequest.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') - QueryWorkspaceRequest clone() => QueryWorkspaceRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - QueryWorkspaceRequest copyWith(void Function(QueryWorkspaceRequest) updates) => super.copyWith((message) => updates(message as QueryWorkspaceRequest)) as QueryWorkspaceRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static QueryWorkspaceRequest create() => QueryWorkspaceRequest._(); - QueryWorkspaceRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static QueryWorkspaceRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static QueryWorkspaceRequest? _defaultInstance; - - QueryWorkspaceRequest_OneOfWorkspaceId whichOneOfWorkspaceId() => _QueryWorkspaceRequest_OneOfWorkspaceIdByTag[$_whichOneof(0)]!; - void clearOneOfWorkspaceId() => clearField($_whichOneof(0)); - - @$pb.TagNumber(1) - $core.String get workspaceId => $_getSZ(0); - @$pb.TagNumber(1) - set workspaceId($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWorkspaceId() => $_has(0); - @$pb.TagNumber(1) - void clearWorkspaceId() => clearField(1); -} - -enum WorkspaceId_OneOfWorkspaceId { - workspaceId, - notSet -} - -class WorkspaceId extends $pb.GeneratedMessage { - static const $core.Map<$core.int, WorkspaceId_OneOfWorkspaceId> _WorkspaceId_OneOfWorkspaceIdByTag = { - 1 : WorkspaceId_OneOfWorkspaceId.workspaceId, - 0 : WorkspaceId_OneOfWorkspaceId.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'WorkspaceId', createEmptyInstance: create) - ..oo(0, [1]) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'workspaceId') - ..hasRequiredFields = false - ; - - WorkspaceId._() : super(); - factory WorkspaceId({ - $core.String? workspaceId, - }) { - final _result = create(); - if (workspaceId != null) { - _result.workspaceId = workspaceId; - } - return _result; - } - factory WorkspaceId.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory WorkspaceId.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') - WorkspaceId clone() => WorkspaceId()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - WorkspaceId copyWith(void Function(WorkspaceId) updates) => super.copyWith((message) => updates(message as WorkspaceId)) as WorkspaceId; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static WorkspaceId create() => WorkspaceId._(); - WorkspaceId createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static WorkspaceId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static WorkspaceId? _defaultInstance; - - WorkspaceId_OneOfWorkspaceId whichOneOfWorkspaceId() => _WorkspaceId_OneOfWorkspaceIdByTag[$_whichOneof(0)]!; - void clearOneOfWorkspaceId() => clearField($_whichOneof(0)); - - @$pb.TagNumber(1) - $core.String get workspaceId => $_getSZ(0); - @$pb.TagNumber(1) - set workspaceId($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWorkspaceId() => $_has(0); - @$pb.TagNumber(1) - void clearWorkspaceId() => clearField(1); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pbenum.dart deleted file mode 100644 index a14731fc1f..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pbenum.dart +++ /dev/null @@ -1,7 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_query.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-core-data-model/workspace_query.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pbjson.dart deleted file mode 100644 index e7011f696b..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pbjson.dart +++ /dev/null @@ -1,36 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_query.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 queryWorkspaceRequestDescriptor instead') -const QueryWorkspaceRequest$json = const { - '1': 'QueryWorkspaceRequest', - '2': const [ - const {'1': 'workspace_id', '3': 1, '4': 1, '5': 9, '9': 0, '10': 'workspaceId'}, - ], - '8': const [ - const {'1': 'one_of_workspace_id'}, - ], -}; - -/// Descriptor for `QueryWorkspaceRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List queryWorkspaceRequestDescriptor = $convert.base64Decode('ChVRdWVyeVdvcmtzcGFjZVJlcXVlc3QSIwoMd29ya3NwYWNlX2lkGAEgASgJSABSC3dvcmtzcGFjZUlkQhUKE29uZV9vZl93b3Jrc3BhY2VfaWQ='); -@$core.Deprecated('Use workspaceIdDescriptor instead') -const WorkspaceId$json = const { - '1': 'WorkspaceId', - '2': const [ - const {'1': 'workspace_id', '3': 1, '4': 1, '5': 9, '9': 0, '10': 'workspaceId'}, - ], - '8': const [ - const {'1': 'one_of_workspace_id'}, - ], -}; - -/// Descriptor for `WorkspaceId`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List workspaceIdDescriptor = $convert.base64Decode('CgtXb3Jrc3BhY2VJZBIjCgx3b3Jrc3BhY2VfaWQYASABKAlIAFILd29ya3NwYWNlSWRCFQoTb25lX29mX3dvcmtzcGFjZV9pZA=='); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pbserver.dart deleted file mode 100644 index e79a538647..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_query.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_query.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 'workspace_query.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pb.dart deleted file mode 100644 index 32f678bca5..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pb.dart +++ /dev/null @@ -1,92 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_setting.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 'workspace_create.pb.dart' as $0; -import 'view_create.pb.dart' as $1; - -enum CurrentWorkspaceSetting_OneOfLatestView { - latestView, - notSet -} - -class CurrentWorkspaceSetting extends $pb.GeneratedMessage { - static const $core.Map<$core.int, CurrentWorkspaceSetting_OneOfLatestView> _CurrentWorkspaceSetting_OneOfLatestViewByTag = { - 2 : CurrentWorkspaceSetting_OneOfLatestView.latestView, - 0 : CurrentWorkspaceSetting_OneOfLatestView.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CurrentWorkspaceSetting', createEmptyInstance: create) - ..oo(0, [2]) - ..aOM<$0.Workspace>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'workspace', subBuilder: $0.Workspace.create) - ..aOM<$1.View>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'latestView', subBuilder: $1.View.create) - ..hasRequiredFields = false - ; - - CurrentWorkspaceSetting._() : super(); - factory CurrentWorkspaceSetting({ - $0.Workspace? workspace, - $1.View? latestView, - }) { - final _result = create(); - if (workspace != null) { - _result.workspace = workspace; - } - if (latestView != null) { - _result.latestView = latestView; - } - return _result; - } - factory CurrentWorkspaceSetting.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory CurrentWorkspaceSetting.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') - CurrentWorkspaceSetting clone() => CurrentWorkspaceSetting()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - CurrentWorkspaceSetting copyWith(void Function(CurrentWorkspaceSetting) updates) => super.copyWith((message) => updates(message as CurrentWorkspaceSetting)) as CurrentWorkspaceSetting; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static CurrentWorkspaceSetting create() => CurrentWorkspaceSetting._(); - CurrentWorkspaceSetting createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static CurrentWorkspaceSetting getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CurrentWorkspaceSetting? _defaultInstance; - - CurrentWorkspaceSetting_OneOfLatestView whichOneOfLatestView() => _CurrentWorkspaceSetting_OneOfLatestViewByTag[$_whichOneof(0)]!; - void clearOneOfLatestView() => clearField($_whichOneof(0)); - - @$pb.TagNumber(1) - $0.Workspace get workspace => $_getN(0); - @$pb.TagNumber(1) - set workspace($0.Workspace v) { setField(1, v); } - @$pb.TagNumber(1) - $core.bool hasWorkspace() => $_has(0); - @$pb.TagNumber(1) - void clearWorkspace() => clearField(1); - @$pb.TagNumber(1) - $0.Workspace ensureWorkspace() => $_ensure(0); - - @$pb.TagNumber(2) - $1.View get latestView => $_getN(1); - @$pb.TagNumber(2) - set latestView($1.View v) { setField(2, v); } - @$pb.TagNumber(2) - $core.bool hasLatestView() => $_has(1); - @$pb.TagNumber(2) - void clearLatestView() => clearField(2); - @$pb.TagNumber(2) - $1.View ensureLatestView() => $_ensure(1); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pbenum.dart deleted file mode 100644 index 656ff94dd1..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pbenum.dart +++ /dev/null @@ -1,7 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_setting.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-core-data-model/workspace_setting.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pbjson.dart deleted file mode 100644 index 6b9b855593..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pbjson.dart +++ /dev/null @@ -1,24 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_setting.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 currentWorkspaceSettingDescriptor instead') -const CurrentWorkspaceSetting$json = const { - '1': 'CurrentWorkspaceSetting', - '2': const [ - const {'1': 'workspace', '3': 1, '4': 1, '5': 11, '6': '.Workspace', '10': 'workspace'}, - const {'1': 'latest_view', '3': 2, '4': 1, '5': 11, '6': '.View', '9': 0, '10': 'latestView'}, - ], - '8': const [ - const {'1': 'one_of_latest_view'}, - ], -}; - -/// Descriptor for `CurrentWorkspaceSetting`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List currentWorkspaceSettingDescriptor = $convert.base64Decode('ChdDdXJyZW50V29ya3NwYWNlU2V0dGluZxIoCgl3b3Jrc3BhY2UYASABKAsyCi5Xb3Jrc3BhY2VSCXdvcmtzcGFjZRIoCgtsYXRlc3RfdmlldxgCIAEoCzIFLlZpZXdIAFIKbGF0ZXN0Vmlld0IUChJvbmVfb2ZfbGF0ZXN0X3ZpZXc='); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pbserver.dart deleted file mode 100644 index 53b1a93912..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_setting.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_setting.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 'workspace_setting.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pb.dart deleted file mode 100644 index 31cb1a1e35..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pb.dart +++ /dev/null @@ -1,213 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_update.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; - -enum UpdateWorkspaceRequest_OneOfName { - name, - notSet -} - -enum UpdateWorkspaceRequest_OneOfDesc { - desc, - notSet -} - -class UpdateWorkspaceRequest extends $pb.GeneratedMessage { - static const $core.Map<$core.int, UpdateWorkspaceRequest_OneOfName> _UpdateWorkspaceRequest_OneOfNameByTag = { - 2 : UpdateWorkspaceRequest_OneOfName.name, - 0 : UpdateWorkspaceRequest_OneOfName.notSet - }; - static const $core.Map<$core.int, UpdateWorkspaceRequest_OneOfDesc> _UpdateWorkspaceRequest_OneOfDescByTag = { - 3 : UpdateWorkspaceRequest_OneOfDesc.desc, - 0 : UpdateWorkspaceRequest_OneOfDesc.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateWorkspaceRequest', createEmptyInstance: create) - ..oo(0, [2]) - ..oo(1, [3]) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') - ..hasRequiredFields = false - ; - - UpdateWorkspaceRequest._() : super(); - factory UpdateWorkspaceRequest({ - $core.String? id, - $core.String? name, - $core.String? desc, - }) { - final _result = create(); - if (id != null) { - _result.id = id; - } - if (name != null) { - _result.name = name; - } - if (desc != null) { - _result.desc = desc; - } - return _result; - } - factory UpdateWorkspaceRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory UpdateWorkspaceRequest.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') - UpdateWorkspaceRequest clone() => UpdateWorkspaceRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - UpdateWorkspaceRequest copyWith(void Function(UpdateWorkspaceRequest) updates) => super.copyWith((message) => updates(message as UpdateWorkspaceRequest)) as UpdateWorkspaceRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static UpdateWorkspaceRequest create() => UpdateWorkspaceRequest._(); - UpdateWorkspaceRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static UpdateWorkspaceRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static UpdateWorkspaceRequest? _defaultInstance; - - UpdateWorkspaceRequest_OneOfName whichOneOfName() => _UpdateWorkspaceRequest_OneOfNameByTag[$_whichOneof(0)]!; - void clearOneOfName() => clearField($_whichOneof(0)); - - UpdateWorkspaceRequest_OneOfDesc whichOneOfDesc() => _UpdateWorkspaceRequest_OneOfDescByTag[$_whichOneof(1)]!; - void clearOneOfDesc() => clearField($_whichOneof(1)); - - @$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 name => $_getSZ(1); - @$pb.TagNumber(2) - set name($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasName() => $_has(1); - @$pb.TagNumber(2) - void clearName() => clearField(2); - - @$pb.TagNumber(3) - $core.String get desc => $_getSZ(2); - @$pb.TagNumber(3) - set desc($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasDesc() => $_has(2); - @$pb.TagNumber(3) - void clearDesc() => clearField(3); -} - -enum UpdateWorkspaceParams_OneOfName { - name, - notSet -} - -enum UpdateWorkspaceParams_OneOfDesc { - desc, - notSet -} - -class UpdateWorkspaceParams extends $pb.GeneratedMessage { - static const $core.Map<$core.int, UpdateWorkspaceParams_OneOfName> _UpdateWorkspaceParams_OneOfNameByTag = { - 2 : UpdateWorkspaceParams_OneOfName.name, - 0 : UpdateWorkspaceParams_OneOfName.notSet - }; - static const $core.Map<$core.int, UpdateWorkspaceParams_OneOfDesc> _UpdateWorkspaceParams_OneOfDescByTag = { - 3 : UpdateWorkspaceParams_OneOfDesc.desc, - 0 : UpdateWorkspaceParams_OneOfDesc.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateWorkspaceParams', createEmptyInstance: create) - ..oo(0, [2]) - ..oo(1, [3]) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc') - ..hasRequiredFields = false - ; - - UpdateWorkspaceParams._() : super(); - factory UpdateWorkspaceParams({ - $core.String? id, - $core.String? name, - $core.String? desc, - }) { - final _result = create(); - if (id != null) { - _result.id = id; - } - if (name != null) { - _result.name = name; - } - if (desc != null) { - _result.desc = desc; - } - return _result; - } - factory UpdateWorkspaceParams.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory UpdateWorkspaceParams.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') - UpdateWorkspaceParams clone() => UpdateWorkspaceParams()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - UpdateWorkspaceParams copyWith(void Function(UpdateWorkspaceParams) updates) => super.copyWith((message) => updates(message as UpdateWorkspaceParams)) as UpdateWorkspaceParams; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static UpdateWorkspaceParams create() => UpdateWorkspaceParams._(); - UpdateWorkspaceParams createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static UpdateWorkspaceParams getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static UpdateWorkspaceParams? _defaultInstance; - - UpdateWorkspaceParams_OneOfName whichOneOfName() => _UpdateWorkspaceParams_OneOfNameByTag[$_whichOneof(0)]!; - void clearOneOfName() => clearField($_whichOneof(0)); - - UpdateWorkspaceParams_OneOfDesc whichOneOfDesc() => _UpdateWorkspaceParams_OneOfDescByTag[$_whichOneof(1)]!; - void clearOneOfDesc() => clearField($_whichOneof(1)); - - @$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 name => $_getSZ(1); - @$pb.TagNumber(2) - set name($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasName() => $_has(1); - @$pb.TagNumber(2) - void clearName() => clearField(2); - - @$pb.TagNumber(3) - $core.String get desc => $_getSZ(2); - @$pb.TagNumber(3) - set desc($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasDesc() => $_has(2); - @$pb.TagNumber(3) - void clearDesc() => clearField(3); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pbenum.dart deleted file mode 100644 index 9a26b2befe..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pbenum.dart +++ /dev/null @@ -1,7 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_update.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-core-data-model/workspace_update.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pbjson.dart deleted file mode 100644 index e52ec17fa8..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pbjson.dart +++ /dev/null @@ -1,42 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_update.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 updateWorkspaceRequestDescriptor instead') -const UpdateWorkspaceRequest$json = const { - '1': 'UpdateWorkspaceRequest', - '2': const [ - const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - const {'1': 'name', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'name'}, - const {'1': 'desc', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'desc'}, - ], - '8': const [ - const {'1': 'one_of_name'}, - const {'1': 'one_of_desc'}, - ], -}; - -/// Descriptor for `UpdateWorkspaceRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List updateWorkspaceRequestDescriptor = $convert.base64Decode('ChZVcGRhdGVXb3Jrc3BhY2VSZXF1ZXN0Eg4KAmlkGAEgASgJUgJpZBIUCgRuYW1lGAIgASgJSABSBG5hbWUSFAoEZGVzYxgDIAEoCUgBUgRkZXNjQg0KC29uZV9vZl9uYW1lQg0KC29uZV9vZl9kZXNj'); -@$core.Deprecated('Use updateWorkspaceParamsDescriptor instead') -const UpdateWorkspaceParams$json = const { - '1': 'UpdateWorkspaceParams', - '2': const [ - const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - const {'1': 'name', '3': 2, '4': 1, '5': 9, '9': 0, '10': 'name'}, - const {'1': 'desc', '3': 3, '4': 1, '5': 9, '9': 1, '10': 'desc'}, - ], - '8': const [ - const {'1': 'one_of_name'}, - const {'1': 'one_of_desc'}, - ], -}; - -/// Descriptor for `UpdateWorkspaceParams`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List updateWorkspaceParamsDescriptor = $convert.base64Decode('ChVVcGRhdGVXb3Jrc3BhY2VQYXJhbXMSDgoCaWQYASABKAlSAmlkEhQKBG5hbWUYAiABKAlIAFIEbmFtZRIUCgRkZXNjGAMgASgJSAFSBGRlc2NCDQoLb25lX29mX25hbWVCDQoLb25lX29mX2Rlc2M='); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pbserver.dart deleted file mode 100644 index 45e8a958d8..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core-data-model/workspace_update.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: workspace_update.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 'workspace_update.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/dart_notification.pb.dart similarity index 79% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pb.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/dart_notification.pb.dart index f1a6d9fcdb..402c0a4115 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pb.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/dart_notification.pb.dart @@ -1,11 +1,11 @@ /// // Generated code. Do not modify. -// source: observable.proto +// source: dart_notification.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; -export 'observable.pbenum.dart'; +export 'dart_notification.pbenum.dart'; diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/dart_notification.pbenum.dart similarity index 98% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbenum.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/dart_notification.pbenum.dart index 78a5cfb8b9..9ff51a4e56 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbenum.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/dart_notification.pbenum.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: observable.proto +// source: dart_notification.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-core/observable.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/dart_notification.pbjson.dart similarity index 97% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbjson.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/dart_notification.pbjson.dart index 335bb4a4a8..ea506ecce2 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbjson.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/dart_notification.pbjson.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: observable.proto +// source: dart_notification.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 diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/dart_notification.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/dart_notification.pbserver.dart new file mode 100644 index 0000000000..8be819e83e --- /dev/null +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/dart_notification.pbserver.dart @@ -0,0 +1,9 @@ +/// +// Generated code. Do not modify. +// source: dart_notification.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 'dart_notification.pb.dart'; + diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbserver.dart deleted file mode 100644 index d0e7d97b5d..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/observable.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: observable.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 'observable.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/protobuf.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/protobuf.dart index 0cd5547d0a..a146671e92 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/protobuf.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-core/protobuf.dart @@ -1,3 +1,3 @@ // Auto-generated, do not edit -export './observable.pb.dart'; +export './dart_notification.pb.dart'; export './event.pb.dart'; diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pbenum.dart deleted file mode 100644 index 9bfce997f0..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pbenum.dart +++ /dev/null @@ -1,24 +0,0 @@ -/// -// Generated code. Do not modify. -// source: observable.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 - -// ignore_for_file: UNDEFINED_SHOWN_NAME -import 'dart:core' as $core; -import 'package:protobuf/protobuf.dart' as $pb; - -class DocObservable extends $pb.ProtobufEnum { - static const DocObservable UserCreateDoc = DocObservable._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UserCreateDoc'); - - static const $core.List values = [ - UserCreateDoc, - ]; - - static final $core.Map<$core.int, DocObservable> _byValue = $pb.ProtobufEnum.initByValue(values); - static DocObservable? valueOf($core.int value) => _byValue[value]; - - const DocObservable._($core.int v, $core.String n) : super(v, n); -} - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pbjson.dart deleted file mode 100644 index 9a75f9879e..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pbjson.dart +++ /dev/null @@ -1,20 +0,0 @@ -/// -// Generated code. Do not modify. -// source: observable.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 docObservableDescriptor instead') -const DocObservable$json = const { - '1': 'DocObservable', - '2': const [ - const {'1': 'UserCreateDoc', '2': 0}, - ], -}; - -/// Descriptor for `DocObservable`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List docObservableDescriptor = $convert.base64Decode('Cg1Eb2NPYnNlcnZhYmxlEhEKDVVzZXJDcmVhdGVEb2MQAA=='); diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pbserver.dart deleted file mode 100644 index d0e7d97b5d..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: observable.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 'observable.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/protobuf.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/protobuf.dart index 7353db8c64..58506e3e5f 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/protobuf.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/protobuf.dart @@ -1,2 +1 @@ // Auto-generated, do not edit -export './observable.pb.dart'; diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/dart_notification.pb.dart similarity index 79% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pb.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/dart_notification.pb.dart index f1a6d9fcdb..402c0a4115 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-document/observable.pb.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/dart_notification.pb.dart @@ -1,11 +1,11 @@ /// // Generated code. Do not modify. -// source: observable.proto +// source: dart_notification.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; -export 'observable.pbenum.dart'; +export 'dart_notification.pbenum.dart'; diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbenum.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/dart_notification.pbenum.dart similarity index 97% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbenum.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/dart_notification.pbenum.dart index 64e2fc3b49..17ee04ea2f 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbenum.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/dart_notification.pbenum.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: observable.proto +// source: dart_notification.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-user/observable.pbjson.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/dart_notification.pbjson.dart similarity index 96% rename from frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbjson.dart rename to frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/dart_notification.pbjson.dart index 95aed3d85e..8c3648e0ad 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbjson.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/dart_notification.pbjson.dart @@ -1,6 +1,6 @@ /// // Generated code. Do not modify. -// source: observable.proto +// source: dart_notification.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 diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/dart_notification.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/dart_notification.pbserver.dart new file mode 100644 index 0000000000..8be819e83e --- /dev/null +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/dart_notification.pbserver.dart @@ -0,0 +1,9 @@ +/// +// Generated code. Do not modify. +// source: dart_notification.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 'dart_notification.pb.dart'; + diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pb.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pb.dart deleted file mode 100644 index f1a6d9fcdb..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pb.dart +++ /dev/null @@ -1,11 +0,0 @@ -/// -// Generated code. Do not modify. -// source: observable.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; - -export 'observable.pbenum.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbserver.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbserver.dart deleted file mode 100644 index d0e7d97b5d..0000000000 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/observable.pbserver.dart +++ /dev/null @@ -1,9 +0,0 @@ -/// -// Generated code. Do not modify. -// source: observable.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 'observable.pb.dart'; - diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/protobuf.dart b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/protobuf.dart index 0cd5547d0a..a146671e92 100644 --- a/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/protobuf.dart +++ b/frontend/app_flowy/packages/flowy_sdk/lib/protobuf/flowy-user/protobuf.dart @@ -1,3 +1,3 @@ // Auto-generated, do not edit -export './observable.pb.dart'; +export './dart_notification.pb.dart'; export './event.pb.dart'; diff --git a/frontend/rust-lib/flowy-core/Flowy.toml b/frontend/rust-lib/flowy-core/Flowy.toml index 667c9f7ae4..13b0d868c6 100644 --- a/frontend/rust-lib/flowy-core/Flowy.toml +++ b/frontend/rust-lib/flowy-core/Flowy.toml @@ -1,3 +1,3 @@ -proto_crates = ["src/entities", "src/event.rs", "src/notify"] +proto_crates = ["src/entities", "src/event.rs", "src/dart_notification.rs"] event_files = ["src/event.rs"] \ No newline at end of file diff --git a/frontend/rust-lib/flowy-core/src/context.rs b/frontend/rust-lib/flowy-core/src/context.rs index d2761e1643..4222f60bae 100644 --- a/frontend/rust-lib/flowy-core/src/context.rs +++ b/frontend/rust-lib/flowy-core/src/context.rs @@ -6,10 +6,10 @@ use parking_lot::RwLock; use std::{collections::HashMap, sync::Arc}; use crate::{ + dart_notification::{send_dart_notification, WorkspaceNotification}, entities::workspace::RepeatedWorkspace, errors::{FlowyError, FlowyResult}, module::{WorkspaceCloudService, WorkspaceDatabase, WorkspaceUser}, - notify::{send_dart_notification, WorkspaceNotification}, services::{AppController, TrashController, ViewController, WorkspaceController}, }; diff --git a/frontend/rust-lib/flowy-core/src/notify/observable.rs b/frontend/rust-lib/flowy-core/src/dart_notification.rs similarity index 91% rename from frontend/rust-lib/flowy-core/src/notify/observable.rs rename to frontend/rust-lib/flowy-core/src/dart_notification.rs index f5c379313e..b31a44418a 100644 --- a/frontend/rust-lib/flowy-core/src/notify/observable.rs +++ b/frontend/rust-lib/flowy-core/src/dart_notification.rs @@ -2,8 +2,6 @@ use dart_notify::DartNotifyBuilder; use flowy_derive::ProtoBuf_Enum; const OBSERVABLE_CATEGORY: &str = "Workspace"; -// Opti: Using the Rust macro to generate the serde code automatically that can -// be use directly in flutter #[derive(ProtoBuf_Enum, Debug)] pub(crate) enum WorkspaceNotification { Unknown = 0, diff --git a/frontend/rust-lib/flowy-core/src/event_handler.rs b/frontend/rust-lib/flowy-core/src/event_handler.rs deleted file mode 100644 index fb71f993f7..0000000000 --- a/frontend/rust-lib/flowy-core/src/event_handler.rs +++ /dev/null @@ -1,112 +0,0 @@ -use crate::{ - context::CoreContext, - errors::FlowyError, - notify::{send_dart_notification, WorkspaceNotification}, - services::{ - get_current_workspace, - read_local_workspace_apps, - workspace::sql::{WorkspaceTable, WorkspaceTableSql}, - }, -}; -use flowy_core_data_model::entities::{ - view::View, - workspace::{CurrentWorkspaceSetting, QueryWorkspaceRequest, RepeatedWorkspace, WorkspaceId}, -}; -use lib_dispatch::prelude::{data_result, Data, DataResult, Unit}; -use std::{convert::TryInto, sync::Arc}; - -#[tracing::instrument(skip(data, core), err)] -pub(crate) async fn read_workspaces_handler( - data: Data, - core: Unit>, -) -> DataResult { - let params: WorkspaceId = data.into_inner().try_into()?; - let user_id = core.user.user_id()?; - let conn = &*core.database.db_connection()?; - let workspace_controller = core.workspace_controller.clone(); - - let trash_controller = core.trash_controller.clone(); - let workspaces = conn.immediate_transaction::<_, FlowyError, _>(|| { - let mut workspaces = workspace_controller.read_local_workspaces(params.workspace_id.clone(), &user_id, conn)?; - for workspace in workspaces.iter_mut() { - let apps = read_local_workspace_apps(&workspace.id, trash_controller.clone(), conn)?.into_inner(); - workspace.apps.items = apps; - } - Ok(workspaces) - })?; - - let _ = read_workspaces_on_server(core, user_id, params); - - data_result(workspaces) -} - -#[tracing::instrument(skip(core), err)] -pub async fn read_cur_workspace_handler( - core: Unit>, -) -> DataResult { - let workspace_id = get_current_workspace()?; - let user_id = core.user.user_id()?; - let params = WorkspaceId { - workspace_id: Some(workspace_id.clone()), - }; - let conn = &*core.database.db_connection()?; - let workspace = core - .workspace_controller - .read_local_workspace(workspace_id, &user_id, conn)?; - - let latest_view: Option = core.view_controller.latest_visit_view().unwrap_or(None); - let setting = CurrentWorkspaceSetting { workspace, latest_view }; - let _ = read_workspaces_on_server(core, user_id, params); - data_result(setting) -} - -#[tracing::instrument(level = "debug", skip(core), err)] -fn read_workspaces_on_server( - core: Unit>, - user_id: String, - params: WorkspaceId, -) -> Result<(), FlowyError> { - let (token, server) = (core.user.token()?, core.cloud_service.clone()); - let app_ctrl = core.app_controller.clone(); - let view_ctrl = core.view_controller.clone(); - let conn = core.database.db_connection()?; - - tokio::spawn(async move { - // Opti: handle the error and retry? - let workspaces = server.read_workspace(&token, params).await?; - let _ = (&*conn).immediate_transaction::<_, FlowyError, _>(|| { - tracing::debug!("Save {} workspace", workspaces.len()); - for workspace in &workspaces.items { - let m_workspace = workspace.clone(); - let apps = m_workspace.apps.clone().into_inner(); - let workspace_table = WorkspaceTable::new(m_workspace, &user_id); - - let _ = WorkspaceTableSql::create_workspace(workspace_table, &*conn)?; - tracing::debug!("Save {} apps", apps.len()); - for app in apps { - let views = app.belongings.clone().into_inner(); - match app_ctrl.save_app(app, &*conn) { - Ok(_) => {}, - Err(e) => log::error!("create app failed: {:?}", e), - } - - tracing::debug!("Save {} views", views.len()); - for view in views { - match view_ctrl.save_view(view, &*conn) { - Ok(_) => {}, - Err(e) => log::error!("create view failed: {:?}", e), - } - } - } - } - Ok(()) - })?; - - send_dart_notification(&token, WorkspaceNotification::WorkspaceListUpdated) - .payload(workspaces) - .send(); - Result::<(), FlowyError>::Ok(()) - }); - - Ok(()) -} diff --git a/frontend/rust-lib/flowy-core/src/lib.rs b/frontend/rust-lib/flowy-core/src/lib.rs index 37f2a306b1..63debb1552 100644 --- a/frontend/rust-lib/flowy-core/src/lib.rs +++ b/frontend/rust-lib/flowy-core/src/lib.rs @@ -11,8 +11,7 @@ mod macros; extern crate flowy_database; pub mod context; -pub mod event_handler; -mod notify; +mod dart_notification; pub mod protobuf; mod util; diff --git a/frontend/rust-lib/flowy-core/src/module.rs b/frontend/rust-lib/flowy-core/src/module.rs index 3cf77593fc..06f3dc94e4 100644 --- a/frontend/rust-lib/flowy-core/src/module.rs +++ b/frontend/rust-lib/flowy-core/src/module.rs @@ -8,7 +8,6 @@ use crate::{ }, errors::FlowyError, event::WorkspaceEvent, - event_handler::*, services::{ app::event_handler::*, trash::event_handler::*, diff --git a/frontend/rust-lib/flowy-core/src/notify/mod.rs b/frontend/rust-lib/flowy-core/src/notify/mod.rs deleted file mode 100644 index d3723ff4b2..0000000000 --- a/frontend/rust-lib/flowy-core/src/notify/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub(crate) mod observable; - -pub(crate) use observable::*; diff --git a/frontend/rust-lib/flowy-core/src/protobuf/model/observable.rs b/frontend/rust-lib/flowy-core/src/protobuf/model/dart_notification.rs similarity index 62% rename from frontend/rust-lib/flowy-core/src/protobuf/model/observable.rs rename to frontend/rust-lib/flowy-core/src/protobuf/model/dart_notification.rs index cf527bb5c5..75cffdb1b4 100644 --- a/frontend/rust-lib/flowy-core/src/protobuf/model/observable.rs +++ b/frontend/rust-lib/flowy-core/src/protobuf/model/dart_notification.rs @@ -17,7 +17,7 @@ #![allow(trivial_casts)] #![allow(unused_imports)] #![allow(unused_results)] -//! Generated file from `observable.proto` +//! Generated file from `dart_notification.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. @@ -107,42 +107,43 @@ impl ::protobuf::reflect::ProtobufValue for WorkspaceNotification { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x10observable.proto*\xa2\x02\n\x15WorkspaceNotification\x12\x0b\n\x07\ - Unknown\x10\0\x12\x17\n\x13UserCreateWorkspace\x10\n\x12\x17\n\x13UserDe\ - leteWorkspace\x10\x0b\x12\x14\n\x10WorkspaceUpdated\x10\x0c\x12\x18\n\ - \x14WorkspaceListUpdated\x10\r\x12\x18\n\x14WorkspaceAppsChanged\x10\x0e\ - \x12\x0e\n\nAppUpdated\x10\x15\x12\x13\n\x0fAppViewsChanged\x10\x18\x12\ - \x0f\n\x0bViewUpdated\x10\x1f\x12\x0f\n\x0bViewDeleted\x10\x20\x12\x10\n\ - \x0cViewRestored\x10!\x12\x14\n\x10UserUnauthorized\x10d\x12\x11\n\x0cTr\ - ashUpdated\x10\xe8\x07J\xbf\x04\n\x06\x12\x04\0\0\x10\x01\n\x08\n\x01\ - \x0c\x12\x03\0\0\x12\n\n\n\x02\x05\0\x12\x04\x02\0\x10\x01\n\n\n\x03\x05\ - \0\x01\x12\x03\x02\x05\x1a\n\x0b\n\x04\x05\0\x02\0\x12\x03\x03\x04\x10\n\ - \x0c\n\x05\x05\0\x02\0\x01\x12\x03\x03\x04\x0b\n\x0c\n\x05\x05\0\x02\0\ - \x02\x12\x03\x03\x0e\x0f\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x04\x04\x1d\n\ - \x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x04\x04\x17\n\x0c\n\x05\x05\0\x02\ - \x01\x02\x12\x03\x04\x1a\x1c\n\x0b\n\x04\x05\0\x02\x02\x12\x03\x05\x04\ - \x1d\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\x05\x04\x17\n\x0c\n\x05\x05\0\ - \x02\x02\x02\x12\x03\x05\x1a\x1c\n\x0b\n\x04\x05\0\x02\x03\x12\x03\x06\ - \x04\x1a\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03\x06\x04\x14\n\x0c\n\x05\ - \x05\0\x02\x03\x02\x12\x03\x06\x17\x19\n\x0b\n\x04\x05\0\x02\x04\x12\x03\ - \x07\x04\x1e\n\x0c\n\x05\x05\0\x02\x04\x01\x12\x03\x07\x04\x18\n\x0c\n\ - \x05\x05\0\x02\x04\x02\x12\x03\x07\x1b\x1d\n\x0b\n\x04\x05\0\x02\x05\x12\ - \x03\x08\x04\x1e\n\x0c\n\x05\x05\0\x02\x05\x01\x12\x03\x08\x04\x18\n\x0c\ - \n\x05\x05\0\x02\x05\x02\x12\x03\x08\x1b\x1d\n\x0b\n\x04\x05\0\x02\x06\ - \x12\x03\t\x04\x14\n\x0c\n\x05\x05\0\x02\x06\x01\x12\x03\t\x04\x0e\n\x0c\ - \n\x05\x05\0\x02\x06\x02\x12\x03\t\x11\x13\n\x0b\n\x04\x05\0\x02\x07\x12\ - \x03\n\x04\x19\n\x0c\n\x05\x05\0\x02\x07\x01\x12\x03\n\x04\x13\n\x0c\n\ - \x05\x05\0\x02\x07\x02\x12\x03\n\x16\x18\n\x0b\n\x04\x05\0\x02\x08\x12\ - \x03\x0b\x04\x15\n\x0c\n\x05\x05\0\x02\x08\x01\x12\x03\x0b\x04\x0f\n\x0c\ - \n\x05\x05\0\x02\x08\x02\x12\x03\x0b\x12\x14\n\x0b\n\x04\x05\0\x02\t\x12\ - \x03\x0c\x04\x15\n\x0c\n\x05\x05\0\x02\t\x01\x12\x03\x0c\x04\x0f\n\x0c\n\ - \x05\x05\0\x02\t\x02\x12\x03\x0c\x12\x14\n\x0b\n\x04\x05\0\x02\n\x12\x03\ - \r\x04\x16\n\x0c\n\x05\x05\0\x02\n\x01\x12\x03\r\x04\x10\n\x0c\n\x05\x05\ - \0\x02\n\x02\x12\x03\r\x13\x15\n\x0b\n\x04\x05\0\x02\x0b\x12\x03\x0e\x04\ - \x1b\n\x0c\n\x05\x05\0\x02\x0b\x01\x12\x03\x0e\x04\x14\n\x0c\n\x05\x05\0\ - \x02\x0b\x02\x12\x03\x0e\x17\x1a\n\x0b\n\x04\x05\0\x02\x0c\x12\x03\x0f\ - \x04\x18\n\x0c\n\x05\x05\0\x02\x0c\x01\x12\x03\x0f\x04\x10\n\x0c\n\x05\ - \x05\0\x02\x0c\x02\x12\x03\x0f\x13\x17b\x06proto3\ + \n\x17dart_notification.proto*\xa2\x02\n\x15WorkspaceNotification\x12\ + \x0b\n\x07Unknown\x10\0\x12\x17\n\x13UserCreateWorkspace\x10\n\x12\x17\n\ + \x13UserDeleteWorkspace\x10\x0b\x12\x14\n\x10WorkspaceUpdated\x10\x0c\ + \x12\x18\n\x14WorkspaceListUpdated\x10\r\x12\x18\n\x14WorkspaceAppsChang\ + ed\x10\x0e\x12\x0e\n\nAppUpdated\x10\x15\x12\x13\n\x0fAppViewsChanged\ + \x10\x18\x12\x0f\n\x0bViewUpdated\x10\x1f\x12\x0f\n\x0bViewDeleted\x10\ + \x20\x12\x10\n\x0cViewRestored\x10!\x12\x14\n\x10UserUnauthorized\x10d\ + \x12\x11\n\x0cTrashUpdated\x10\xe8\x07J\xbf\x04\n\x06\x12\x04\0\0\x10\ + \x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x05\0\x12\x04\x02\0\x10\ + \x01\n\n\n\x03\x05\0\x01\x12\x03\x02\x05\x1a\n\x0b\n\x04\x05\0\x02\0\x12\ + \x03\x03\x04\x10\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x03\x04\x0b\n\x0c\n\ + \x05\x05\0\x02\0\x02\x12\x03\x03\x0e\x0f\n\x0b\n\x04\x05\0\x02\x01\x12\ + \x03\x04\x04\x1d\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x04\x04\x17\n\x0c\ + \n\x05\x05\0\x02\x01\x02\x12\x03\x04\x1a\x1c\n\x0b\n\x04\x05\0\x02\x02\ + \x12\x03\x05\x04\x1d\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\x05\x04\x17\n\ + \x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x05\x1a\x1c\n\x0b\n\x04\x05\0\x02\ + \x03\x12\x03\x06\x04\x1a\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03\x06\x04\ + \x14\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03\x06\x17\x19\n\x0b\n\x04\x05\0\ + \x02\x04\x12\x03\x07\x04\x1e\n\x0c\n\x05\x05\0\x02\x04\x01\x12\x03\x07\ + \x04\x18\n\x0c\n\x05\x05\0\x02\x04\x02\x12\x03\x07\x1b\x1d\n\x0b\n\x04\ + \x05\0\x02\x05\x12\x03\x08\x04\x1e\n\x0c\n\x05\x05\0\x02\x05\x01\x12\x03\ + \x08\x04\x18\n\x0c\n\x05\x05\0\x02\x05\x02\x12\x03\x08\x1b\x1d\n\x0b\n\ + \x04\x05\0\x02\x06\x12\x03\t\x04\x14\n\x0c\n\x05\x05\0\x02\x06\x01\x12\ + \x03\t\x04\x0e\n\x0c\n\x05\x05\0\x02\x06\x02\x12\x03\t\x11\x13\n\x0b\n\ + \x04\x05\0\x02\x07\x12\x03\n\x04\x19\n\x0c\n\x05\x05\0\x02\x07\x01\x12\ + \x03\n\x04\x13\n\x0c\n\x05\x05\0\x02\x07\x02\x12\x03\n\x16\x18\n\x0b\n\ + \x04\x05\0\x02\x08\x12\x03\x0b\x04\x15\n\x0c\n\x05\x05\0\x02\x08\x01\x12\ + \x03\x0b\x04\x0f\n\x0c\n\x05\x05\0\x02\x08\x02\x12\x03\x0b\x12\x14\n\x0b\ + \n\x04\x05\0\x02\t\x12\x03\x0c\x04\x15\n\x0c\n\x05\x05\0\x02\t\x01\x12\ + \x03\x0c\x04\x0f\n\x0c\n\x05\x05\0\x02\t\x02\x12\x03\x0c\x12\x14\n\x0b\n\ + \x04\x05\0\x02\n\x12\x03\r\x04\x16\n\x0c\n\x05\x05\0\x02\n\x01\x12\x03\r\ + \x04\x10\n\x0c\n\x05\x05\0\x02\n\x02\x12\x03\r\x13\x15\n\x0b\n\x04\x05\0\ + \x02\x0b\x12\x03\x0e\x04\x1b\n\x0c\n\x05\x05\0\x02\x0b\x01\x12\x03\x0e\ + \x04\x14\n\x0c\n\x05\x05\0\x02\x0b\x02\x12\x03\x0e\x17\x1a\n\x0b\n\x04\ + \x05\0\x02\x0c\x12\x03\x0f\x04\x18\n\x0c\n\x05\x05\0\x02\x0c\x01\x12\x03\ + \x0f\x04\x10\n\x0c\n\x05\x05\0\x02\x0c\x02\x12\x03\x0f\x13\x17b\x06proto\ + 3\ "; static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; diff --git a/frontend/rust-lib/flowy-core/src/protobuf/model/mod.rs b/frontend/rust-lib/flowy-core/src/protobuf/model/mod.rs index b9a7e246fd..75a0938328 100644 --- a/frontend/rust-lib/flowy-core/src/protobuf/model/mod.rs +++ b/frontend/rust-lib/flowy-core/src/protobuf/model/mod.rs @@ -1,8 +1,8 @@ #![cfg_attr(rustfmt, rustfmt::skip)] // Auto-generated, do not edit -mod observable; -pub use observable::*; +mod dart_notification; +pub use dart_notification::*; mod event; pub use event::*; diff --git a/frontend/rust-lib/flowy-core/src/protobuf/proto/observable.proto b/frontend/rust-lib/flowy-core/src/protobuf/proto/dart_notification.proto similarity index 100% rename from frontend/rust-lib/flowy-core/src/protobuf/proto/observable.proto rename to frontend/rust-lib/flowy-core/src/protobuf/proto/dart_notification.proto diff --git a/frontend/rust-lib/flowy-core/src/services/app/controller.rs b/frontend/rust-lib/flowy-core/src/services/app/controller.rs index 93ee7b3094..34846e0cb0 100644 --- a/frontend/rust-lib/flowy-core/src/services/app/controller.rs +++ b/frontend/rust-lib/flowy-core/src/services/app/controller.rs @@ -1,13 +1,13 @@ use crate::{ + dart_notification::*, entities::{ app::{App, CreateAppParams, *}, trash::TrashType, }, errors::*, module::{WorkspaceCloudService, WorkspaceDatabase, WorkspaceUser}, - notify::*, services::{ - app::sql::{AppTable, AppTableChangeset, AppTableSql}, + app::sql::{AppChangeset, AppTable, AppTableSql}, TrashController, TrashEvent, }, @@ -61,8 +61,7 @@ impl AppController { } pub(crate) fn save_app(&self, app: App, conn: &SqliteConnection) -> Result<(), FlowyError> { - let app_table = AppTable::new(app); - let _ = AppTableSql::create_app(app_table, &*conn)?; + let _ = AppTableSql::create_app(app, &*conn)?; Ok(()) } @@ -80,7 +79,7 @@ impl AppController { } pub(crate) async fn update_app(&self, params: UpdateAppParams) -> Result<(), FlowyError> { - let changeset = AppTableChangeset::new(params.clone()); + let changeset = AppChangeset::new(params.clone()); let app_id = changeset.id.clone(); let conn = &*self.database.db_connection()?; conn.immediate_transaction::<_, FlowyError, _>(|| { @@ -144,8 +143,7 @@ impl AppController { match server.read_app(&token, params).await { Ok(Some(app)) => match pool.get() { Ok(conn) => { - let app_table = AppTable::new(app.clone()); - let result = AppTableSql::create_app(app_table, &*conn); + let result = AppTableSql::create_app(app.clone(), &*conn); match result { Ok(_) => { send_dart_notification(&app.id, WorkspaceNotification::AppUpdated) diff --git a/frontend/rust-lib/flowy-core/src/services/app/sql.rs b/frontend/rust-lib/flowy-core/src/services/app/sql.rs index 204e3950f6..d1083b4fce 100644 --- a/frontend/rust-lib/flowy-core/src/services/app/sql.rs +++ b/frontend/rust-lib/flowy-core/src/services/app/sql.rs @@ -20,18 +20,19 @@ use crate::errors::FlowyError; pub struct AppTableSql {} impl AppTableSql { - pub(crate) fn create_app(app_table: AppTable, conn: &SqliteConnection) -> Result<(), FlowyError> { + pub(crate) fn create_app(app: App, conn: &SqliteConnection) -> Result<(), FlowyError> { + let app_table = AppTable::new(app); match diesel_record_count!(app_table, &app_table.id, conn) { 0 => diesel_insert_table!(app_table, &app_table, conn), _ => { - let changeset = AppTableChangeset::from_table(app_table); + let changeset = AppChangeset::from_table(app_table); diesel_update_table!(app_table, changeset, conn) }, } Ok(()) } - pub(crate) fn update_app(changeset: AppTableChangeset, conn: &SqliteConnection) -> Result<(), FlowyError> { + pub(crate) fn update_app(changeset: AppChangeset, conn: &SqliteConnection) -> Result<(), FlowyError> { diesel_update_table!(app_table, changeset, conn); Ok(()) } @@ -160,16 +161,16 @@ impl_sql_binary_expression!(ColorStyleCol); #[derive(AsChangeset, Identifiable, Default, Debug)] #[table_name = "app_table"] -pub(crate) struct AppTableChangeset { +pub(crate) struct AppChangeset { pub id: String, pub name: Option, pub desc: Option, pub is_trash: Option, } -impl AppTableChangeset { +impl AppChangeset { pub(crate) fn new(params: UpdateAppParams) -> Self { - AppTableChangeset { + AppChangeset { id: params.app_id, name: params.name, desc: params.desc, @@ -178,7 +179,7 @@ impl AppTableChangeset { } pub(crate) fn from_table(table: AppTable) -> Self { - AppTableChangeset { + AppChangeset { id: table.id, name: Some(table.name), desc: Some(table.desc), diff --git a/frontend/rust-lib/flowy-core/src/services/trash/controller.rs b/frontend/rust-lib/flowy-core/src/services/trash/controller.rs index dc007a90b6..e2efab3040 100644 --- a/frontend/rust-lib/flowy-core/src/services/trash/controller.rs +++ b/frontend/rust-lib/flowy-core/src/services/trash/controller.rs @@ -1,8 +1,8 @@ use crate::{ + dart_notification::{send_anonymous_dart_notification, WorkspaceNotification}, entities::trash::{RepeatedTrash, RepeatedTrashId, Trash, TrashId, TrashType}, errors::{FlowyError, FlowyResult}, module::{WorkspaceCloudService, WorkspaceDatabase, WorkspaceUser}, - notify::{send_anonymous_dart_notification, WorkspaceNotification}, services::trash::sql::TrashTableSql, }; use crossbeam_utils::thread; diff --git a/frontend/rust-lib/flowy-core/src/services/trash/sql.rs b/frontend/rust-lib/flowy-core/src/services/trash/sql.rs index 092cbe4ff4..fc90c20305 100644 --- a/frontend/rust-lib/flowy-core/src/services/trash/sql.rs +++ b/frontend/rust-lib/flowy-core/src/services/trash/sql.rs @@ -12,13 +12,13 @@ use flowy_database::{ pub struct TrashTableSql {} impl TrashTableSql { - pub(crate) fn create_trash(repeated_trash: Vec, conn: &SqliteConnection) -> Result<(), FlowyError> { - for trash in repeated_trash { + pub(crate) fn create_trash(trashes: Vec, conn: &SqliteConnection) -> Result<(), FlowyError> { + for trash in trashes { let trash_table: TrashTable = trash.into(); match diesel_record_count!(trash_table, &trash_table.id, conn) { 0 => diesel_insert_table!(trash_table, &trash_table, conn), _ => { - let changeset = TrashTableChangeset::from(trash_table); + let changeset = TrashChangeset::from(trash_table); diesel_update_table!(trash_table, changeset, conn) }, } @@ -88,15 +88,15 @@ impl std::convert::From for TrashTable { #[derive(AsChangeset, Identifiable, Clone, Default, Debug)] #[table_name = "trash_table"] -pub(crate) struct TrashTableChangeset { +pub(crate) struct TrashChangeset { pub id: String, pub name: Option, pub modified_time: i64, } -impl std::convert::From for TrashTableChangeset { +impl std::convert::From for TrashChangeset { fn from(trash: TrashTable) -> Self { - TrashTableChangeset { + TrashChangeset { id: trash.id, name: Some(trash.name), modified_time: trash.modified_time, diff --git a/frontend/rust-lib/flowy-core/src/services/view/controller.rs b/frontend/rust-lib/flowy-core/src/services/view/controller.rs index 9a2f9d5398..c161968875 100644 --- a/frontend/rust-lib/flowy-core/src/services/view/controller.rs +++ b/frontend/rust-lib/flowy-core/src/services/view/controller.rs @@ -8,15 +8,15 @@ use futures::{FutureExt, StreamExt}; use std::{collections::HashSet, sync::Arc}; use crate::{ + dart_notification::{send_dart_notification, WorkspaceNotification}, entities::{ trash::{RepeatedTrashId, TrashType}, view::{CreateViewParams, RepeatedView, UpdateViewParams, View, ViewId}, }, errors::{FlowyError, FlowyResult}, module::{WorkspaceCloudService, WorkspaceDatabase, WorkspaceUser}, - notify::{send_dart_notification, WorkspaceNotification}, services::{ - view::sql::{ViewTable, ViewTableChangeset, ViewTableSql}, + view::sql::{ViewChangeset, ViewTable, ViewTableSql}, TrashController, TrashEvent, }, @@ -92,8 +92,7 @@ impl ViewController { } pub(crate) fn save_view(&self, view: View, conn: &SqliteConnection) -> Result<(), FlowyError> { - let view_table = ViewTable::new(view); - let _ = ViewTableSql::create_view(view_table, conn)?; + let _ = ViewTableSql::create_view(view, conn)?; Ok(()) } @@ -196,7 +195,7 @@ impl ViewController { #[tracing::instrument(level = "debug", skip(self, params), err)] pub(crate) async fn update_view(&self, params: UpdateViewParams) -> Result { let conn = &*self.database.db_connection()?; - let changeset = ViewTableChangeset::new(params.clone()); + let changeset = ViewChangeset::new(params.clone()); let view_id = changeset.id.clone(); let updated_view = conn.immediate_transaction::<_, FlowyError, _>(|| { @@ -267,8 +266,7 @@ impl ViewController { match server.read_view(&token, params).await { Ok(Some(view)) => match pool.get() { Ok(conn) => { - let view_table = ViewTable::new(view.clone()); - let result = ViewTableSql::create_view(view_table, &conn); + let result = ViewTableSql::create_view(view.clone(), &conn); match result { Ok(_) => { send_dart_notification(&view.id, WorkspaceNotification::ViewUpdated) diff --git a/frontend/rust-lib/flowy-core/src/services/view/sql.rs b/frontend/rust-lib/flowy-core/src/services/view/sql.rs index b33c6fbb18..231a756717 100644 --- a/frontend/rust-lib/flowy-core/src/services/view/sql.rs +++ b/frontend/rust-lib/flowy-core/src/services/view/sql.rs @@ -17,11 +17,12 @@ use lib_infra::timestamp; pub struct ViewTableSql {} impl ViewTableSql { - pub(crate) fn create_view(view_table: ViewTable, conn: &SqliteConnection) -> Result<(), FlowyError> { + pub(crate) fn create_view(view: View, conn: &SqliteConnection) -> Result<(), FlowyError> { + let view_table = ViewTable::new(view); match diesel_record_count!(view_table, &view_table.id, conn) { 0 => diesel_insert_table!(view_table, &view_table, conn), _ => { - let changeset = ViewTableChangeset::from_table(view_table); + let changeset = ViewChangeset::from_table(view_table); diesel_update_table!(view_table, changeset, conn) }, } @@ -54,7 +55,7 @@ impl ViewTableSql { Ok(view_tables) } - pub(crate) fn update_view(changeset: ViewTableChangeset, conn: &SqliteConnection) -> Result<(), FlowyError> { + pub(crate) fn update_view(changeset: ViewChangeset, conn: &SqliteConnection) -> Result<(), FlowyError> { diesel_update_table!(view_table, changeset, conn); Ok(()) } @@ -181,7 +182,7 @@ impl std::convert::From for Trash { #[derive(AsChangeset, Identifiable, Clone, Default, Debug)] #[table_name = "view_table"] -pub(crate) struct ViewTableChangeset { +pub(crate) struct ViewChangeset { pub id: String, pub name: Option, pub desc: Option, @@ -189,9 +190,9 @@ pub(crate) struct ViewTableChangeset { pub modified_time: i64, } -impl ViewTableChangeset { +impl ViewChangeset { pub(crate) fn new(params: UpdateViewParams) -> Self { - ViewTableChangeset { + ViewChangeset { id: params.view_id, name: params.name, desc: params.desc, @@ -201,7 +202,7 @@ impl ViewTableChangeset { } pub(crate) fn from_table(table: ViewTable) -> Self { - ViewTableChangeset { + ViewChangeset { id: table.id, name: Some(table.name), desc: Some(table.desc), diff --git a/frontend/rust-lib/flowy-core/src/services/workspace/controller.rs b/frontend/rust-lib/flowy-core/src/services/workspace/controller.rs index cf94c26ab2..59fd24643e 100644 --- a/frontend/rust-lib/flowy-core/src/services/workspace/controller.rs +++ b/frontend/rust-lib/flowy-core/src/services/workspace/controller.rs @@ -1,10 +1,10 @@ use crate::{ + dart_notification::*, errors::*, module::{WorkspaceCloudService, WorkspaceDatabase, WorkspaceUser}, - notify::*, services::{ read_local_workspace_apps, - workspace::sql::{WorkspaceTable, WorkspaceTableChangeset, WorkspaceTableSql}, + workspace::sql::{WorkspaceTableChangeset, WorkspaceTableSql}, TrashController, }, }; @@ -47,7 +47,6 @@ impl WorkspaceController { pub(crate) async fn create_workspace_on_local(&self, workspace: Workspace) -> Result { let user_id = self.user.user_id()?; let token = self.user.token()?; - let workspace_table = WorkspaceTable::new(workspace.clone(), &user_id); let conn = &*self.database.db_connection()?; //[[immediate_transaction]] // https://sqlite.org/lang_transaction.html @@ -61,7 +60,7 @@ impl WorkspaceController { // other journaling modes, EXCLUSIVE prevents other database connections from // reading the database while the transaction is underway. conn.immediate_transaction::<_, FlowyError, _>(|| { - WorkspaceTableSql::create_workspace(workspace_table, conn)?; + WorkspaceTableSql::create_workspace(&user_id, workspace.clone(), conn)?; let repeated_workspace = self.read_local_workspaces(None, &user_id, conn)?; send_dart_notification(&token, WorkspaceNotification::UserCreateWorkspace) .payload(repeated_workspace) diff --git a/frontend/rust-lib/flowy-core/src/services/workspace/event_handler.rs b/frontend/rust-lib/flowy-core/src/services/workspace/event_handler.rs index 28a77802bf..2086c64ea9 100644 --- a/frontend/rust-lib/flowy-core/src/services/workspace/event_handler.rs +++ b/frontend/rust-lib/flowy-core/src/services/workspace/event_handler.rs @@ -1,6 +1,19 @@ -use crate::{errors::FlowyError, services::WorkspaceController}; - -use flowy_core_data_model::entities::{app::RepeatedApp, workspace::*}; +use crate::{ + context::CoreContext, + dart_notification::{send_dart_notification, WorkspaceNotification}, + errors::FlowyError, + services::{ + get_current_workspace, + read_local_workspace_apps, + workspace::sql::WorkspaceTableSql, + WorkspaceController, + }, +}; +use flowy_core_data_model::entities::{ + app::RepeatedApp, + view::View, + workspace::{CurrentWorkspaceSetting, QueryWorkspaceRequest, RepeatedWorkspace, WorkspaceId, *}, +}; use lib_dispatch::prelude::{data_result, Data, DataResult, Unit}; use std::{convert::TryInto, sync::Arc}; @@ -32,3 +45,97 @@ pub(crate) async fn open_workspace_handler( let workspaces = controller.open_workspace(params).await?; data_result(workspaces) } + +#[tracing::instrument(skip(data, core), err)] +pub(crate) async fn read_workspaces_handler( + data: Data, + core: Unit>, +) -> DataResult { + let params: WorkspaceId = data.into_inner().try_into()?; + let user_id = core.user.user_id()?; + let conn = &*core.database.db_connection()?; + let workspace_controller = core.workspace_controller.clone(); + + let trash_controller = core.trash_controller.clone(); + let workspaces = conn.immediate_transaction::<_, FlowyError, _>(|| { + let mut workspaces = workspace_controller.read_local_workspaces(params.workspace_id.clone(), &user_id, conn)?; + for workspace in workspaces.iter_mut() { + let apps = read_local_workspace_apps(&workspace.id, trash_controller.clone(), conn)?.into_inner(); + workspace.apps.items = apps; + } + Ok(workspaces) + })?; + + let _ = read_workspaces_on_server(core, user_id, params); + + data_result(workspaces) +} + +#[tracing::instrument(skip(core), err)] +pub async fn read_cur_workspace_handler( + core: Unit>, +) -> DataResult { + let workspace_id = get_current_workspace()?; + let user_id = core.user.user_id()?; + let params = WorkspaceId { + workspace_id: Some(workspace_id.clone()), + }; + let conn = &*core.database.db_connection()?; + let workspace = core + .workspace_controller + .read_local_workspace(workspace_id, &user_id, conn)?; + + let latest_view: Option = core.view_controller.latest_visit_view().unwrap_or(None); + let setting = CurrentWorkspaceSetting { workspace, latest_view }; + let _ = read_workspaces_on_server(core, user_id, params); + data_result(setting) +} + +#[tracing::instrument(level = "debug", skip(core), err)] +fn read_workspaces_on_server( + core: Unit>, + user_id: String, + params: WorkspaceId, +) -> Result<(), FlowyError> { + let (token, server) = (core.user.token()?, core.cloud_service.clone()); + let app_ctrl = core.app_controller.clone(); + let view_ctrl = core.view_controller.clone(); + let conn = core.database.db_connection()?; + + tokio::spawn(async move { + // Opti: handle the error and retry? + let workspaces = server.read_workspace(&token, params).await?; + let _ = (&*conn).immediate_transaction::<_, FlowyError, _>(|| { + tracing::debug!("Save {} workspace", workspaces.len()); + for workspace in &workspaces.items { + let m_workspace = workspace.clone(); + let apps = m_workspace.apps.clone().into_inner(); + let _ = WorkspaceTableSql::create_workspace(&user_id, m_workspace, &*conn)?; + tracing::debug!("Save {} apps", apps.len()); + for app in apps { + let views = app.belongings.clone().into_inner(); + match app_ctrl.save_app(app, &*conn) { + Ok(_) => {}, + Err(e) => log::error!("create app failed: {:?}", e), + } + + tracing::debug!("Save {} views", views.len()); + for view in views { + match view_ctrl.save_view(view, &*conn) { + Ok(_) => {}, + Err(e) => log::error!("create view failed: {:?}", e), + } + } + } + } + Ok(()) + })?; + + send_dart_notification(&token, WorkspaceNotification::WorkspaceListUpdated) + .payload(workspaces) + .send(); + Result::<(), FlowyError>::Ok(()) + }); + + Ok(()) +} diff --git a/frontend/rust-lib/flowy-core/src/services/workspace/sql.rs b/frontend/rust-lib/flowy-core/src/services/workspace/sql.rs index 6c0cf294ab..19649123ec 100644 --- a/frontend/rust-lib/flowy-core/src/services/workspace/sql.rs +++ b/frontend/rust-lib/flowy-core/src/services/workspace/sql.rs @@ -13,7 +13,12 @@ use flowy_database::{ pub(crate) struct WorkspaceTableSql {} impl WorkspaceTableSql { - pub(crate) fn create_workspace(table: WorkspaceTable, conn: &SqliteConnection) -> Result<(), FlowyError> { + pub(crate) fn create_workspace( + user_id: &str, + workspace: Workspace, + conn: &SqliteConnection, + ) -> Result<(), FlowyError> { + let table = WorkspaceTable::new(workspace, &user_id); match diesel_record_count!(workspace_table, &table.id, conn) { 0 => diesel_insert_table!(workspace_table, &table, conn), _ => { diff --git a/frontend/rust-lib/flowy-document/Flowy.toml b/frontend/rust-lib/flowy-document/Flowy.toml index f9ff7f7438..3b417207d9 100644 --- a/frontend/rust-lib/flowy-document/Flowy.toml +++ b/frontend/rust-lib/flowy-document/Flowy.toml @@ -1,3 +1,2 @@ - -proto_crates = ["src/notify"] +proto_crates = [] event_files = [] \ No newline at end of file diff --git a/frontend/rust-lib/flowy-document/src/lib.rs b/frontend/rust-lib/flowy-document/src/lib.rs index f845d5b331..4a0464c347 100644 --- a/frontend/rust-lib/flowy-document/src/lib.rs +++ b/frontend/rust-lib/flowy-document/src/lib.rs @@ -1,7 +1,7 @@ pub mod context; pub(crate) mod controller; pub mod core; -mod notify; +// mod notify; pub mod protobuf; mod ws_receivers; diff --git a/frontend/rust-lib/flowy-document/src/notify/mod.rs b/frontend/rust-lib/flowy-document/src/notify/mod.rs deleted file mode 100644 index a01ea122c4..0000000000 --- a/frontend/rust-lib/flowy-document/src/notify/mod.rs +++ /dev/null @@ -1 +0,0 @@ -mod observable; diff --git a/frontend/rust-lib/flowy-document/src/notify/observable.rs b/frontend/rust-lib/flowy-document/src/notify/observable.rs deleted file mode 100644 index 751b58625f..0000000000 --- a/frontend/rust-lib/flowy-document/src/notify/observable.rs +++ /dev/null @@ -1,16 +0,0 @@ -use dart_notify::DartNotifyBuilder; -use flowy_derive::ProtoBuf_Enum; -const OBSERVABLE_CATEGORY: &str = "Doc"; -#[derive(ProtoBuf_Enum, Debug)] -pub(crate) enum DocObservable { - UserCreateDoc = 0, -} - -impl std::convert::From for i32 { - fn from(o: DocObservable) -> Self { o as i32 } -} - -#[allow(dead_code)] -pub(crate) fn dart_notify(id: &str, ty: DocObservable) -> DartNotifyBuilder { - DartNotifyBuilder::new(id, ty, OBSERVABLE_CATEGORY) -} diff --git a/frontend/rust-lib/flowy-document/src/protobuf/model/mod.rs b/frontend/rust-lib/flowy-document/src/protobuf/model/mod.rs index 08899a0b2d..6e3d5a1000 100644 --- a/frontend/rust-lib/flowy-document/src/protobuf/model/mod.rs +++ b/frontend/rust-lib/flowy-document/src/protobuf/model/mod.rs @@ -1,5 +1,2 @@ #![cfg_attr(rustfmt, rustfmt::skip)] // Auto-generated, do not edit - -mod observable; -pub use observable::*; diff --git a/frontend/rust-lib/flowy-document/src/protobuf/model/observable.rs b/frontend/rust-lib/flowy-document/src/protobuf/model/observable.rs deleted file mode 100644 index 1acc0775bb..0000000000 --- a/frontend/rust-lib/flowy-document/src/protobuf/model/observable.rs +++ /dev/null @@ -1,92 +0,0 @@ -// This file is generated by rust-protobuf 2.22.1. 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 `observable.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; - -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum DocObservable { - UserCreateDoc = 0, -} - -impl ::protobuf::ProtobufEnum for DocObservable { - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(DocObservable::UserCreateDoc), - _ => ::std::option::Option::None - } - } - - fn values() -> &'static [Self] { - static values: &'static [DocObservable] = &[ - DocObservable::UserCreateDoc, - ]; - values - } - - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("DocObservable", file_descriptor_proto()) - }) - } -} - -impl ::std::marker::Copy for DocObservable { -} - -impl ::std::default::Default for DocObservable { - fn default() -> Self { - DocObservable::UserCreateDoc - } -} - -impl ::protobuf::reflect::ProtobufValue for DocObservable { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x10observable.proto*\"\n\rDocObservable\x12\x11\n\rUserCreateDoc\x10\ - \0JS\n\x06\x12\x04\0\0\x04\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\ - \x05\0\x12\x04\x02\0\x04\x01\n\n\n\x03\x05\0\x01\x12\x03\x02\x05\x12\n\ - \x0b\n\x04\x05\0\x02\0\x12\x03\x03\x04\x16\n\x0c\n\x05\x05\0\x02\0\x01\ - \x12\x03\x03\x04\x11\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x03\x14\x15b\ - \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/frontend/rust-lib/flowy-document/src/protobuf/proto/observable.proto b/frontend/rust-lib/flowy-document/src/protobuf/proto/observable.proto deleted file mode 100644 index deb97afa7d..0000000000 --- a/frontend/rust-lib/flowy-document/src/protobuf/proto/observable.proto +++ /dev/null @@ -1,5 +0,0 @@ -syntax = "proto3"; - -enum DocObservable { - UserCreateDoc = 0; -} diff --git a/frontend/rust-lib/flowy-user/Flowy.toml b/frontend/rust-lib/flowy-user/Flowy.toml index 2056e35fa5..f0c5e07832 100644 --- a/frontend/rust-lib/flowy-user/Flowy.toml +++ b/frontend/rust-lib/flowy-user/Flowy.toml @@ -1,3 +1,3 @@ -proto_crates = ["src/event.rs", "src/notify"] +proto_crates = ["src/event.rs", "src/dart_notification.rs"] event_files = ["src/event.rs"] \ No newline at end of file diff --git a/frontend/rust-lib/flowy-user/src/notify/observable.rs b/frontend/rust-lib/flowy-user/src/dart_notification.rs similarity index 100% rename from frontend/rust-lib/flowy-user/src/notify/observable.rs rename to frontend/rust-lib/flowy-user/src/dart_notification.rs diff --git a/frontend/rust-lib/flowy-user/src/lib.rs b/frontend/rust-lib/flowy-user/src/lib.rs index 62241d038b..e465b1a735 100644 --- a/frontend/rust-lib/flowy-user/src/lib.rs +++ b/frontend/rust-lib/flowy-user/src/lib.rs @@ -1,7 +1,7 @@ +mod dart_notification; pub mod event; mod handlers; pub mod module; -pub mod notify; pub mod protobuf; pub mod services; // mod sql_tables; diff --git a/frontend/rust-lib/flowy-user/src/notify/mod.rs b/frontend/rust-lib/flowy-user/src/notify/mod.rs deleted file mode 100644 index e77542857f..0000000000 --- a/frontend/rust-lib/flowy-user/src/notify/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -mod observable; -pub(crate) use observable::*; diff --git a/frontend/rust-lib/flowy-user/src/protobuf/model/observable.rs b/frontend/rust-lib/flowy-user/src/protobuf/model/dart_notification.rs similarity index 71% rename from frontend/rust-lib/flowy-user/src/protobuf/model/observable.rs rename to frontend/rust-lib/flowy-user/src/protobuf/model/dart_notification.rs index 4bd93b10ac..62c8f2b6d8 100644 --- a/frontend/rust-lib/flowy-user/src/protobuf/model/observable.rs +++ b/frontend/rust-lib/flowy-user/src/protobuf/model/dart_notification.rs @@ -17,7 +17,7 @@ #![allow(trivial_casts)] #![allow(unused_imports)] #![allow(unused_results)] -//! Generated file from `observable.proto` +//! Generated file from `dart_notification.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. @@ -83,22 +83,22 @@ impl ::protobuf::reflect::ProtobufValue for UserNotification { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x10observable.proto*\x81\x01\n\x10UserNotification\x12\x0b\n\x07Unkno\ - wn\x10\0\x12\x13\n\x0fUserAuthChanged\x10\x01\x12\x16\n\x12UserProfileUp\ - dated\x10\x02\x12\x14\n\x10UserUnauthorized\x10\x03\x12\x1d\n\x19UserWsC\ - onnectStateChanged\x10\x04J\xf7\x01\n\x06\x12\x04\0\0\x08\x01\n\x08\n\ - \x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x05\0\x12\x04\x02\0\x08\x01\n\n\n\x03\ - \x05\0\x01\x12\x03\x02\x05\x15\n\x0b\n\x04\x05\0\x02\0\x12\x03\x03\x04\ - \x10\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x03\x04\x0b\n\x0c\n\x05\x05\0\ - \x02\0\x02\x12\x03\x03\x0e\x0f\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x04\x04\ - \x18\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x04\x04\x13\n\x0c\n\x05\x05\0\ - \x02\x01\x02\x12\x03\x04\x16\x17\n\x0b\n\x04\x05\0\x02\x02\x12\x03\x05\ - \x04\x1b\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\x05\x04\x16\n\x0c\n\x05\ - \x05\0\x02\x02\x02\x12\x03\x05\x19\x1a\n\x0b\n\x04\x05\0\x02\x03\x12\x03\ - \x06\x04\x19\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03\x06\x04\x14\n\x0c\n\ - \x05\x05\0\x02\x03\x02\x12\x03\x06\x17\x18\n\x0b\n\x04\x05\0\x02\x04\x12\ - \x03\x07\x04\"\n\x0c\n\x05\x05\0\x02\x04\x01\x12\x03\x07\x04\x1d\n\x0c\n\ - \x05\x05\0\x02\x04\x02\x12\x03\x07\x20!b\x06proto3\ + \n\x17dart_notification.proto*\x81\x01\n\x10UserNotification\x12\x0b\n\ + \x07Unknown\x10\0\x12\x13\n\x0fUserAuthChanged\x10\x01\x12\x16\n\x12User\ + ProfileUpdated\x10\x02\x12\x14\n\x10UserUnauthorized\x10\x03\x12\x1d\n\ + \x19UserWsConnectStateChanged\x10\x04J\xf7\x01\n\x06\x12\x04\0\0\x07\x01\ + \n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x05\0\x12\x04\x01\0\x07\x01\n\ + \n\n\x03\x05\0\x01\x12\x03\x01\x05\x15\n\x0b\n\x04\x05\0\x02\0\x12\x03\ + \x02\x04\x10\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x02\x04\x0b\n\x0c\n\x05\ + \x05\0\x02\0\x02\x12\x03\x02\x0e\x0f\n\x0b\n\x04\x05\0\x02\x01\x12\x03\ + \x03\x04\x18\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x03\x04\x13\n\x0c\n\ + \x05\x05\0\x02\x01\x02\x12\x03\x03\x16\x17\n\x0b\n\x04\x05\0\x02\x02\x12\ + \x03\x04\x04\x1b\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\x04\x04\x16\n\x0c\ + \n\x05\x05\0\x02\x02\x02\x12\x03\x04\x19\x1a\n\x0b\n\x04\x05\0\x02\x03\ + \x12\x03\x05\x04\x19\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03\x05\x04\x14\n\ + \x0c\n\x05\x05\0\x02\x03\x02\x12\x03\x05\x17\x18\n\x0b\n\x04\x05\0\x02\ + \x04\x12\x03\x06\x04\"\n\x0c\n\x05\x05\0\x02\x04\x01\x12\x03\x06\x04\x1d\ + \n\x0c\n\x05\x05\0\x02\x04\x02\x12\x03\x06\x20!b\x06proto3\ "; static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; diff --git a/frontend/rust-lib/flowy-user/src/protobuf/model/mod.rs b/frontend/rust-lib/flowy-user/src/protobuf/model/mod.rs index b9a7e246fd..75a0938328 100644 --- a/frontend/rust-lib/flowy-user/src/protobuf/model/mod.rs +++ b/frontend/rust-lib/flowy-user/src/protobuf/model/mod.rs @@ -1,8 +1,8 @@ #![cfg_attr(rustfmt, rustfmt::skip)] // Auto-generated, do not edit -mod observable; -pub use observable::*; +mod dart_notification; +pub use dart_notification::*; mod event; pub use event::*; diff --git a/frontend/rust-lib/flowy-user/src/protobuf/proto/observable.proto b/frontend/rust-lib/flowy-user/src/protobuf/proto/dart_notification.proto similarity index 99% rename from frontend/rust-lib/flowy-user/src/protobuf/proto/observable.proto rename to frontend/rust-lib/flowy-user/src/protobuf/proto/dart_notification.proto index 4edff364f6..09547c65d1 100644 --- a/frontend/rust-lib/flowy-user/src/protobuf/proto/observable.proto +++ b/frontend/rust-lib/flowy-user/src/protobuf/proto/dart_notification.proto @@ -1,5 +1,4 @@ syntax = "proto3"; - enum UserNotification { Unknown = 0; UserAuthChanged = 1; diff --git a/frontend/rust-lib/flowy-user/src/services/user_session.rs b/frontend/rust-lib/flowy-user/src/services/user_session.rs index 03ab785801..2daf1c24e3 100644 --- a/frontend/rust-lib/flowy-user/src/services/user_session.rs +++ b/frontend/rust-lib/flowy-user/src/services/user_session.rs @@ -1,7 +1,7 @@ use crate::{ + dart_notification::*, errors::{ErrorCode, FlowyError}, module::UserCloudService, - notify::*, services::{ database::{UserDB, UserTable, UserTableChangeset}, notifier::UserNotifier, diff --git a/shared-lib/flowy-core-data-model/src/entities/app.rs b/shared-lib/flowy-core-data-model/src/entities/app.rs new file mode 100644 index 0000000000..211de61618 --- /dev/null +++ b/shared-lib/flowy-core-data-model/src/entities/app.rs @@ -0,0 +1,233 @@ +use crate::{ + entities::view::RepeatedView, + errors::ErrorCode, + impl_def_and_def_mut, + parser::{ + app::{AppColorStyle, AppIdentify, AppName}, + workspace::WorkspaceIdentify, + }, +}; +use flowy_derive::ProtoBuf; +use std::convert::TryInto; + +#[derive(PartialEq, ProtoBuf, Default, Debug, Clone)] +pub struct App { + #[pb(index = 1)] + pub id: String, + + #[pb(index = 2)] + pub workspace_id: String, + + #[pb(index = 3)] + pub name: String, + + #[pb(index = 4)] + pub desc: String, + + #[pb(index = 5)] + pub belongings: RepeatedView, + + #[pb(index = 6)] + pub version: i64, + + #[pb(index = 7)] + pub modified_time: i64, + + #[pb(index = 8)] + pub create_time: i64, +} + +impl App { + pub fn take_belongings(&mut self) -> RepeatedView { std::mem::take(&mut self.belongings) } +} + +#[derive(PartialEq, Debug, Default, ProtoBuf, Clone)] +pub struct RepeatedApp { + #[pb(index = 1)] + pub items: Vec, +} + +impl_def_and_def_mut!(RepeatedApp, App); + +#[derive(ProtoBuf, Default)] +pub struct CreateAppRequest { + #[pb(index = 1)] + pub workspace_id: String, + + #[pb(index = 2)] + pub name: String, + + #[pb(index = 3)] + pub desc: String, + + #[pb(index = 4)] + pub color_style: ColorStyle, +} + +#[derive(ProtoBuf, Default, Debug, Clone)] +pub struct ColorStyle { + #[pb(index = 1)] + pub theme_color: String, +} + +#[derive(ProtoBuf, Default, Debug)] +pub struct CreateAppParams { + #[pb(index = 1)] + pub workspace_id: String, + + #[pb(index = 2)] + pub name: String, + + #[pb(index = 3)] + pub desc: String, + + #[pb(index = 4)] + pub color_style: ColorStyle, +} + +impl TryInto for CreateAppRequest { + type Error = ErrorCode; + + fn try_into(self) -> Result { + let name = AppName::parse(self.name)?; + let id = WorkspaceIdentify::parse(self.workspace_id)?; + let color_style = AppColorStyle::parse(self.color_style.theme_color.clone())?; + + Ok(CreateAppParams { + workspace_id: id.0, + name: name.0, + desc: self.desc, + color_style: color_style.into(), + }) + } +} + +impl std::convert::From for ColorStyle { + fn from(data: AppColorStyle) -> Self { + ColorStyle { + theme_color: data.theme_color, + } + } +} + +#[derive(Default, ProtoBuf, Clone)] +pub struct QueryAppRequest { + #[pb(index = 1)] + pub app_ids: Vec, +} + +#[derive(ProtoBuf, Default, Clone, Debug)] +pub struct AppId { + #[pb(index = 1)] + pub app_id: String, +} + +impl AppId { + pub fn new(app_id: &str) -> Self { + Self { + app_id: app_id.to_string(), + } + } +} + +impl TryInto for QueryAppRequest { + type Error = ErrorCode; + + fn try_into(self) -> Result { + debug_assert!(self.app_ids.len() == 1); + if self.app_ids.len() != 1 { + log::error!("The len of app_ids should be equal to 1"); + return Err(ErrorCode::AppIdInvalid); + } + + let app_id = self.app_ids.first().unwrap().clone(); + let app_id = AppIdentify::parse(app_id)?.0; + Ok(AppId { app_id }) + } +} + +#[derive(ProtoBuf, Default)] +pub struct UpdateAppRequest { + #[pb(index = 1)] + pub app_id: String, + + #[pb(index = 2, one_of)] + pub name: Option, + + #[pb(index = 3, one_of)] + pub desc: Option, + + #[pb(index = 4, one_of)] + pub color_style: Option, + + #[pb(index = 5, one_of)] + pub is_trash: Option, +} + +#[derive(ProtoBuf, Default, Clone, Debug)] +pub struct UpdateAppParams { + #[pb(index = 1)] + pub app_id: String, + + #[pb(index = 2, one_of)] + pub name: Option, + + #[pb(index = 3, one_of)] + pub desc: Option, + + #[pb(index = 4, one_of)] + pub color_style: Option, + + #[pb(index = 5, one_of)] + pub is_trash: Option, +} + +impl UpdateAppParams { + pub fn new(app_id: &str) -> Self { + Self { + app_id: app_id.to_string(), + ..Default::default() + } + } + + pub fn name(mut self, name: &str) -> Self { + self.name = Some(name.to_string()); + self + } + + pub fn desc(mut self, desc: &str) -> Self { + self.desc = Some(desc.to_string()); + self + } + + pub fn trash(mut self) -> Self { + self.is_trash = Some(true); + self + } +} + +impl TryInto for UpdateAppRequest { + type Error = ErrorCode; + + fn try_into(self) -> Result { + let app_id = AppIdentify::parse(self.app_id)?.0; + + let name = match self.name { + None => None, + Some(name) => Some(AppName::parse(name)?.0), + }; + + let color_style = match self.color_style { + None => None, + Some(color_style) => Some(AppColorStyle::parse(color_style.theme_color)?.into()), + }; + + Ok(UpdateAppParams { + app_id, + name, + desc: self.desc, + color_style, + is_trash: self.is_trash, + }) + } +} diff --git a/shared-lib/flowy-core-data-model/src/entities/app/app_create.rs b/shared-lib/flowy-core-data-model/src/entities/app/app_create.rs deleted file mode 100644 index e3aeca0050..0000000000 --- a/shared-lib/flowy-core-data-model/src/entities/app/app_create.rs +++ /dev/null @@ -1,111 +0,0 @@ -use crate::{ - entities::view::RepeatedView, - errors::*, - impl_def_and_def_mut, - parser::{ - app::{AppColorStyle, AppName}, - workspace::WorkspaceIdentify, - }, -}; -use flowy_derive::ProtoBuf; -use std::convert::TryInto; - -#[derive(ProtoBuf, Default)] -pub struct CreateAppRequest { - #[pb(index = 1)] - pub workspace_id: String, - - #[pb(index = 2)] - pub name: String, - - #[pb(index = 3)] - pub desc: String, - - #[pb(index = 4)] - pub color_style: ColorStyle, -} - -#[derive(ProtoBuf, Default, Debug, Clone)] -pub struct ColorStyle { - #[pb(index = 1)] - pub theme_color: String, -} - -#[derive(ProtoBuf, Default, Debug)] -pub struct CreateAppParams { - #[pb(index = 1)] - pub workspace_id: String, - - #[pb(index = 2)] - pub name: String, - - #[pb(index = 3)] - pub desc: String, - - #[pb(index = 4)] - pub color_style: ColorStyle, -} - -impl TryInto for CreateAppRequest { - type Error = ErrorCode; - - fn try_into(self) -> Result { - let name = AppName::parse(self.name)?; - let id = WorkspaceIdentify::parse(self.workspace_id)?; - let color_style = AppColorStyle::parse(self.color_style.theme_color.clone())?; - - Ok(CreateAppParams { - workspace_id: id.0, - name: name.0, - desc: self.desc, - color_style: color_style.into(), - }) - } -} - -impl std::convert::From for ColorStyle { - fn from(data: AppColorStyle) -> Self { - ColorStyle { - theme_color: data.theme_color, - } - } -} - -#[derive(PartialEq, ProtoBuf, Default, Debug, Clone)] -pub struct App { - #[pb(index = 1)] - pub id: String, - - #[pb(index = 2)] - pub workspace_id: String, - - #[pb(index = 3)] - pub name: String, - - #[pb(index = 4)] - pub desc: String, - - #[pb(index = 5)] - pub belongings: RepeatedView, - - #[pb(index = 6)] - pub version: i64, - - #[pb(index = 7)] - pub modified_time: i64, - - #[pb(index = 8)] - pub create_time: i64, -} - -impl App { - pub fn take_belongings(&mut self) -> RepeatedView { std::mem::take(&mut self.belongings) } -} - -#[derive(PartialEq, Debug, Default, ProtoBuf, Clone)] -pub struct RepeatedApp { - #[pb(index = 1)] - pub items: Vec, -} - -impl_def_and_def_mut!(RepeatedApp, App); diff --git a/shared-lib/flowy-core-data-model/src/entities/app/app_query.rs b/shared-lib/flowy-core-data-model/src/entities/app/app_query.rs deleted file mode 100644 index 6a3fbb6db9..0000000000 --- a/shared-lib/flowy-core-data-model/src/entities/app/app_query.rs +++ /dev/null @@ -1,39 +0,0 @@ -use crate::{errors::ErrorCode, parser::app::AppIdentify}; -use flowy_derive::ProtoBuf; -use std::convert::TryInto; - -#[derive(Default, ProtoBuf, Clone)] -pub struct QueryAppRequest { - #[pb(index = 1)] - pub app_ids: Vec, -} - -#[derive(ProtoBuf, Default, Clone, Debug)] -pub struct AppId { - #[pb(index = 1)] - pub app_id: String, -} - -impl AppId { - pub fn new(app_id: &str) -> Self { - Self { - app_id: app_id.to_string(), - } - } -} - -impl TryInto for QueryAppRequest { - type Error = ErrorCode; - - fn try_into(self) -> Result { - debug_assert!(self.app_ids.len() == 1); - if self.app_ids.len() != 1 { - log::error!("The len of app_ids should be equal to 1"); - return Err(ErrorCode::AppIdInvalid); - } - - let app_id = self.app_ids.first().unwrap().clone(); - let app_id = AppIdentify::parse(app_id)?.0; - Ok(AppId { app_id }) - } -} diff --git a/shared-lib/flowy-core-data-model/src/entities/app/app_update.rs b/shared-lib/flowy-core-data-model/src/entities/app/app_update.rs deleted file mode 100644 index 98ba7ca0fa..0000000000 --- a/shared-lib/flowy-core-data-model/src/entities/app/app_update.rs +++ /dev/null @@ -1,93 +0,0 @@ -use crate::{ - entities::app::ColorStyle, - errors::ErrorCode, - parser::app::{AppColorStyle, AppIdentify, AppName}, -}; -use flowy_derive::ProtoBuf; -use std::convert::TryInto; - -#[derive(ProtoBuf, Default)] -pub struct UpdateAppRequest { - #[pb(index = 1)] - pub app_id: String, - - #[pb(index = 2, one_of)] - pub name: Option, - - #[pb(index = 3, one_of)] - pub desc: Option, - - #[pb(index = 4, one_of)] - pub color_style: Option, - - #[pb(index = 5, one_of)] - pub is_trash: Option, -} - -#[derive(ProtoBuf, Default, Clone, Debug)] -pub struct UpdateAppParams { - #[pb(index = 1)] - pub app_id: String, - - #[pb(index = 2, one_of)] - pub name: Option, - - #[pb(index = 3, one_of)] - pub desc: Option, - - #[pb(index = 4, one_of)] - pub color_style: Option, - - #[pb(index = 5, one_of)] - pub is_trash: Option, -} - -impl UpdateAppParams { - pub fn new(app_id: &str) -> Self { - Self { - app_id: app_id.to_string(), - ..Default::default() - } - } - - pub fn name(mut self, name: &str) -> Self { - self.name = Some(name.to_string()); - self - } - - pub fn desc(mut self, desc: &str) -> Self { - self.desc = Some(desc.to_string()); - self - } - - pub fn trash(mut self) -> Self { - self.is_trash = Some(true); - self - } -} - -impl TryInto for UpdateAppRequest { - type Error = ErrorCode; - - fn try_into(self) -> Result { - let app_id = AppIdentify::parse(self.app_id)?.0; - - let name = match self.name { - None => None, - Some(name) => Some(AppName::parse(name)?.0), - }; - - let color_style = match self.color_style { - None => None, - Some(color_style) => Some(AppColorStyle::parse(color_style.theme_color)?.into()), - }; - - Ok(UpdateAppParams { - app_id, - name, - desc: self.desc, - color_style, - is_trash: self.is_trash, - }) - } -} diff --git a/shared-lib/flowy-core-data-model/src/entities/app/mod.rs b/shared-lib/flowy-core-data-model/src/entities/app/mod.rs deleted file mode 100644 index 9b57a2fc33..0000000000 --- a/shared-lib/flowy-core-data-model/src/entities/app/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -mod app_create; -mod app_query; -mod app_update; -pub use app_create::*; -pub use app_query::*; -pub use app_update::*; diff --git a/shared-lib/flowy-core-data-model/src/entities/share/export.rs b/shared-lib/flowy-core-data-model/src/entities/share.rs similarity index 100% rename from shared-lib/flowy-core-data-model/src/entities/share/export.rs rename to shared-lib/flowy-core-data-model/src/entities/share.rs diff --git a/shared-lib/flowy-core-data-model/src/entities/share/mod.rs b/shared-lib/flowy-core-data-model/src/entities/share/mod.rs deleted file mode 100644 index a3fd22662b..0000000000 --- a/shared-lib/flowy-core-data-model/src/entities/share/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -mod export; - -pub use export::*; diff --git a/shared-lib/flowy-core-data-model/src/entities/trash/trash_create.rs b/shared-lib/flowy-core-data-model/src/entities/trash.rs similarity index 100% rename from shared-lib/flowy-core-data-model/src/entities/trash/trash_create.rs rename to shared-lib/flowy-core-data-model/src/entities/trash.rs diff --git a/shared-lib/flowy-core-data-model/src/entities/trash/mod.rs b/shared-lib/flowy-core-data-model/src/entities/trash/mod.rs deleted file mode 100644 index bd524cd0a6..0000000000 --- a/shared-lib/flowy-core-data-model/src/entities/trash/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -mod trash_create; -pub use trash_create::*; diff --git a/shared-lib/flowy-core-data-model/src/entities/view/view_create.rs b/shared-lib/flowy-core-data-model/src/entities/view.rs similarity index 51% rename from shared-lib/flowy-core-data-model/src/entities/view/view_create.rs rename to shared-lib/flowy-core-data-model/src/entities/view.rs index 684658effd..46a6e334b2 100644 --- a/shared-lib/flowy-core-data-model/src/entities/view/view_create.rs +++ b/shared-lib/flowy-core-data-model/src/entities/view.rs @@ -4,13 +4,63 @@ use crate::{ impl_def_and_def_mut, parser::{ app::AppIdentify, - view::{ViewName, ViewThumbnail}, + view::{ViewDesc, ViewIdentify, ViewName, ViewThumbnail}, }, }; -use flowy_collaboration::client_document::default::initial_delta_string; +use flowy_collaboration::{client_document::default::initial_delta_string, entities::doc::DocumentId}; use flowy_derive::{ProtoBuf, ProtoBuf_Enum}; use std::convert::TryInto; +#[derive(PartialEq, ProtoBuf, Default, Debug, Clone)] +pub struct View { + #[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 view_type: ViewType, + + #[pb(index = 6)] + pub version: i64, + + #[pb(index = 7)] + pub belongings: RepeatedView, + + #[pb(index = 8)] + pub modified_time: i64, + + #[pb(index = 9)] + pub create_time: i64, +} + +#[derive(PartialEq, Debug, Default, ProtoBuf, Clone)] +pub struct RepeatedView { + #[pb(index = 1)] + pub items: Vec, +} + +impl_def_and_def_mut!(RepeatedView, View); + +impl std::convert::From for Trash { + fn from(view: View) -> Self { + Trash { + id: view.id, + name: view.name, + modified_time: view.modified_time, + create_time: view.create_time, + ty: TrashType::View, + } + } +} + #[derive(PartialEq, Debug, ProtoBuf_Enum, Clone)] pub enum ViewType { Blank = 0, @@ -124,52 +174,142 @@ impl TryInto for CreateViewRequest { } } -#[derive(PartialEq, ProtoBuf, Default, Debug, Clone)] -pub struct View { +#[derive(Default, ProtoBuf)] +pub struct QueryViewRequest { #[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 view_type: ViewType, - - #[pb(index = 6)] - pub version: i64, - - #[pb(index = 7)] - pub belongings: RepeatedView, - - #[pb(index = 8)] - pub modified_time: i64, - - #[pb(index = 9)] - pub create_time: i64, + pub view_ids: Vec, } -#[derive(PartialEq, Debug, Default, ProtoBuf, Clone)] -pub struct RepeatedView { +#[derive(Default, ProtoBuf, Clone, Debug)] +pub struct ViewId { #[pb(index = 1)] - pub items: Vec, + pub view_id: String, } -impl_def_and_def_mut!(RepeatedView, View); +impl std::convert::From for ViewId { + fn from(view_id: String) -> Self { ViewId { view_id } } +} -impl std::convert::From for Trash { - fn from(view: View) -> Self { - Trash { - id: view.id, - name: view.name, - modified_time: view.modified_time, - create_time: view.create_time, - ty: TrashType::View, +impl std::convert::From for DocumentId { + fn from(identifier: ViewId) -> Self { + DocumentId { + doc_id: identifier.view_id, } } } + +impl TryInto for QueryViewRequest { + type Error = ErrorCode; + fn try_into(self) -> Result { + debug_assert!(self.view_ids.len() == 1); + if self.view_ids.len() != 1 { + log::error!("The len of view_ids should be equal to 1"); + return Err(ErrorCode::ViewIdInvalid); + } + + let view_id = self.view_ids.first().unwrap().clone(); + let view_id = ViewIdentify::parse(view_id)?.0; + + Ok(ViewId { view_id }) + } +} + +#[derive(Default, ProtoBuf)] +pub struct RepeatedViewId { + #[pb(index = 1)] + pub items: Vec, +} + +impl TryInto for QueryViewRequest { + type Error = ErrorCode; + + fn try_into(self) -> Result { + let mut view_ids = vec![]; + for view_id in self.view_ids { + let view_id = ViewIdentify::parse(view_id)?.0; + + view_ids.push(view_id); + } + + Ok(RepeatedViewId { items: view_ids }) + } +} + +#[derive(Default, ProtoBuf)] +pub struct UpdateViewRequest { + #[pb(index = 1)] + pub view_id: String, + + #[pb(index = 2, one_of)] + pub name: Option, + + #[pb(index = 3, one_of)] + pub desc: Option, + + #[pb(index = 4, one_of)] + pub thumbnail: Option, +} + +#[derive(Default, ProtoBuf, Clone, Debug)] +pub struct UpdateViewParams { + #[pb(index = 1)] + pub view_id: String, + + #[pb(index = 2, one_of)] + pub name: Option, + + #[pb(index = 3, one_of)] + pub desc: Option, + + #[pb(index = 4, one_of)] + pub thumbnail: Option, +} + +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 for UpdateViewRequest { + type Error = ErrorCode; + + fn try_into(self) -> Result { + let view_id = ViewIdentify::parse(self.view_id)?.0; + + let name = match self.name { + None => None, + Some(name) => Some(ViewName::parse(name)?.0), + }; + + let desc = match self.desc { + None => None, + Some(desc) => Some(ViewDesc::parse(desc)?.0), + }; + + let thumbnail = match self.thumbnail { + None => None, + Some(thumbnail) => Some(ViewThumbnail::parse(thumbnail)?.0), + }; + + Ok(UpdateViewParams { + view_id, + name, + desc, + thumbnail, + }) + } +} diff --git a/shared-lib/flowy-core-data-model/src/entities/view/mod.rs b/shared-lib/flowy-core-data-model/src/entities/view/mod.rs deleted file mode 100644 index 059bc4fe3f..0000000000 --- a/shared-lib/flowy-core-data-model/src/entities/view/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -pub use view_create::*; -pub use view_query::*; -pub use view_update::*; - -mod view_create; -mod view_query; -mod view_update; diff --git a/shared-lib/flowy-core-data-model/src/entities/view/view_query.rs b/shared-lib/flowy-core-data-model/src/entities/view/view_query.rs deleted file mode 100644 index 798e057254..0000000000 --- a/shared-lib/flowy-core-data-model/src/entities/view/view_query.rs +++ /dev/null @@ -1,65 +0,0 @@ -use crate::{errors::ErrorCode, parser::view::ViewIdentify}; -use flowy_collaboration::entities::doc::DocumentId; -use flowy_derive::ProtoBuf; -use std::convert::TryInto; - -#[derive(Default, ProtoBuf)] -pub struct QueryViewRequest { - #[pb(index = 1)] - pub view_ids: Vec, -} - -#[derive(Default, ProtoBuf, Clone, Debug)] -pub struct ViewId { - #[pb(index = 1)] - pub view_id: String, -} - -impl std::convert::From for ViewId { - fn from(view_id: String) -> Self { ViewId { view_id } } -} - -impl std::convert::From for DocumentId { - fn from(identifier: ViewId) -> Self { - DocumentId { - doc_id: identifier.view_id, - } - } -} - -impl TryInto for QueryViewRequest { - type Error = ErrorCode; - fn try_into(self) -> Result { - debug_assert!(self.view_ids.len() == 1); - if self.view_ids.len() != 1 { - log::error!("The len of view_ids should be equal to 1"); - return Err(ErrorCode::ViewIdInvalid); - } - - let view_id = self.view_ids.first().unwrap().clone(); - let view_id = ViewIdentify::parse(view_id)?.0; - - Ok(ViewId { view_id }) - } -} - -#[derive(Default, ProtoBuf)] -pub struct RepeatedViewId { - #[pb(index = 1)] - pub items: Vec, -} - -impl TryInto for QueryViewRequest { - type Error = ErrorCode; - - fn try_into(self) -> Result { - let mut view_ids = vec![]; - for view_id in self.view_ids { - let view_id = ViewIdentify::parse(view_id)?.0; - - view_ids.push(view_id); - } - - Ok(RepeatedViewId { items: view_ids }) - } -} diff --git a/shared-lib/flowy-core-data-model/src/entities/view/view_update.rs b/shared-lib/flowy-core-data-model/src/entities/view/view_update.rs deleted file mode 100644 index f80e64d692..0000000000 --- a/shared-lib/flowy-core-data-model/src/entities/view/view_update.rs +++ /dev/null @@ -1,105 +0,0 @@ -use crate::{ - errors::ErrorCode, - parser::view::{ViewDesc, ViewIdentify, ViewName, ViewThumbnail}, -}; -use flowy_derive::ProtoBuf; -use std::convert::TryInto; - -#[derive(Default, ProtoBuf)] -pub struct UpdateViewRequest { - #[pb(index = 1)] - pub view_id: String, - - #[pb(index = 2, one_of)] - pub name: Option, - - #[pb(index = 3, one_of)] - pub desc: Option, - - #[pb(index = 4, one_of)] - pub thumbnail: Option, -} - -#[derive(Default, ProtoBuf, Clone, Debug)] -pub struct UpdateViewParams { - #[pb(index = 1)] - pub view_id: String, - - #[pb(index = 2, one_of)] - pub name: Option, - - #[pb(index = 3, one_of)] - pub desc: Option, - - #[pb(index = 4, one_of)] - pub thumbnail: Option, -} - -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 for UpdateViewRequest { - type Error = ErrorCode; - - fn try_into(self) -> Result { - let view_id = ViewIdentify::parse(self.view_id)?.0; - - let name = match self.name { - None => None, - Some(name) => Some(ViewName::parse(name)?.0), - }; - - let desc = match self.desc { - None => None, - Some(desc) => Some(ViewDesc::parse(desc)?.0), - }; - - let thumbnail = match self.thumbnail { - None => None, - Some(thumbnail) => Some(ViewThumbnail::parse(thumbnail)?.0), - }; - - Ok(UpdateViewParams { - view_id, - name, - desc, - thumbnail, - }) - } -} -// #[derive(Default, ProtoBuf)] -// pub struct DocDeltaRequest { -// #[pb(index = 1)] -// pub view_id: String, -// -// #[pb(index = 2)] -// pub data: String, -// } -// -// impl TryInto for DocDeltaRequest { -// type Error = FlowyError; -// -// fn try_into(self) -> Result { -// let view_id = ViewId::parse(self.view_id) -// .map_err(|e| FlowyError::view_id().context(e))? -// .0; -// -// Ok(DocumentDelta { doc_id: view_id, data: self.data }) -// } -// } diff --git a/shared-lib/flowy-core-data-model/src/entities/workspace.rs b/shared-lib/flowy-core-data-model/src/entities/workspace.rs new file mode 100644 index 0000000000..1d25a25801 --- /dev/null +++ b/shared-lib/flowy-core-data-model/src/entities/workspace.rs @@ -0,0 +1,158 @@ +use crate::{ + entities::{app::RepeatedApp, view::View}, + errors::*, + impl_def_and_def_mut, + parser::workspace::{WorkspaceDesc, WorkspaceIdentify, WorkspaceName}, +}; +use flowy_derive::ProtoBuf; +use std::convert::TryInto; + +#[derive(PartialEq, ProtoBuf, Default, Debug, Clone)] +pub struct Workspace { + #[pb(index = 1)] + pub id: String, + + #[pb(index = 2)] + pub name: String, + + #[pb(index = 3)] + pub desc: String, + + #[pb(index = 4)] + pub apps: RepeatedApp, + + #[pb(index = 5)] + pub modified_time: i64, + + #[pb(index = 6)] + pub create_time: i64, +} + +impl Workspace { + pub fn take_apps(&mut self) -> RepeatedApp { std::mem::take(&mut self.apps) } +} +#[derive(PartialEq, Debug, Default, ProtoBuf)] +pub struct RepeatedWorkspace { + #[pb(index = 1)] + pub items: Vec, +} + +impl_def_and_def_mut!(RepeatedWorkspace, Workspace); + +#[derive(ProtoBuf, Default)] +pub struct CreateWorkspaceRequest { + #[pb(index = 1)] + pub name: String, + + #[pb(index = 2)] + pub desc: String, +} + +#[derive(Clone, ProtoBuf, Default, Debug)] +pub struct CreateWorkspaceParams { + #[pb(index = 1)] + pub name: String, + + #[pb(index = 2)] + pub desc: String, +} + +impl TryInto for CreateWorkspaceRequest { + type Error = ErrorCode; + + fn try_into(self) -> Result { + let name = WorkspaceName::parse(self.name)?; + let desc = WorkspaceDesc::parse(self.desc)?; + + Ok(CreateWorkspaceParams { + name: name.0, + desc: desc.0, + }) + } +} + +#[derive(Default, ProtoBuf, Clone)] +pub struct QueryWorkspaceRequest { + // return all workspace if workspace_id is None + #[pb(index = 1, one_of)] + pub workspace_id: Option, +} + +impl QueryWorkspaceRequest { + pub fn new(workspace_id: Option) -> Self { Self { workspace_id } } +} + +// Read all workspaces if the workspace_id is None +#[derive(Clone, ProtoBuf, Default, Debug)] +pub struct WorkspaceId { + #[pb(index = 1, one_of)] + pub workspace_id: Option, +} + +impl WorkspaceId { + pub fn new(workspace_id: Option) -> Self { Self { workspace_id } } +} + +impl TryInto for QueryWorkspaceRequest { + type Error = ErrorCode; + + fn try_into(self) -> Result { + let workspace_id = match self.workspace_id { + None => None, + Some(workspace_id) => Some(WorkspaceIdentify::parse(workspace_id)?.0), + }; + + Ok(WorkspaceId { workspace_id }) + } +} + +#[derive(Default, ProtoBuf, Clone)] +pub struct CurrentWorkspaceSetting { + #[pb(index = 1)] + pub workspace: Workspace, + + #[pb(index = 2, one_of)] + pub latest_view: Option, +} + +#[derive(ProtoBuf, Default)] +pub struct UpdateWorkspaceRequest { + #[pb(index = 1)] + id: String, + + #[pb(index = 2, one_of)] + name: Option, + + #[pb(index = 3, one_of)] + desc: Option, +} + +#[derive(Clone, ProtoBuf, Default, Debug)] +pub struct UpdateWorkspaceParams { + #[pb(index = 1)] + pub id: String, + + #[pb(index = 2, one_of)] + pub name: Option, + + #[pb(index = 3, one_of)] + pub desc: Option, +} + +impl TryInto for UpdateWorkspaceRequest { + type Error = ErrorCode; + + fn try_into(self) -> Result { + let name = match self.name { + None => None, + Some(name) => Some(WorkspaceName::parse(name)?.0), + }; + let id = WorkspaceIdentify::parse(self.id)?; + + Ok(UpdateWorkspaceParams { + id: id.0, + name, + desc: self.desc, + }) + } +} diff --git a/shared-lib/flowy-core-data-model/src/entities/workspace/mod.rs b/shared-lib/flowy-core-data-model/src/entities/workspace/mod.rs deleted file mode 100644 index 097c86bd76..0000000000 --- a/shared-lib/flowy-core-data-model/src/entities/workspace/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -pub use workspace_create::*; -pub use workspace_query::*; -pub use workspace_setting::*; -pub use workspace_update::*; - -mod workspace_create; -mod workspace_query; -mod workspace_setting; -mod workspace_update; diff --git a/shared-lib/flowy-core-data-model/src/entities/workspace/workspace_create.rs b/shared-lib/flowy-core-data-model/src/entities/workspace/workspace_create.rs deleted file mode 100644 index c03b154e9c..0000000000 --- a/shared-lib/flowy-core-data-model/src/entities/workspace/workspace_create.rs +++ /dev/null @@ -1,72 +0,0 @@ -use crate::{ - entities::app::RepeatedApp, - errors::*, - impl_def_and_def_mut, - parser::workspace::{WorkspaceDesc, WorkspaceName}, -}; -use flowy_derive::ProtoBuf; -use std::convert::TryInto; - -#[derive(ProtoBuf, Default)] -pub struct CreateWorkspaceRequest { - #[pb(index = 1)] - pub name: String, - - #[pb(index = 2)] - pub desc: String, -} - -#[derive(Clone, ProtoBuf, Default, Debug)] -pub struct CreateWorkspaceParams { - #[pb(index = 1)] - pub name: String, - - #[pb(index = 2)] - pub desc: String, -} - -impl TryInto for CreateWorkspaceRequest { - type Error = ErrorCode; - - fn try_into(self) -> Result { - let name = WorkspaceName::parse(self.name)?; - let desc = WorkspaceDesc::parse(self.desc)?; - - Ok(CreateWorkspaceParams { - name: name.0, - desc: desc.0, - }) - } -} - -#[derive(PartialEq, ProtoBuf, Default, Debug, Clone)] -pub struct Workspace { - #[pb(index = 1)] - pub id: String, - - #[pb(index = 2)] - pub name: String, - - #[pb(index = 3)] - pub desc: String, - - #[pb(index = 4)] - pub apps: RepeatedApp, - - #[pb(index = 5)] - pub modified_time: i64, - - #[pb(index = 6)] - pub create_time: i64, -} - -impl Workspace { - pub fn take_apps(&mut self) -> RepeatedApp { std::mem::take(&mut self.apps) } -} -#[derive(PartialEq, Debug, Default, ProtoBuf)] -pub struct RepeatedWorkspace { - #[pb(index = 1)] - pub items: Vec, -} - -impl_def_and_def_mut!(RepeatedWorkspace, Workspace); diff --git a/shared-lib/flowy-core-data-model/src/entities/workspace/workspace_query.rs b/shared-lib/flowy-core-data-model/src/entities/workspace/workspace_query.rs deleted file mode 100644 index 649783c8f0..0000000000 --- a/shared-lib/flowy-core-data-model/src/entities/workspace/workspace_query.rs +++ /dev/null @@ -1,38 +0,0 @@ -use crate::{errors::*, parser::workspace::WorkspaceIdentify}; -use flowy_derive::ProtoBuf; -use std::convert::TryInto; - -#[derive(Default, ProtoBuf, Clone)] -pub struct QueryWorkspaceRequest { - // return all workspace if workspace_id is None - #[pb(index = 1, one_of)] - pub workspace_id: Option, -} - -impl QueryWorkspaceRequest { - pub fn new(workspace_id: Option) -> Self { Self { workspace_id } } -} - -// Read all workspaces if the workspace_id is None -#[derive(Clone, ProtoBuf, Default, Debug)] -pub struct WorkspaceId { - #[pb(index = 1, one_of)] - pub workspace_id: Option, -} - -impl WorkspaceId { - pub fn new(workspace_id: Option) -> Self { Self { workspace_id } } -} - -impl TryInto for QueryWorkspaceRequest { - type Error = ErrorCode; - - fn try_into(self) -> Result { - let workspace_id = match self.workspace_id { - None => None, - Some(workspace_id) => Some(WorkspaceIdentify::parse(workspace_id)?.0), - }; - - Ok(WorkspaceId { workspace_id }) - } -} diff --git a/shared-lib/flowy-core-data-model/src/entities/workspace/workspace_setting.rs b/shared-lib/flowy-core-data-model/src/entities/workspace/workspace_setting.rs deleted file mode 100644 index 47d5d5decb..0000000000 --- a/shared-lib/flowy-core-data-model/src/entities/workspace/workspace_setting.rs +++ /dev/null @@ -1,11 +0,0 @@ -use crate::entities::{view::View, workspace::Workspace}; -use flowy_derive::ProtoBuf; - -#[derive(Default, ProtoBuf, Clone)] -pub struct CurrentWorkspaceSetting { - #[pb(index = 1)] - pub workspace: Workspace, - - #[pb(index = 2, one_of)] - pub latest_view: Option, -} diff --git a/shared-lib/flowy-core-data-model/src/entities/workspace/workspace_update.rs b/shared-lib/flowy-core-data-model/src/entities/workspace/workspace_update.rs deleted file mode 100644 index 8cef9ca5db..0000000000 --- a/shared-lib/flowy-core-data-model/src/entities/workspace/workspace_update.rs +++ /dev/null @@ -1,48 +0,0 @@ -use crate::{ - errors::*, - parser::workspace::{WorkspaceIdentify, WorkspaceName}, -}; -use flowy_derive::ProtoBuf; -use std::convert::TryInto; - -#[derive(ProtoBuf, Default)] -pub struct UpdateWorkspaceRequest { - #[pb(index = 1)] - id: String, - - #[pb(index = 2, one_of)] - name: Option, - - #[pb(index = 3, one_of)] - desc: Option, -} - -#[derive(Clone, ProtoBuf, Default, Debug)] -pub struct UpdateWorkspaceParams { - #[pb(index = 1)] - pub id: String, - - #[pb(index = 2, one_of)] - pub name: Option, - - #[pb(index = 3, one_of)] - pub desc: Option, -} - -impl TryInto for UpdateWorkspaceRequest { - type Error = ErrorCode; - - fn try_into(self) -> Result { - let name = match self.name { - None => None, - Some(name) => Some(WorkspaceName::parse(name)?.0), - }; - let id = WorkspaceIdentify::parse(self.id)?; - - Ok(UpdateWorkspaceParams { - id: id.0, - name, - desc: self.desc, - }) - } -} diff --git a/shared-lib/flowy-core-data-model/src/protobuf/model/app.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/app.rs new file mode 100644 index 0000000000..1c0406ff84 --- /dev/null +++ b/shared-lib/flowy-core-data-model/src/protobuf/model/app.rs @@ -0,0 +1,2797 @@ +// This file is generated by rust-protobuf 2.22.1. 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 `app.proto` + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; + +#[derive(PartialEq,Clone,Default)] +pub struct App { + // message fields + pub id: ::std::string::String, + pub workspace_id: ::std::string::String, + pub name: ::std::string::String, + pub desc: ::std::string::String, + pub belongings: ::protobuf::SingularPtrField, + pub version: i64, + pub modified_time: i64, + pub create_time: i64, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a App { + fn default() -> &'a App { + ::default_instance() + } +} + +impl App { + pub fn new() -> App { + ::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 workspace_id = 2; + + + pub fn get_workspace_id(&self) -> &str { + &self.workspace_id + } + pub fn clear_workspace_id(&mut self) { + self.workspace_id.clear(); + } + + // Param is passed by value, moved + pub fn set_workspace_id(&mut self, v: ::std::string::String) { + self.workspace_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String { + &mut self.workspace_id + } + + // Take field + pub fn take_workspace_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.workspace_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()) + } + + // .RepeatedView belongings = 5; + + + pub fn get_belongings(&self) -> &super::view::RepeatedView { + self.belongings.as_ref().unwrap_or_else(|| ::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()) + } + + // int64 version = 6; + + + pub fn get_version(&self) -> i64 { + self.version + } + pub fn clear_version(&mut self) { + self.version = 0; + } + + // Param is passed by value, moved + pub fn set_version(&mut self, v: i64) { + self.version = v; + } + + // int64 modified_time = 7; + + + pub fn get_modified_time(&self) -> i64 { + self.modified_time + } + pub fn clear_modified_time(&mut self) { + self.modified_time = 0; + } + + // Param is passed by value, moved + pub fn set_modified_time(&mut self, v: i64) { + self.modified_time = v; + } + + // int64 create_time = 8; + + + pub fn get_create_time(&self) -> i64 { + self.create_time + } + pub fn clear_create_time(&mut self) { + self.create_time = 0; + } + + // Param is passed by value, moved + pub fn set_create_time(&mut self, v: i64) { + self.create_time = v; + } +} + +impl ::protobuf::Message for App { + fn is_initialized(&self) -> bool { + for v in &self.belongings { + 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.workspace_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_singular_message_into(wire_type, is, &mut self.belongings)?; + }, + 6 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.version = tmp; + }, + 7 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.modified_time = tmp; + }, + 8 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.create_time = tmp; + }, + _ => { + ::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.workspace_id.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.workspace_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 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 self.version != 0 { + my_size += ::protobuf::rt::value_size(6, self.version, ::protobuf::wire_format::WireTypeVarint); + } + if self.modified_time != 0 { + my_size += ::protobuf::rt::value_size(7, self.modified_time, ::protobuf::wire_format::WireTypeVarint); + } + if self.create_time != 0 { + my_size += ::protobuf::rt::value_size(8, self.create_time, ::protobuf::wire_format::WireTypeVarint); + } + 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.workspace_id.is_empty() { + os.write_string(2, &self.workspace_id)?; + } + if !self.name.is_empty() { + os.write_string(3, &self.name)?; + } + if !self.desc.is_empty() { + os.write_string(4, &self.desc)?; + } + if let Some(ref v) = self.belongings.as_ref() { + os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.version != 0 { + os.write_int64(6, self.version)?; + } + if self.modified_time != 0 { + os.write_int64(7, self.modified_time)?; + } + if self.create_time != 0 { + os.write_int64(8, self.create_time)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> App { + App::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: &App| { &m.id }, + |m: &mut App| { &mut m.id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "workspace_id", + |m: &App| { &m.workspace_id }, + |m: &mut App| { &mut m.workspace_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "name", + |m: &App| { &m.name }, + |m: &mut App| { &mut m.name }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "desc", + |m: &App| { &m.desc }, + |m: &mut App| { &mut m.desc }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "belongings", + |m: &App| { &m.belongings }, + |m: &mut App| { &mut m.belongings }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "version", + |m: &App| { &m.version }, + |m: &mut App| { &mut m.version }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "modified_time", + |m: &App| { &m.modified_time }, + |m: &mut App| { &mut m.modified_time }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "create_time", + |m: &App| { &m.create_time }, + |m: &mut App| { &mut m.create_time }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "App", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static App { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(App::new) + } +} + +impl ::protobuf::Clear for App { + fn clear(&mut self) { + self.id.clear(); + self.workspace_id.clear(); + self.name.clear(); + self.desc.clear(); + self.belongings.clear(); + self.version = 0; + self.modified_time = 0; + self.create_time = 0; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for App { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for App { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct RepeatedApp { + // message fields + pub items: ::protobuf::RepeatedField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a RepeatedApp { + fn default() -> &'a RepeatedApp { + ::default_instance() + } +} + +impl RepeatedApp { + pub fn new() -> RepeatedApp { + ::std::default::Default::default() + } + + // repeated .App items = 1; + + + pub fn get_items(&self) -> &[App] { + &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) { + self.items = v; + } + + // Mutable pointer to the field. + pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.items + } + + // Take field + pub fn take_items(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new()) + } +} + +impl ::protobuf::Message for RepeatedApp { + fn is_initialized(&self) -> bool { + for v in &self.items { + 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_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())?; + }, + }; + } + ::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 { + 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<()> { + 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(()) + } + + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> RepeatedApp { + RepeatedApp::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>( + "items", + |m: &RepeatedApp| { &m.items }, + |m: &mut RepeatedApp| { &mut m.items }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RepeatedApp", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static RepeatedApp { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RepeatedApp::new) + } +} + +impl ::protobuf::Clear for RepeatedApp { + fn clear(&mut self) { + self.items.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for RepeatedApp { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for RepeatedApp { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct CreateAppRequest { + // message fields + pub workspace_id: ::std::string::String, + pub name: ::std::string::String, + pub desc: ::std::string::String, + pub color_style: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CreateAppRequest { + fn default() -> &'a CreateAppRequest { + ::default_instance() + } +} + +impl CreateAppRequest { + pub fn new() -> CreateAppRequest { + ::std::default::Default::default() + } + + // string workspace_id = 1; + + + pub fn get_workspace_id(&self) -> &str { + &self.workspace_id + } + pub fn clear_workspace_id(&mut self) { + self.workspace_id.clear(); + } + + // Param is passed by value, moved + pub fn set_workspace_id(&mut self, v: ::std::string::String) { + self.workspace_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String { + &mut self.workspace_id + } + + // Take field + pub fn take_workspace_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.workspace_id, ::std::string::String::new()) + } + + // string name = 2; + + + 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 = 3; + + + 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()) + } + + // .ColorStyle color_style = 4; + + + pub fn get_color_style(&self) -> &ColorStyle { + self.color_style.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_color_style(&mut self) { + self.color_style.clear(); + } + + pub fn has_color_style(&self) -> bool { + self.color_style.is_some() + } + + // Param is passed by value, moved + pub fn set_color_style(&mut self, v: ColorStyle) { + self.color_style = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_color_style(&mut self) -> &mut ColorStyle { + if self.color_style.is_none() { + self.color_style.set_default(); + } + self.color_style.as_mut().unwrap() + } + + // Take field + pub fn take_color_style(&mut self) -> ColorStyle { + self.color_style.take().unwrap_or_else(|| ColorStyle::new()) + } +} + +impl ::protobuf::Message for CreateAppRequest { + fn is_initialized(&self) -> bool { + for v in &self.color_style { + 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.workspace_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?; + }, + 4 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.color_style)?; + }, + _ => { + ::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.workspace_id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.workspace_id); + } + if !self.name.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.name); + } + if !self.desc.is_empty() { + my_size += ::protobuf::rt::string_size(3, &self.desc); + } + if let Some(ref v) = self.color_style.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.workspace_id.is_empty() { + os.write_string(1, &self.workspace_id)?; + } + if !self.name.is_empty() { + os.write_string(2, &self.name)?; + } + if !self.desc.is_empty() { + os.write_string(3, &self.desc)?; + } + if let Some(ref v) = self.color_style.as_ref() { + os.write_tag(4, ::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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CreateAppRequest { + CreateAppRequest::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>( + "workspace_id", + |m: &CreateAppRequest| { &m.workspace_id }, + |m: &mut CreateAppRequest| { &mut m.workspace_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "name", + |m: &CreateAppRequest| { &m.name }, + |m: &mut CreateAppRequest| { &mut m.name }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "desc", + |m: &CreateAppRequest| { &m.desc }, + |m: &mut CreateAppRequest| { &mut m.desc }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "color_style", + |m: &CreateAppRequest| { &m.color_style }, + |m: &mut CreateAppRequest| { &mut m.color_style }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "CreateAppRequest", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static CreateAppRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CreateAppRequest::new) + } +} + +impl ::protobuf::Clear for CreateAppRequest { + fn clear(&mut self) { + self.workspace_id.clear(); + self.name.clear(); + self.desc.clear(); + self.color_style.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for CreateAppRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for CreateAppRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct ColorStyle { + // message fields + pub theme_color: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ColorStyle { + fn default() -> &'a ColorStyle { + ::default_instance() + } +} + +impl ColorStyle { + pub fn new() -> ColorStyle { + ::std::default::Default::default() + } + + // string theme_color = 1; + + + pub fn get_theme_color(&self) -> &str { + &self.theme_color + } + pub fn clear_theme_color(&mut self) { + self.theme_color.clear(); + } + + // Param is passed by value, moved + pub fn set_theme_color(&mut self, v: ::std::string::String) { + self.theme_color = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_theme_color(&mut self) -> &mut ::std::string::String { + &mut self.theme_color + } + + // Take field + pub fn take_theme_color(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.theme_color, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for ColorStyle { + 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.theme_color)?; + }, + _ => { + ::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.theme_color.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.theme_color); + } + 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.theme_color.is_empty() { + os.write_string(1, &self.theme_color)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ColorStyle { + ColorStyle::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>( + "theme_color", + |m: &ColorStyle| { &m.theme_color }, + |m: &mut ColorStyle| { &mut m.theme_color }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ColorStyle", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static ColorStyle { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ColorStyle::new) + } +} + +impl ::protobuf::Clear for ColorStyle { + fn clear(&mut self) { + self.theme_color.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for ColorStyle { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ColorStyle { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct CreateAppParams { + // message fields + pub workspace_id: ::std::string::String, + pub name: ::std::string::String, + pub desc: ::std::string::String, + pub color_style: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CreateAppParams { + fn default() -> &'a CreateAppParams { + ::default_instance() + } +} + +impl CreateAppParams { + pub fn new() -> CreateAppParams { + ::std::default::Default::default() + } + + // string workspace_id = 1; + + + pub fn get_workspace_id(&self) -> &str { + &self.workspace_id + } + pub fn clear_workspace_id(&mut self) { + self.workspace_id.clear(); + } + + // Param is passed by value, moved + pub fn set_workspace_id(&mut self, v: ::std::string::String) { + self.workspace_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String { + &mut self.workspace_id + } + + // Take field + pub fn take_workspace_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.workspace_id, ::std::string::String::new()) + } + + // string name = 2; + + + 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 = 3; + + + 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()) + } + + // .ColorStyle color_style = 4; + + + pub fn get_color_style(&self) -> &ColorStyle { + self.color_style.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_color_style(&mut self) { + self.color_style.clear(); + } + + pub fn has_color_style(&self) -> bool { + self.color_style.is_some() + } + + // Param is passed by value, moved + pub fn set_color_style(&mut self, v: ColorStyle) { + self.color_style = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_color_style(&mut self) -> &mut ColorStyle { + if self.color_style.is_none() { + self.color_style.set_default(); + } + self.color_style.as_mut().unwrap() + } + + // Take field + pub fn take_color_style(&mut self) -> ColorStyle { + self.color_style.take().unwrap_or_else(|| ColorStyle::new()) + } +} + +impl ::protobuf::Message for CreateAppParams { + fn is_initialized(&self) -> bool { + for v in &self.color_style { + 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.workspace_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?; + }, + 4 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.color_style)?; + }, + _ => { + ::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.workspace_id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.workspace_id); + } + if !self.name.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.name); + } + if !self.desc.is_empty() { + my_size += ::protobuf::rt::string_size(3, &self.desc); + } + if let Some(ref v) = self.color_style.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.workspace_id.is_empty() { + os.write_string(1, &self.workspace_id)?; + } + if !self.name.is_empty() { + os.write_string(2, &self.name)?; + } + if !self.desc.is_empty() { + os.write_string(3, &self.desc)?; + } + if let Some(ref v) = self.color_style.as_ref() { + os.write_tag(4, ::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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CreateAppParams { + CreateAppParams::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>( + "workspace_id", + |m: &CreateAppParams| { &m.workspace_id }, + |m: &mut CreateAppParams| { &mut m.workspace_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "name", + |m: &CreateAppParams| { &m.name }, + |m: &mut CreateAppParams| { &mut m.name }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "desc", + |m: &CreateAppParams| { &m.desc }, + |m: &mut CreateAppParams| { &mut m.desc }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "color_style", + |m: &CreateAppParams| { &m.color_style }, + |m: &mut CreateAppParams| { &mut m.color_style }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "CreateAppParams", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static CreateAppParams { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CreateAppParams::new) + } +} + +impl ::protobuf::Clear for CreateAppParams { + fn clear(&mut self) { + self.workspace_id.clear(); + self.name.clear(); + self.desc.clear(); + self.color_style.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for CreateAppParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for CreateAppParams { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct QueryAppRequest { + // message fields + pub app_ids: ::protobuf::RepeatedField<::std::string::String>, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a QueryAppRequest { + fn default() -> &'a QueryAppRequest { + ::default_instance() + } +} + +impl QueryAppRequest { + pub fn new() -> QueryAppRequest { + ::std::default::Default::default() + } + + // repeated string app_ids = 1; + + + pub fn get_app_ids(&self) -> &[::std::string::String] { + &self.app_ids + } + pub fn clear_app_ids(&mut self) { + self.app_ids.clear(); + } + + // Param is passed by value, moved + pub fn set_app_ids(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { + self.app_ids = v; + } + + // Mutable pointer to the field. + pub fn mut_app_ids(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { + &mut self.app_ids + } + + // Take field + pub fn take_app_ids(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { + ::std::mem::replace(&mut self.app_ids, ::protobuf::RepeatedField::new()) + } +} + +impl ::protobuf::Message for QueryAppRequest { + 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.app_ids)?; + }, + _ => { + ::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.app_ids { + 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.app_ids { + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> QueryAppRequest { + QueryAppRequest::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>( + "app_ids", + |m: &QueryAppRequest| { &m.app_ids }, + |m: &mut QueryAppRequest| { &mut m.app_ids }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "QueryAppRequest", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static QueryAppRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(QueryAppRequest::new) + } +} + +impl ::protobuf::Clear for QueryAppRequest { + fn clear(&mut self) { + self.app_ids.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for QueryAppRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for QueryAppRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct AppId { + // message fields + pub app_id: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AppId { + fn default() -> &'a AppId { + ::default_instance() + } +} + +impl AppId { + pub fn new() -> AppId { + ::std::default::Default::default() + } + + // string app_id = 1; + + + pub fn get_app_id(&self) -> &str { + &self.app_id + } + pub fn clear_app_id(&mut self) { + self.app_id.clear(); + } + + // Param is passed by value, moved + pub fn set_app_id(&mut self, v: ::std::string::String) { + self.app_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_app_id(&mut self) -> &mut ::std::string::String { + &mut self.app_id + } + + // Take field + pub fn take_app_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.app_id, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for AppId { + 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.app_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.app_id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.app_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.app_id.is_empty() { + os.write_string(1, &self.app_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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AppId { + AppId::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>( + "app_id", + |m: &AppId| { &m.app_id }, + |m: &mut AppId| { &mut m.app_id }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "AppId", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static AppId { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AppId::new) + } +} + +impl ::protobuf::Clear for AppId { + fn clear(&mut self) { + self.app_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for AppId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for AppId { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct UpdateAppRequest { + // message fields + pub app_id: ::std::string::String, + // message oneof groups + pub one_of_name: ::std::option::Option, + pub one_of_desc: ::std::option::Option, + pub one_of_color_style: ::std::option::Option, + pub one_of_is_trash: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UpdateAppRequest { + fn default() -> &'a UpdateAppRequest { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateAppRequest_oneof_one_of_name { + name(::std::string::String), +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateAppRequest_oneof_one_of_desc { + desc(::std::string::String), +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateAppRequest_oneof_one_of_color_style { + color_style(ColorStyle), +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateAppRequest_oneof_one_of_is_trash { + is_trash(bool), +} + +impl UpdateAppRequest { + pub fn new() -> UpdateAppRequest { + ::std::default::Default::default() + } + + // string app_id = 1; + + + pub fn get_app_id(&self) -> &str { + &self.app_id + } + pub fn clear_app_id(&mut self) { + self.app_id.clear(); + } + + // Param is passed by value, moved + pub fn set_app_id(&mut self, v: ::std::string::String) { + self.app_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_app_id(&mut self) -> &mut ::std::string::String { + &mut self.app_id + } + + // Take field + pub fn take_app_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.app_id, ::std::string::String::new()) + } + + // string name = 2; + + + pub fn get_name(&self) -> &str { + match self.one_of_name { + ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(ref v)) => v, + _ => "", + } + } + pub fn clear_name(&mut self) { + self.one_of_name = ::std::option::Option::None; + } + + pub fn has_name(&self) -> bool { + match self.one_of_name { + ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_name(&mut self, v: ::std::string::String) { + self.one_of_name = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(v)) + } + + // Mutable pointer to the field. + pub fn mut_name(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(_)) = self.one_of_name { + } else { + self.one_of_name = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(::std::string::String::new())); + } + match self.one_of_name { + ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_name(&mut self) -> ::std::string::String { + if self.has_name() { + match self.one_of_name.take() { + ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } + + // string desc = 3; + + + pub fn get_desc(&self) -> &str { + match self.one_of_desc { + ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(ref v)) => v, + _ => "", + } + } + pub fn clear_desc(&mut self) { + self.one_of_desc = ::std::option::Option::None; + } + + pub fn has_desc(&self) -> bool { + match self.one_of_desc { + ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_desc(&mut self, v: ::std::string::String) { + self.one_of_desc = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(v)) + } + + // Mutable pointer to the field. + pub fn mut_desc(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(_)) = self.one_of_desc { + } else { + self.one_of_desc = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(::std::string::String::new())); + } + match self.one_of_desc { + ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_desc(&mut self) -> ::std::string::String { + if self.has_desc() { + match self.one_of_desc.take() { + ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } + + // .ColorStyle color_style = 4; + + + pub fn get_color_style(&self) -> &ColorStyle { + match self.one_of_color_style { + ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(ref v)) => v, + _ => ::default_instance(), + } + } + pub fn clear_color_style(&mut self) { + self.one_of_color_style = ::std::option::Option::None; + } + + pub fn has_color_style(&self) -> bool { + match self.one_of_color_style { + ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_color_style(&mut self, v: ColorStyle) { + self.one_of_color_style = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(v)) + } + + // Mutable pointer to the field. + pub fn mut_color_style(&mut self) -> &mut ColorStyle { + if let ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(_)) = self.one_of_color_style { + } else { + self.one_of_color_style = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(ColorStyle::new())); + } + match self.one_of_color_style { + ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_color_style(&mut self) -> ColorStyle { + if self.has_color_style() { + match self.one_of_color_style.take() { + ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(v)) => v, + _ => panic!(), + } + } else { + ColorStyle::new() + } + } + + // bool is_trash = 5; + + + pub fn get_is_trash(&self) -> bool { + match self.one_of_is_trash { + ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_is_trash::is_trash(v)) => v, + _ => false, + } + } + pub fn clear_is_trash(&mut self) { + self.one_of_is_trash = ::std::option::Option::None; + } + + pub fn has_is_trash(&self) -> bool { + match self.one_of_is_trash { + ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_is_trash::is_trash(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_is_trash(&mut self, v: bool) { + self.one_of_is_trash = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_is_trash::is_trash(v)) + } +} + +impl ::protobuf::Message for UpdateAppRequest { + fn is_initialized(&self) -> bool { + if let Some(UpdateAppRequest_oneof_one_of_color_style::color_style(ref v)) = self.one_of_color_style { + 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.app_id)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_name = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(is.read_string()?)); + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_desc = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(is.read_string()?)); + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_color_style = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(is.read_message()?)); + }, + 5 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_is_trash = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_is_trash::is_trash(is.read_bool()?)); + }, + _ => { + ::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.app_id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.app_id); + } + if let ::std::option::Option::Some(ref v) = self.one_of_name { + match v { + &UpdateAppRequest_oneof_one_of_name::name(ref v) => { + my_size += ::protobuf::rt::string_size(2, &v); + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_desc { + match v { + &UpdateAppRequest_oneof_one_of_desc::desc(ref v) => { + my_size += ::protobuf::rt::string_size(3, &v); + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_color_style { + match v { + &UpdateAppRequest_oneof_one_of_color_style::color_style(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_is_trash { + match v { + &UpdateAppRequest_oneof_one_of_is_trash::is_trash(v) => { + my_size += 2; + }, + }; + } + 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.app_id.is_empty() { + os.write_string(1, &self.app_id)?; + } + if let ::std::option::Option::Some(ref v) = self.one_of_name { + match v { + &UpdateAppRequest_oneof_one_of_name::name(ref v) => { + os.write_string(2, v)?; + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_desc { + match v { + &UpdateAppRequest_oneof_one_of_desc::desc(ref v) => { + os.write_string(3, v)?; + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_color_style { + match v { + &UpdateAppRequest_oneof_one_of_color_style::color_style(ref v) => { + os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_is_trash { + match v { + &UpdateAppRequest_oneof_one_of_is_trash::is_trash(v) => { + os.write_bool(5, 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UpdateAppRequest { + UpdateAppRequest::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>( + "app_id", + |m: &UpdateAppRequest| { &m.app_id }, + |m: &mut UpdateAppRequest| { &mut m.app_id }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "name", + UpdateAppRequest::has_name, + UpdateAppRequest::get_name, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "desc", + UpdateAppRequest::has_desc, + UpdateAppRequest::get_desc, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ColorStyle>( + "color_style", + UpdateAppRequest::has_color_style, + UpdateAppRequest::get_color_style, + )); + fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>( + "is_trash", + UpdateAppRequest::has_is_trash, + UpdateAppRequest::get_is_trash, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "UpdateAppRequest", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static UpdateAppRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(UpdateAppRequest::new) + } +} + +impl ::protobuf::Clear for UpdateAppRequest { + fn clear(&mut self) { + self.app_id.clear(); + self.one_of_name = ::std::option::Option::None; + self.one_of_desc = ::std::option::Option::None; + self.one_of_color_style = ::std::option::Option::None; + self.one_of_is_trash = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for UpdateAppRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for UpdateAppRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct UpdateAppParams { + // message fields + pub app_id: ::std::string::String, + // message oneof groups + pub one_of_name: ::std::option::Option, + pub one_of_desc: ::std::option::Option, + pub one_of_color_style: ::std::option::Option, + pub one_of_is_trash: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UpdateAppParams { + fn default() -> &'a UpdateAppParams { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateAppParams_oneof_one_of_name { + name(::std::string::String), +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateAppParams_oneof_one_of_desc { + desc(::std::string::String), +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateAppParams_oneof_one_of_color_style { + color_style(ColorStyle), +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateAppParams_oneof_one_of_is_trash { + is_trash(bool), +} + +impl UpdateAppParams { + pub fn new() -> UpdateAppParams { + ::std::default::Default::default() + } + + // string app_id = 1; + + + pub fn get_app_id(&self) -> &str { + &self.app_id + } + pub fn clear_app_id(&mut self) { + self.app_id.clear(); + } + + // Param is passed by value, moved + pub fn set_app_id(&mut self, v: ::std::string::String) { + self.app_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_app_id(&mut self) -> &mut ::std::string::String { + &mut self.app_id + } + + // Take field + pub fn take_app_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.app_id, ::std::string::String::new()) + } + + // string name = 2; + + + pub fn get_name(&self) -> &str { + match self.one_of_name { + ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(ref v)) => v, + _ => "", + } + } + pub fn clear_name(&mut self) { + self.one_of_name = ::std::option::Option::None; + } + + pub fn has_name(&self) -> bool { + match self.one_of_name { + ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_name(&mut self, v: ::std::string::String) { + self.one_of_name = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(v)) + } + + // Mutable pointer to the field. + pub fn mut_name(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(_)) = self.one_of_name { + } else { + self.one_of_name = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(::std::string::String::new())); + } + match self.one_of_name { + ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_name(&mut self) -> ::std::string::String { + if self.has_name() { + match self.one_of_name.take() { + ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } + + // string desc = 3; + + + pub fn get_desc(&self) -> &str { + match self.one_of_desc { + ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(ref v)) => v, + _ => "", + } + } + pub fn clear_desc(&mut self) { + self.one_of_desc = ::std::option::Option::None; + } + + pub fn has_desc(&self) -> bool { + match self.one_of_desc { + ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_desc(&mut self, v: ::std::string::String) { + self.one_of_desc = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(v)) + } + + // Mutable pointer to the field. + pub fn mut_desc(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(_)) = self.one_of_desc { + } else { + self.one_of_desc = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(::std::string::String::new())); + } + match self.one_of_desc { + ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_desc(&mut self) -> ::std::string::String { + if self.has_desc() { + match self.one_of_desc.take() { + ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } + + // .ColorStyle color_style = 4; + + + pub fn get_color_style(&self) -> &ColorStyle { + match self.one_of_color_style { + ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(ref v)) => v, + _ => ::default_instance(), + } + } + pub fn clear_color_style(&mut self) { + self.one_of_color_style = ::std::option::Option::None; + } + + pub fn has_color_style(&self) -> bool { + match self.one_of_color_style { + ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_color_style(&mut self, v: ColorStyle) { + self.one_of_color_style = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(v)) + } + + // Mutable pointer to the field. + pub fn mut_color_style(&mut self) -> &mut ColorStyle { + if let ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(_)) = self.one_of_color_style { + } else { + self.one_of_color_style = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(ColorStyle::new())); + } + match self.one_of_color_style { + ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_color_style(&mut self) -> ColorStyle { + if self.has_color_style() { + match self.one_of_color_style.take() { + ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(v)) => v, + _ => panic!(), + } + } else { + ColorStyle::new() + } + } + + // bool is_trash = 5; + + + pub fn get_is_trash(&self) -> bool { + match self.one_of_is_trash { + ::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(v)) => v, + _ => false, + } + } + pub fn clear_is_trash(&mut self) { + self.one_of_is_trash = ::std::option::Option::None; + } + + pub fn has_is_trash(&self) -> bool { + match self.one_of_is_trash { + ::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_is_trash(&mut self, v: bool) { + self.one_of_is_trash = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(v)) + } +} + +impl ::protobuf::Message for UpdateAppParams { + fn is_initialized(&self) -> bool { + if let Some(UpdateAppParams_oneof_one_of_color_style::color_style(ref v)) = self.one_of_color_style { + 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.app_id)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_name = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(is.read_string()?)); + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_desc = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(is.read_string()?)); + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_color_style = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(is.read_message()?)); + }, + 5 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_is_trash = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(is.read_bool()?)); + }, + _ => { + ::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.app_id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.app_id); + } + if let ::std::option::Option::Some(ref v) = self.one_of_name { + match v { + &UpdateAppParams_oneof_one_of_name::name(ref v) => { + my_size += ::protobuf::rt::string_size(2, &v); + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_desc { + match v { + &UpdateAppParams_oneof_one_of_desc::desc(ref v) => { + my_size += ::protobuf::rt::string_size(3, &v); + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_color_style { + match v { + &UpdateAppParams_oneof_one_of_color_style::color_style(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_is_trash { + match v { + &UpdateAppParams_oneof_one_of_is_trash::is_trash(v) => { + my_size += 2; + }, + }; + } + 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.app_id.is_empty() { + os.write_string(1, &self.app_id)?; + } + if let ::std::option::Option::Some(ref v) = self.one_of_name { + match v { + &UpdateAppParams_oneof_one_of_name::name(ref v) => { + os.write_string(2, v)?; + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_desc { + match v { + &UpdateAppParams_oneof_one_of_desc::desc(ref v) => { + os.write_string(3, v)?; + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_color_style { + match v { + &UpdateAppParams_oneof_one_of_color_style::color_style(ref v) => { + os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_is_trash { + match v { + &UpdateAppParams_oneof_one_of_is_trash::is_trash(v) => { + os.write_bool(5, 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UpdateAppParams { + UpdateAppParams::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>( + "app_id", + |m: &UpdateAppParams| { &m.app_id }, + |m: &mut UpdateAppParams| { &mut m.app_id }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "name", + UpdateAppParams::has_name, + UpdateAppParams::get_name, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "desc", + UpdateAppParams::has_desc, + UpdateAppParams::get_desc, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ColorStyle>( + "color_style", + UpdateAppParams::has_color_style, + UpdateAppParams::get_color_style, + )); + fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>( + "is_trash", + UpdateAppParams::has_is_trash, + UpdateAppParams::get_is_trash, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "UpdateAppParams", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static UpdateAppParams { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(UpdateAppParams::new) + } +} + +impl ::protobuf::Clear for UpdateAppParams { + fn clear(&mut self) { + self.app_id.clear(); + self.one_of_name = ::std::option::Option::None; + self.one_of_desc = ::std::option::Option::None; + self.one_of_color_style = ::std::option::Option::None; + self.one_of_is_trash = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for UpdateAppParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for UpdateAppParams { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +static file_descriptor_proto_data: &'static [u8] = b"\ + \n\tapp.proto\x1a\nview.proto\"\xef\x01\n\x03App\x12\x0e\n\x02id\x18\x01\ + \x20\x01(\tR\x02id\x12!\n\x0cworkspace_id\x18\x02\x20\x01(\tR\x0bworkspa\ + ceId\x12\x12\n\x04name\x18\x03\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\ + \x04\x20\x01(\tR\x04desc\x12-\n\nbelongings\x18\x05\x20\x01(\x0b2\r.Repe\ + atedViewR\nbelongings\x12\x18\n\x07version\x18\x06\x20\x01(\x03R\x07vers\ + ion\x12#\n\rmodified_time\x18\x07\x20\x01(\x03R\x0cmodifiedTime\x12\x1f\ + \n\x0bcreate_time\x18\x08\x20\x01(\x03R\ncreateTime\")\n\x0bRepeatedApp\ + \x12\x1a\n\x05items\x18\x01\x20\x03(\x0b2\x04.AppR\x05items\"\x8b\x01\n\ + \x10CreateAppRequest\x12!\n\x0cworkspace_id\x18\x01\x20\x01(\tR\x0bworks\ + paceId\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\ + \x18\x03\x20\x01(\tR\x04desc\x12,\n\x0bcolor_style\x18\x04\x20\x01(\x0b2\ + \x0b.ColorStyleR\ncolorStyle\"-\n\nColorStyle\x12\x1f\n\x0btheme_color\ + \x18\x01\x20\x01(\tR\nthemeColor\"\x8a\x01\n\x0fCreateAppParams\x12!\n\ + \x0cworkspace_id\x18\x01\x20\x01(\tR\x0bworkspaceId\x12\x12\n\x04name\ + \x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04de\ + sc\x12,\n\x0bcolor_style\x18\x04\x20\x01(\x0b2\x0b.ColorStyleR\ncolorSty\ + le\"*\n\x0fQueryAppRequest\x12\x17\n\x07app_ids\x18\x01\x20\x03(\tR\x06a\ + ppIds\"\x1e\n\x05AppId\x12\x15\n\x06app_id\x18\x01\x20\x01(\tR\x05appId\ + \"\xe9\x01\n\x10UpdateAppRequest\x12\x15\n\x06app_id\x18\x01\x20\x01(\tR\ + \x05appId\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\x12\x14\n\x04\ + desc\x18\x03\x20\x01(\tH\x01R\x04desc\x12.\n\x0bcolor_style\x18\x04\x20\ + \x01(\x0b2\x0b.ColorStyleH\x02R\ncolorStyle\x12\x1b\n\x08is_trash\x18\ + \x05\x20\x01(\x08H\x03R\x07isTrashB\r\n\x0bone_of_nameB\r\n\x0bone_of_de\ + scB\x14\n\x12one_of_color_styleB\x11\n\x0fone_of_is_trash\"\xe8\x01\n\ + \x0fUpdateAppParams\x12\x15\n\x06app_id\x18\x01\x20\x01(\tR\x05appId\x12\ + \x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\x12\x14\n\x04desc\x18\x03\ + \x20\x01(\tH\x01R\x04desc\x12.\n\x0bcolor_style\x18\x04\x20\x01(\x0b2\ + \x0b.ColorStyleH\x02R\ncolorStyle\x12\x1b\n\x08is_trash\x18\x05\x20\x01(\ + \x08H\x03R\x07isTrashB\r\n\x0bone_of_nameB\r\n\x0bone_of_descB\x14\n\x12\ + one_of_color_styleB\x11\n\x0fone_of_is_trashJ\xdb\x10\n\x06\x12\x04\0\02\ + \x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\t\n\x02\x03\0\x12\x03\x01\0\x14\n\ + \n\n\x02\x04\0\x12\x04\x03\0\x0c\x01\n\n\n\x03\x04\0\x01\x12\x03\x03\x08\ + \x0b\n\x0b\n\x04\x04\0\x02\0\x12\x03\x04\x04\x12\n\x0c\n\x05\x04\0\x02\0\ + \x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x04\x0b\r\n\ + \x0c\n\x05\x04\0\x02\0\x03\x12\x03\x04\x10\x11\n\x0b\n\x04\x04\0\x02\x01\ + \x12\x03\x05\x04\x1c\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x05\x04\n\n\ + \x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x05\x0b\x17\n\x0c\n\x05\x04\0\x02\ + \x01\x03\x12\x03\x05\x1a\x1b\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x06\x04\ + \x14\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x06\x04\n\n\x0c\n\x05\x04\0\ + \x02\x02\x01\x12\x03\x06\x0b\x0f\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\ + \x06\x12\x13\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x07\x04\x14\n\x0c\n\x05\ + \x04\0\x02\x03\x05\x12\x03\x07\x04\n\n\x0c\n\x05\x04\0\x02\x03\x01\x12\ + \x03\x07\x0b\x0f\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x07\x12\x13\n\x0b\ + \n\x04\x04\0\x02\x04\x12\x03\x08\x04\x20\n\x0c\n\x05\x04\0\x02\x04\x06\ + \x12\x03\x08\x04\x10\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\x08\x11\x1b\n\ + \x0c\n\x05\x04\0\x02\x04\x03\x12\x03\x08\x1e\x1f\n\x0b\n\x04\x04\0\x02\ + \x05\x12\x03\t\x04\x16\n\x0c\n\x05\x04\0\x02\x05\x05\x12\x03\t\x04\t\n\ + \x0c\n\x05\x04\0\x02\x05\x01\x12\x03\t\n\x11\n\x0c\n\x05\x04\0\x02\x05\ + \x03\x12\x03\t\x14\x15\n\x0b\n\x04\x04\0\x02\x06\x12\x03\n\x04\x1c\n\x0c\ + \n\x05\x04\0\x02\x06\x05\x12\x03\n\x04\t\n\x0c\n\x05\x04\0\x02\x06\x01\ + \x12\x03\n\n\x17\n\x0c\n\x05\x04\0\x02\x06\x03\x12\x03\n\x1a\x1b\n\x0b\n\ + \x04\x04\0\x02\x07\x12\x03\x0b\x04\x1a\n\x0c\n\x05\x04\0\x02\x07\x05\x12\ + \x03\x0b\x04\t\n\x0c\n\x05\x04\0\x02\x07\x01\x12\x03\x0b\n\x15\n\x0c\n\ + \x05\x04\0\x02\x07\x03\x12\x03\x0b\x18\x19\n\n\n\x02\x04\x01\x12\x04\r\0\ + \x0f\x01\n\n\n\x03\x04\x01\x01\x12\x03\r\x08\x13\n\x0b\n\x04\x04\x01\x02\ + \0\x12\x03\x0e\x04\x1b\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x0e\x04\x0c\ + \n\x0c\n\x05\x04\x01\x02\0\x06\x12\x03\x0e\r\x10\n\x0c\n\x05\x04\x01\x02\ + \0\x01\x12\x03\x0e\x11\x16\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x0e\x19\ + \x1a\n\n\n\x02\x04\x02\x12\x04\x10\0\x15\x01\n\n\n\x03\x04\x02\x01\x12\ + \x03\x10\x08\x18\n\x0b\n\x04\x04\x02\x02\0\x12\x03\x11\x04\x1c\n\x0c\n\ + \x05\x04\x02\x02\0\x05\x12\x03\x11\x04\n\n\x0c\n\x05\x04\x02\x02\0\x01\ + \x12\x03\x11\x0b\x17\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x11\x1a\x1b\n\ + \x0b\n\x04\x04\x02\x02\x01\x12\x03\x12\x04\x14\n\x0c\n\x05\x04\x02\x02\ + \x01\x05\x12\x03\x12\x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\x12\ + \x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03\x12\x12\x13\n\x0b\n\x04\ + \x04\x02\x02\x02\x12\x03\x13\x04\x14\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\ + \x03\x13\x04\n\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\x13\x0b\x0f\n\x0c\ + \n\x05\x04\x02\x02\x02\x03\x12\x03\x13\x12\x13\n\x0b\n\x04\x04\x02\x02\ + \x03\x12\x03\x14\x04\x1f\n\x0c\n\x05\x04\x02\x02\x03\x06\x12\x03\x14\x04\ + \x0e\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\x14\x0f\x1a\n\x0c\n\x05\x04\ + \x02\x02\x03\x03\x12\x03\x14\x1d\x1e\n\n\n\x02\x04\x03\x12\x04\x16\0\x18\ + \x01\n\n\n\x03\x04\x03\x01\x12\x03\x16\x08\x12\n\x0b\n\x04\x04\x03\x02\0\ + \x12\x03\x17\x04\x1b\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x17\x04\n\n\ + \x0c\n\x05\x04\x03\x02\0\x01\x12\x03\x17\x0b\x16\n\x0c\n\x05\x04\x03\x02\ + \0\x03\x12\x03\x17\x19\x1a\n\n\n\x02\x04\x04\x12\x04\x19\0\x1e\x01\n\n\n\ + \x03\x04\x04\x01\x12\x03\x19\x08\x17\n\x0b\n\x04\x04\x04\x02\0\x12\x03\ + \x1a\x04\x1c\n\x0c\n\x05\x04\x04\x02\0\x05\x12\x03\x1a\x04\n\n\x0c\n\x05\ + \x04\x04\x02\0\x01\x12\x03\x1a\x0b\x17\n\x0c\n\x05\x04\x04\x02\0\x03\x12\ + \x03\x1a\x1a\x1b\n\x0b\n\x04\x04\x04\x02\x01\x12\x03\x1b\x04\x14\n\x0c\n\ + \x05\x04\x04\x02\x01\x05\x12\x03\x1b\x04\n\n\x0c\n\x05\x04\x04\x02\x01\ + \x01\x12\x03\x1b\x0b\x0f\n\x0c\n\x05\x04\x04\x02\x01\x03\x12\x03\x1b\x12\ + \x13\n\x0b\n\x04\x04\x04\x02\x02\x12\x03\x1c\x04\x14\n\x0c\n\x05\x04\x04\ + \x02\x02\x05\x12\x03\x1c\x04\n\n\x0c\n\x05\x04\x04\x02\x02\x01\x12\x03\ + \x1c\x0b\x0f\n\x0c\n\x05\x04\x04\x02\x02\x03\x12\x03\x1c\x12\x13\n\x0b\n\ + \x04\x04\x04\x02\x03\x12\x03\x1d\x04\x1f\n\x0c\n\x05\x04\x04\x02\x03\x06\ + \x12\x03\x1d\x04\x0e\n\x0c\n\x05\x04\x04\x02\x03\x01\x12\x03\x1d\x0f\x1a\ + \n\x0c\n\x05\x04\x04\x02\x03\x03\x12\x03\x1d\x1d\x1e\n\n\n\x02\x04\x05\ + \x12\x04\x1f\0!\x01\n\n\n\x03\x04\x05\x01\x12\x03\x1f\x08\x17\n\x0b\n\ + \x04\x04\x05\x02\0\x12\x03\x20\x04\x20\n\x0c\n\x05\x04\x05\x02\0\x04\x12\ + \x03\x20\x04\x0c\n\x0c\n\x05\x04\x05\x02\0\x05\x12\x03\x20\r\x13\n\x0c\n\ + \x05\x04\x05\x02\0\x01\x12\x03\x20\x14\x1b\n\x0c\n\x05\x04\x05\x02\0\x03\ + \x12\x03\x20\x1e\x1f\n\n\n\x02\x04\x06\x12\x04\"\0$\x01\n\n\n\x03\x04\ + \x06\x01\x12\x03\"\x08\r\n\x0b\n\x04\x04\x06\x02\0\x12\x03#\x04\x16\n\ + \x0c\n\x05\x04\x06\x02\0\x05\x12\x03#\x04\n\n\x0c\n\x05\x04\x06\x02\0\ + \x01\x12\x03#\x0b\x11\n\x0c\n\x05\x04\x06\x02\0\x03\x12\x03#\x14\x15\n\n\ + \n\x02\x04\x07\x12\x04%\0+\x01\n\n\n\x03\x04\x07\x01\x12\x03%\x08\x18\n\ + \x0b\n\x04\x04\x07\x02\0\x12\x03&\x04\x16\n\x0c\n\x05\x04\x07\x02\0\x05\ + \x12\x03&\x04\n\n\x0c\n\x05\x04\x07\x02\0\x01\x12\x03&\x0b\x11\n\x0c\n\ + \x05\x04\x07\x02\0\x03\x12\x03&\x14\x15\n\x0b\n\x04\x04\x07\x08\0\x12\ + \x03'\x04*\n\x0c\n\x05\x04\x07\x08\0\x01\x12\x03'\n\x15\n\x0b\n\x04\x04\ + \x07\x02\x01\x12\x03'\x18(\n\x0c\n\x05\x04\x07\x02\x01\x05\x12\x03'\x18\ + \x1e\n\x0c\n\x05\x04\x07\x02\x01\x01\x12\x03'\x1f#\n\x0c\n\x05\x04\x07\ + \x02\x01\x03\x12\x03'&'\n\x0b\n\x04\x04\x07\x08\x01\x12\x03(\x04*\n\x0c\ + \n\x05\x04\x07\x08\x01\x01\x12\x03(\n\x15\n\x0b\n\x04\x04\x07\x02\x02\ + \x12\x03(\x18(\n\x0c\n\x05\x04\x07\x02\x02\x05\x12\x03(\x18\x1e\n\x0c\n\ + \x05\x04\x07\x02\x02\x01\x12\x03(\x1f#\n\x0c\n\x05\x04\x07\x02\x02\x03\ + \x12\x03(&'\n\x0b\n\x04\x04\x07\x08\x02\x12\x03)\x04<\n\x0c\n\x05\x04\ + \x07\x08\x02\x01\x12\x03)\n\x1c\n\x0b\n\x04\x04\x07\x02\x03\x12\x03)\x1f\ + :\n\x0c\n\x05\x04\x07\x02\x03\x06\x12\x03)\x1f)\n\x0c\n\x05\x04\x07\x02\ + \x03\x01\x12\x03)*5\n\x0c\n\x05\x04\x07\x02\x03\x03\x12\x03)89\n\x0b\n\ + \x04\x04\x07\x08\x03\x12\x03*\x040\n\x0c\n\x05\x04\x07\x08\x03\x01\x12\ + \x03*\n\x19\n\x0b\n\x04\x04\x07\x02\x04\x12\x03*\x1c.\n\x0c\n\x05\x04\ + \x07\x02\x04\x05\x12\x03*\x1c\x20\n\x0c\n\x05\x04\x07\x02\x04\x01\x12\ + \x03*!)\n\x0c\n\x05\x04\x07\x02\x04\x03\x12\x03*,-\n\n\n\x02\x04\x08\x12\ + \x04,\02\x01\n\n\n\x03\x04\x08\x01\x12\x03,\x08\x17\n\x0b\n\x04\x04\x08\ + \x02\0\x12\x03-\x04\x16\n\x0c\n\x05\x04\x08\x02\0\x05\x12\x03-\x04\n\n\ + \x0c\n\x05\x04\x08\x02\0\x01\x12\x03-\x0b\x11\n\x0c\n\x05\x04\x08\x02\0\ + \x03\x12\x03-\x14\x15\n\x0b\n\x04\x04\x08\x08\0\x12\x03.\x04*\n\x0c\n\ + \x05\x04\x08\x08\0\x01\x12\x03.\n\x15\n\x0b\n\x04\x04\x08\x02\x01\x12\ + \x03.\x18(\n\x0c\n\x05\x04\x08\x02\x01\x05\x12\x03.\x18\x1e\n\x0c\n\x05\ + \x04\x08\x02\x01\x01\x12\x03.\x1f#\n\x0c\n\x05\x04\x08\x02\x01\x03\x12\ + \x03.&'\n\x0b\n\x04\x04\x08\x08\x01\x12\x03/\x04*\n\x0c\n\x05\x04\x08\ + \x08\x01\x01\x12\x03/\n\x15\n\x0b\n\x04\x04\x08\x02\x02\x12\x03/\x18(\n\ + \x0c\n\x05\x04\x08\x02\x02\x05\x12\x03/\x18\x1e\n\x0c\n\x05\x04\x08\x02\ + \x02\x01\x12\x03/\x1f#\n\x0c\n\x05\x04\x08\x02\x02\x03\x12\x03/&'\n\x0b\ + \n\x04\x04\x08\x08\x02\x12\x030\x04<\n\x0c\n\x05\x04\x08\x08\x02\x01\x12\ + \x030\n\x1c\n\x0b\n\x04\x04\x08\x02\x03\x12\x030\x1f:\n\x0c\n\x05\x04\ + \x08\x02\x03\x06\x12\x030\x1f)\n\x0c\n\x05\x04\x08\x02\x03\x01\x12\x030*\ + 5\n\x0c\n\x05\x04\x08\x02\x03\x03\x12\x03089\n\x0b\n\x04\x04\x08\x08\x03\ + \x12\x031\x040\n\x0c\n\x05\x04\x08\x08\x03\x01\x12\x031\n\x19\n\x0b\n\ + \x04\x04\x08\x02\x04\x12\x031\x1c.\n\x0c\n\x05\x04\x08\x02\x04\x05\x12\ + \x031\x1c\x20\n\x0c\n\x05\x04\x08\x02\x04\x01\x12\x031!)\n\x0c\n\x05\x04\ + \x08\x02\x04\x03\x12\x031,-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-core-data-model/src/protobuf/model/app_create.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/app_create.rs deleted file mode 100644 index 1b0a6e76e0..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/model/app_create.rs +++ /dev/null @@ -1,1485 +0,0 @@ -// This file is generated by rust-protobuf 2.22.1. 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 `app_create.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; - -#[derive(PartialEq,Clone,Default)] -pub struct CreateAppRequest { - // message fields - pub workspace_id: ::std::string::String, - pub name: ::std::string::String, - pub desc: ::std::string::String, - pub color_style: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a CreateAppRequest { - fn default() -> &'a CreateAppRequest { - ::default_instance() - } -} - -impl CreateAppRequest { - pub fn new() -> CreateAppRequest { - ::std::default::Default::default() - } - - // string workspace_id = 1; - - - pub fn get_workspace_id(&self) -> &str { - &self.workspace_id - } - pub fn clear_workspace_id(&mut self) { - self.workspace_id.clear(); - } - - // Param is passed by value, moved - pub fn set_workspace_id(&mut self, v: ::std::string::String) { - self.workspace_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String { - &mut self.workspace_id - } - - // Take field - pub fn take_workspace_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.workspace_id, ::std::string::String::new()) - } - - // string name = 2; - - - 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 = 3; - - - 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()) - } - - // .ColorStyle color_style = 4; - - - pub fn get_color_style(&self) -> &ColorStyle { - self.color_style.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_color_style(&mut self) { - self.color_style.clear(); - } - - pub fn has_color_style(&self) -> bool { - self.color_style.is_some() - } - - // Param is passed by value, moved - pub fn set_color_style(&mut self, v: ColorStyle) { - self.color_style = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_color_style(&mut self) -> &mut ColorStyle { - if self.color_style.is_none() { - self.color_style.set_default(); - } - self.color_style.as_mut().unwrap() - } - - // Take field - pub fn take_color_style(&mut self) -> ColorStyle { - self.color_style.take().unwrap_or_else(|| ColorStyle::new()) - } -} - -impl ::protobuf::Message for CreateAppRequest { - fn is_initialized(&self) -> bool { - for v in &self.color_style { - 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.workspace_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?; - }, - 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.color_style)?; - }, - _ => { - ::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.workspace_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.workspace_id); - } - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.name); - } - if !self.desc.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.desc); - } - if let Some(ref v) = self.color_style.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.workspace_id.is_empty() { - os.write_string(1, &self.workspace_id)?; - } - if !self.name.is_empty() { - os.write_string(2, &self.name)?; - } - if !self.desc.is_empty() { - os.write_string(3, &self.desc)?; - } - if let Some(ref v) = self.color_style.as_ref() { - os.write_tag(4, ::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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> CreateAppRequest { - CreateAppRequest::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>( - "workspace_id", - |m: &CreateAppRequest| { &m.workspace_id }, - |m: &mut CreateAppRequest| { &mut m.workspace_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &CreateAppRequest| { &m.name }, - |m: &mut CreateAppRequest| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "desc", - |m: &CreateAppRequest| { &m.desc }, - |m: &mut CreateAppRequest| { &mut m.desc }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "color_style", - |m: &CreateAppRequest| { &m.color_style }, - |m: &mut CreateAppRequest| { &mut m.color_style }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "CreateAppRequest", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static CreateAppRequest { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(CreateAppRequest::new) - } -} - -impl ::protobuf::Clear for CreateAppRequest { - fn clear(&mut self) { - self.workspace_id.clear(); - self.name.clear(); - self.desc.clear(); - self.color_style.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for CreateAppRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CreateAppRequest { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct ColorStyle { - // message fields - pub theme_color: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ColorStyle { - fn default() -> &'a ColorStyle { - ::default_instance() - } -} - -impl ColorStyle { - pub fn new() -> ColorStyle { - ::std::default::Default::default() - } - - // string theme_color = 1; - - - pub fn get_theme_color(&self) -> &str { - &self.theme_color - } - pub fn clear_theme_color(&mut self) { - self.theme_color.clear(); - } - - // Param is passed by value, moved - pub fn set_theme_color(&mut self, v: ::std::string::String) { - self.theme_color = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_theme_color(&mut self) -> &mut ::std::string::String { - &mut self.theme_color - } - - // Take field - pub fn take_theme_color(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.theme_color, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for ColorStyle { - 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.theme_color)?; - }, - _ => { - ::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.theme_color.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.theme_color); - } - 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.theme_color.is_empty() { - os.write_string(1, &self.theme_color)?; - } - 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ColorStyle { - ColorStyle::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>( - "theme_color", - |m: &ColorStyle| { &m.theme_color }, - |m: &mut ColorStyle| { &mut m.theme_color }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ColorStyle", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static ColorStyle { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ColorStyle::new) - } -} - -impl ::protobuf::Clear for ColorStyle { - fn clear(&mut self) { - self.theme_color.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for ColorStyle { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ColorStyle { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct CreateAppParams { - // message fields - pub workspace_id: ::std::string::String, - pub name: ::std::string::String, - pub desc: ::std::string::String, - pub color_style: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a CreateAppParams { - fn default() -> &'a CreateAppParams { - ::default_instance() - } -} - -impl CreateAppParams { - pub fn new() -> CreateAppParams { - ::std::default::Default::default() - } - - // string workspace_id = 1; - - - pub fn get_workspace_id(&self) -> &str { - &self.workspace_id - } - pub fn clear_workspace_id(&mut self) { - self.workspace_id.clear(); - } - - // Param is passed by value, moved - pub fn set_workspace_id(&mut self, v: ::std::string::String) { - self.workspace_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String { - &mut self.workspace_id - } - - // Take field - pub fn take_workspace_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.workspace_id, ::std::string::String::new()) - } - - // string name = 2; - - - 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 = 3; - - - 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()) - } - - // .ColorStyle color_style = 4; - - - pub fn get_color_style(&self) -> &ColorStyle { - self.color_style.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_color_style(&mut self) { - self.color_style.clear(); - } - - pub fn has_color_style(&self) -> bool { - self.color_style.is_some() - } - - // Param is passed by value, moved - pub fn set_color_style(&mut self, v: ColorStyle) { - self.color_style = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_color_style(&mut self) -> &mut ColorStyle { - if self.color_style.is_none() { - self.color_style.set_default(); - } - self.color_style.as_mut().unwrap() - } - - // Take field - pub fn take_color_style(&mut self) -> ColorStyle { - self.color_style.take().unwrap_or_else(|| ColorStyle::new()) - } -} - -impl ::protobuf::Message for CreateAppParams { - fn is_initialized(&self) -> bool { - for v in &self.color_style { - 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.workspace_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?; - }, - 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.color_style)?; - }, - _ => { - ::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.workspace_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.workspace_id); - } - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.name); - } - if !self.desc.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.desc); - } - if let Some(ref v) = self.color_style.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.workspace_id.is_empty() { - os.write_string(1, &self.workspace_id)?; - } - if !self.name.is_empty() { - os.write_string(2, &self.name)?; - } - if !self.desc.is_empty() { - os.write_string(3, &self.desc)?; - } - if let Some(ref v) = self.color_style.as_ref() { - os.write_tag(4, ::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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> CreateAppParams { - CreateAppParams::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>( - "workspace_id", - |m: &CreateAppParams| { &m.workspace_id }, - |m: &mut CreateAppParams| { &mut m.workspace_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &CreateAppParams| { &m.name }, - |m: &mut CreateAppParams| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "desc", - |m: &CreateAppParams| { &m.desc }, - |m: &mut CreateAppParams| { &mut m.desc }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "color_style", - |m: &CreateAppParams| { &m.color_style }, - |m: &mut CreateAppParams| { &mut m.color_style }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "CreateAppParams", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static CreateAppParams { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(CreateAppParams::new) - } -} - -impl ::protobuf::Clear for CreateAppParams { - fn clear(&mut self) { - self.workspace_id.clear(); - self.name.clear(); - self.desc.clear(); - self.color_style.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for CreateAppParams { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CreateAppParams { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct App { - // message fields - pub id: ::std::string::String, - pub workspace_id: ::std::string::String, - pub name: ::std::string::String, - pub desc: ::std::string::String, - pub belongings: ::protobuf::SingularPtrField, - pub version: i64, - pub modified_time: i64, - pub create_time: i64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a App { - fn default() -> &'a App { - ::default_instance() - } -} - -impl App { - pub fn new() -> App { - ::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 workspace_id = 2; - - - pub fn get_workspace_id(&self) -> &str { - &self.workspace_id - } - pub fn clear_workspace_id(&mut self) { - self.workspace_id.clear(); - } - - // Param is passed by value, moved - pub fn set_workspace_id(&mut self, v: ::std::string::String) { - self.workspace_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String { - &mut self.workspace_id - } - - // Take field - pub fn take_workspace_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.workspace_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()) - } - - // .RepeatedView belongings = 5; - - - pub fn get_belongings(&self) -> &super::view_create::RepeatedView { - self.belongings.as_ref().unwrap_or_else(|| ::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_create::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_create::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_create::RepeatedView { - self.belongings.take().unwrap_or_else(|| super::view_create::RepeatedView::new()) - } - - // int64 version = 6; - - - pub fn get_version(&self) -> i64 { - self.version - } - pub fn clear_version(&mut self) { - self.version = 0; - } - - // Param is passed by value, moved - pub fn set_version(&mut self, v: i64) { - self.version = v; - } - - // int64 modified_time = 7; - - - pub fn get_modified_time(&self) -> i64 { - self.modified_time - } - pub fn clear_modified_time(&mut self) { - self.modified_time = 0; - } - - // Param is passed by value, moved - pub fn set_modified_time(&mut self, v: i64) { - self.modified_time = v; - } - - // int64 create_time = 8; - - - pub fn get_create_time(&self) -> i64 { - self.create_time - } - pub fn clear_create_time(&mut self) { - self.create_time = 0; - } - - // Param is passed by value, moved - pub fn set_create_time(&mut self, v: i64) { - self.create_time = v; - } -} - -impl ::protobuf::Message for App { - fn is_initialized(&self) -> bool { - for v in &self.belongings { - 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.workspace_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_singular_message_into(wire_type, is, &mut self.belongings)?; - }, - 6 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.version = tmp; - }, - 7 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.modified_time = tmp; - }, - 8 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.create_time = tmp; - }, - _ => { - ::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.workspace_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.workspace_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 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 self.version != 0 { - my_size += ::protobuf::rt::value_size(6, self.version, ::protobuf::wire_format::WireTypeVarint); - } - if self.modified_time != 0 { - my_size += ::protobuf::rt::value_size(7, self.modified_time, ::protobuf::wire_format::WireTypeVarint); - } - if self.create_time != 0 { - my_size += ::protobuf::rt::value_size(8, self.create_time, ::protobuf::wire_format::WireTypeVarint); - } - 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.workspace_id.is_empty() { - os.write_string(2, &self.workspace_id)?; - } - if !self.name.is_empty() { - os.write_string(3, &self.name)?; - } - if !self.desc.is_empty() { - os.write_string(4, &self.desc)?; - } - if let Some(ref v) = self.belongings.as_ref() { - os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if self.version != 0 { - os.write_int64(6, self.version)?; - } - if self.modified_time != 0 { - os.write_int64(7, self.modified_time)?; - } - if self.create_time != 0 { - os.write_int64(8, self.create_time)?; - } - 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> App { - App::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: &App| { &m.id }, - |m: &mut App| { &mut m.id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "workspace_id", - |m: &App| { &m.workspace_id }, - |m: &mut App| { &mut m.workspace_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &App| { &m.name }, - |m: &mut App| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "desc", - |m: &App| { &m.desc }, - |m: &mut App| { &mut m.desc }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "belongings", - |m: &App| { &m.belongings }, - |m: &mut App| { &mut m.belongings }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "version", - |m: &App| { &m.version }, - |m: &mut App| { &mut m.version }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "modified_time", - |m: &App| { &m.modified_time }, - |m: &mut App| { &mut m.modified_time }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "create_time", - |m: &App| { &m.create_time }, - |m: &mut App| { &mut m.create_time }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "App", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static App { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(App::new) - } -} - -impl ::protobuf::Clear for App { - fn clear(&mut self) { - self.id.clear(); - self.workspace_id.clear(); - self.name.clear(); - self.desc.clear(); - self.belongings.clear(); - self.version = 0; - self.modified_time = 0; - self.create_time = 0; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for App { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for App { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct RepeatedApp { - // message fields - pub items: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a RepeatedApp { - fn default() -> &'a RepeatedApp { - ::default_instance() - } -} - -impl RepeatedApp { - pub fn new() -> RepeatedApp { - ::std::default::Default::default() - } - - // repeated .App items = 1; - - - pub fn get_items(&self) -> &[App] { - &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) { - self.items = v; - } - - // Mutable pointer to the field. - pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.items - } - - // Take field - pub fn take_items(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for RepeatedApp { - fn is_initialized(&self) -> bool { - for v in &self.items { - 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_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())?; - }, - }; - } - ::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 { - 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<()> { - 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(()) - } - - 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> RepeatedApp { - RepeatedApp::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>( - "items", - |m: &RepeatedApp| { &m.items }, - |m: &mut RepeatedApp| { &mut m.items }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RepeatedApp", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static RepeatedApp { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(RepeatedApp::new) - } -} - -impl ::protobuf::Clear for RepeatedApp { - fn clear(&mut self) { - self.items.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for RepeatedApp { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RepeatedApp { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x10app_create.proto\x1a\x11view_create.proto\"\x8b\x01\n\x10CreateApp\ - Request\x12!\n\x0cworkspace_id\x18\x01\x20\x01(\tR\x0bworkspaceId\x12\ - \x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\ - \x01(\tR\x04desc\x12,\n\x0bcolor_style\x18\x04\x20\x01(\x0b2\x0b.ColorSt\ - yleR\ncolorStyle\"-\n\nColorStyle\x12\x1f\n\x0btheme_color\x18\x01\x20\ - \x01(\tR\nthemeColor\"\x8a\x01\n\x0fCreateAppParams\x12!\n\x0cworkspace_\ - id\x18\x01\x20\x01(\tR\x0bworkspaceId\x12\x12\n\x04name\x18\x02\x20\x01(\ - \tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04desc\x12,\n\x0bcolo\ - r_style\x18\x04\x20\x01(\x0b2\x0b.ColorStyleR\ncolorStyle\"\xef\x01\n\ - \x03App\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12!\n\x0cworkspace_id\ - \x18\x02\x20\x01(\tR\x0bworkspaceId\x12\x12\n\x04name\x18\x03\x20\x01(\t\ - R\x04name\x12\x12\n\x04desc\x18\x04\x20\x01(\tR\x04desc\x12-\n\nbelongin\ - gs\x18\x05\x20\x01(\x0b2\r.RepeatedViewR\nbelongings\x12\x18\n\x07versio\ - n\x18\x06\x20\x01(\x03R\x07version\x12#\n\rmodified_time\x18\x07\x20\x01\ - (\x03R\x0cmodifiedTime\x12\x1f\n\x0bcreate_time\x18\x08\x20\x01(\x03R\nc\ - reateTime\")\n\x0bRepeatedApp\x12\x1a\n\x05items\x18\x01\x20\x03(\x0b2\ - \x04.AppR\x05itemsJ\x81\t\n\x06\x12\x04\0\0\x1e\x01\n\x08\n\x01\x0c\x12\ - \x03\0\0\x12\n\t\n\x02\x03\0\x12\x03\x01\0\x1b\n\n\n\x02\x04\0\x12\x04\ - \x03\0\x08\x01\n\n\n\x03\x04\0\x01\x12\x03\x03\x08\x18\n\x0b\n\x04\x04\0\ - \x02\0\x12\x03\x04\x04\x1c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x04\x04\n\ - \n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x04\x0b\x17\n\x0c\n\x05\x04\0\x02\0\ - \x03\x12\x03\x04\x1a\x1b\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x05\x04\x14\n\ - \x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\x01\ - \x01\x12\x03\x05\x0b\x0f\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x05\x12\ - \x13\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x06\x04\x14\n\x0c\n\x05\x04\0\x02\ - \x02\x05\x12\x03\x06\x04\n\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x06\x0b\ - \x0f\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x06\x12\x13\n\x0b\n\x04\x04\0\ - \x02\x03\x12\x03\x07\x04\x1f\n\x0c\n\x05\x04\0\x02\x03\x06\x12\x03\x07\ - \x04\x0e\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x07\x0f\x1a\n\x0c\n\x05\ - \x04\0\x02\x03\x03\x12\x03\x07\x1d\x1e\n\n\n\x02\x04\x01\x12\x04\t\0\x0b\ - \x01\n\n\n\x03\x04\x01\x01\x12\x03\t\x08\x12\n\x0b\n\x04\x04\x01\x02\0\ - \x12\x03\n\x04\x1b\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\n\x04\n\n\x0c\n\ - \x05\x04\x01\x02\0\x01\x12\x03\n\x0b\x16\n\x0c\n\x05\x04\x01\x02\0\x03\ - \x12\x03\n\x19\x1a\n\n\n\x02\x04\x02\x12\x04\x0c\0\x11\x01\n\n\n\x03\x04\ - \x02\x01\x12\x03\x0c\x08\x17\n\x0b\n\x04\x04\x02\x02\0\x12\x03\r\x04\x1c\ - \n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\r\x04\n\n\x0c\n\x05\x04\x02\x02\0\ - \x01\x12\x03\r\x0b\x17\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\r\x1a\x1b\n\ - \x0b\n\x04\x04\x02\x02\x01\x12\x03\x0e\x04\x14\n\x0c\n\x05\x04\x02\x02\ - \x01\x05\x12\x03\x0e\x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\x0e\ - \x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03\x0e\x12\x13\n\x0b\n\x04\ - \x04\x02\x02\x02\x12\x03\x0f\x04\x14\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\ - \x03\x0f\x04\n\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\x0f\x0b\x0f\n\x0c\ - \n\x05\x04\x02\x02\x02\x03\x12\x03\x0f\x12\x13\n\x0b\n\x04\x04\x02\x02\ - \x03\x12\x03\x10\x04\x1f\n\x0c\n\x05\x04\x02\x02\x03\x06\x12\x03\x10\x04\ - \x0e\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\x10\x0f\x1a\n\x0c\n\x05\x04\ - \x02\x02\x03\x03\x12\x03\x10\x1d\x1e\n\n\n\x02\x04\x03\x12\x04\x12\0\x1b\ - \x01\n\n\n\x03\x04\x03\x01\x12\x03\x12\x08\x0b\n\x0b\n\x04\x04\x03\x02\0\ - \x12\x03\x13\x04\x12\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x13\x04\n\n\ - \x0c\n\x05\x04\x03\x02\0\x01\x12\x03\x13\x0b\r\n\x0c\n\x05\x04\x03\x02\0\ - \x03\x12\x03\x13\x10\x11\n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x14\x04\x1c\ - \n\x0c\n\x05\x04\x03\x02\x01\x05\x12\x03\x14\x04\n\n\x0c\n\x05\x04\x03\ - \x02\x01\x01\x12\x03\x14\x0b\x17\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\x03\ - \x14\x1a\x1b\n\x0b\n\x04\x04\x03\x02\x02\x12\x03\x15\x04\x14\n\x0c\n\x05\ - \x04\x03\x02\x02\x05\x12\x03\x15\x04\n\n\x0c\n\x05\x04\x03\x02\x02\x01\ - \x12\x03\x15\x0b\x0f\n\x0c\n\x05\x04\x03\x02\x02\x03\x12\x03\x15\x12\x13\ - \n\x0b\n\x04\x04\x03\x02\x03\x12\x03\x16\x04\x14\n\x0c\n\x05\x04\x03\x02\ - \x03\x05\x12\x03\x16\x04\n\n\x0c\n\x05\x04\x03\x02\x03\x01\x12\x03\x16\ - \x0b\x0f\n\x0c\n\x05\x04\x03\x02\x03\x03\x12\x03\x16\x12\x13\n\x0b\n\x04\ - \x04\x03\x02\x04\x12\x03\x17\x04\x20\n\x0c\n\x05\x04\x03\x02\x04\x06\x12\ - \x03\x17\x04\x10\n\x0c\n\x05\x04\x03\x02\x04\x01\x12\x03\x17\x11\x1b\n\ - \x0c\n\x05\x04\x03\x02\x04\x03\x12\x03\x17\x1e\x1f\n\x0b\n\x04\x04\x03\ - \x02\x05\x12\x03\x18\x04\x16\n\x0c\n\x05\x04\x03\x02\x05\x05\x12\x03\x18\ - \x04\t\n\x0c\n\x05\x04\x03\x02\x05\x01\x12\x03\x18\n\x11\n\x0c\n\x05\x04\ - \x03\x02\x05\x03\x12\x03\x18\x14\x15\n\x0b\n\x04\x04\x03\x02\x06\x12\x03\ - \x19\x04\x1c\n\x0c\n\x05\x04\x03\x02\x06\x05\x12\x03\x19\x04\t\n\x0c\n\ - \x05\x04\x03\x02\x06\x01\x12\x03\x19\n\x17\n\x0c\n\x05\x04\x03\x02\x06\ - \x03\x12\x03\x19\x1a\x1b\n\x0b\n\x04\x04\x03\x02\x07\x12\x03\x1a\x04\x1a\ - \n\x0c\n\x05\x04\x03\x02\x07\x05\x12\x03\x1a\x04\t\n\x0c\n\x05\x04\x03\ - \x02\x07\x01\x12\x03\x1a\n\x15\n\x0c\n\x05\x04\x03\x02\x07\x03\x12\x03\ - \x1a\x18\x19\n\n\n\x02\x04\x04\x12\x04\x1c\0\x1e\x01\n\n\n\x03\x04\x04\ - \x01\x12\x03\x1c\x08\x13\n\x0b\n\x04\x04\x04\x02\0\x12\x03\x1d\x04\x1b\n\ - \x0c\n\x05\x04\x04\x02\0\x04\x12\x03\x1d\x04\x0c\n\x0c\n\x05\x04\x04\x02\ - \0\x06\x12\x03\x1d\r\x10\n\x0c\n\x05\x04\x04\x02\0\x01\x12\x03\x1d\x11\ - \x16\n\x0c\n\x05\x04\x04\x02\0\x03\x12\x03\x1d\x19\x1ab\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-core-data-model/src/protobuf/model/app_query.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/app_query.rs deleted file mode 100644 index 17dcdefbd8..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/model/app_query.rs +++ /dev/null @@ -1,368 +0,0 @@ -// This file is generated by rust-protobuf 2.22.1. 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 `app_query.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; - -#[derive(PartialEq,Clone,Default)] -pub struct QueryAppRequest { - // message fields - pub app_ids: ::protobuf::RepeatedField<::std::string::String>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a QueryAppRequest { - fn default() -> &'a QueryAppRequest { - ::default_instance() - } -} - -impl QueryAppRequest { - pub fn new() -> QueryAppRequest { - ::std::default::Default::default() - } - - // repeated string app_ids = 1; - - - pub fn get_app_ids(&self) -> &[::std::string::String] { - &self.app_ids - } - pub fn clear_app_ids(&mut self) { - self.app_ids.clear(); - } - - // Param is passed by value, moved - pub fn set_app_ids(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.app_ids = v; - } - - // Mutable pointer to the field. - pub fn mut_app_ids(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.app_ids - } - - // Take field - pub fn take_app_ids(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.app_ids, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for QueryAppRequest { - 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.app_ids)?; - }, - _ => { - ::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.app_ids { - 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.app_ids { - 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> QueryAppRequest { - QueryAppRequest::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>( - "app_ids", - |m: &QueryAppRequest| { &m.app_ids }, - |m: &mut QueryAppRequest| { &mut m.app_ids }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "QueryAppRequest", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static QueryAppRequest { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(QueryAppRequest::new) - } -} - -impl ::protobuf::Clear for QueryAppRequest { - fn clear(&mut self) { - self.app_ids.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for QueryAppRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for QueryAppRequest { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct AppId { - // message fields - pub app_id: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a AppId { - fn default() -> &'a AppId { - ::default_instance() - } -} - -impl AppId { - pub fn new() -> AppId { - ::std::default::Default::default() - } - - // string app_id = 1; - - - pub fn get_app_id(&self) -> &str { - &self.app_id - } - pub fn clear_app_id(&mut self) { - self.app_id.clear(); - } - - // Param is passed by value, moved - pub fn set_app_id(&mut self, v: ::std::string::String) { - self.app_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_app_id(&mut self) -> &mut ::std::string::String { - &mut self.app_id - } - - // Take field - pub fn take_app_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.app_id, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for AppId { - 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.app_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.app_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.app_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.app_id.is_empty() { - os.write_string(1, &self.app_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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> AppId { - AppId::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>( - "app_id", - |m: &AppId| { &m.app_id }, - |m: &mut AppId| { &mut m.app_id }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "AppId", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static AppId { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(AppId::new) - } -} - -impl ::protobuf::Clear for AppId { - fn clear(&mut self) { - self.app_id.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for AppId { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for AppId { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x0fapp_query.proto\"*\n\x0fQueryAppRequest\x12\x17\n\x07app_ids\x18\ - \x01\x20\x03(\tR\x06appIds\"\x1e\n\x05AppId\x12\x15\n\x06app_id\x18\x01\ - \x20\x01(\tR\x05appIdJ\xbe\x01\n\x06\x12\x04\0\0\x07\x01\n\x08\n\x01\x0c\ - \x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x04\x01\n\n\n\x03\x04\0\ - \x01\x12\x03\x02\x08\x17\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x20\n\ - \x0c\n\x05\x04\0\x02\0\x04\x12\x03\x03\x04\x0c\n\x0c\n\x05\x04\0\x02\0\ - \x05\x12\x03\x03\r\x13\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x14\x1b\n\ - \x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x1e\x1f\n\n\n\x02\x04\x01\x12\x04\ - \x05\0\x07\x01\n\n\n\x03\x04\x01\x01\x12\x03\x05\x08\r\n\x0b\n\x04\x04\ - \x01\x02\0\x12\x03\x06\x04\x16\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x06\ - \x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x06\x0b\x11\n\x0c\n\x05\x04\ - \x01\x02\0\x03\x12\x03\x06\x14\x15b\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-core-data-model/src/protobuf/model/app_update.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/app_update.rs deleted file mode 100644 index 94becd4c75..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/model/app_update.rs +++ /dev/null @@ -1,1028 +0,0 @@ -// This file is generated by rust-protobuf 2.22.1. 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 `app_update.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; - -#[derive(PartialEq,Clone,Default)] -pub struct UpdateAppRequest { - // message fields - pub app_id: ::std::string::String, - // message oneof groups - pub one_of_name: ::std::option::Option, - pub one_of_desc: ::std::option::Option, - pub one_of_color_style: ::std::option::Option, - pub one_of_is_trash: ::std::option::Option, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a UpdateAppRequest { - fn default() -> &'a UpdateAppRequest { - ::default_instance() - } -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateAppRequest_oneof_one_of_name { - name(::std::string::String), -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateAppRequest_oneof_one_of_desc { - desc(::std::string::String), -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateAppRequest_oneof_one_of_color_style { - color_style(super::app_create::ColorStyle), -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateAppRequest_oneof_one_of_is_trash { - is_trash(bool), -} - -impl UpdateAppRequest { - pub fn new() -> UpdateAppRequest { - ::std::default::Default::default() - } - - // string app_id = 1; - - - pub fn get_app_id(&self) -> &str { - &self.app_id - } - pub fn clear_app_id(&mut self) { - self.app_id.clear(); - } - - // Param is passed by value, moved - pub fn set_app_id(&mut self, v: ::std::string::String) { - self.app_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_app_id(&mut self) -> &mut ::std::string::String { - &mut self.app_id - } - - // Take field - pub fn take_app_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.app_id, ::std::string::String::new()) - } - - // string name = 2; - - - pub fn get_name(&self) -> &str { - match self.one_of_name { - ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(ref v)) => v, - _ => "", - } - } - pub fn clear_name(&mut self) { - self.one_of_name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - match self.one_of_name { - ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.one_of_name = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(v)) - } - - // Mutable pointer to the field. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(_)) = self.one_of_name { - } else { - self.one_of_name = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(::std::string::String::new())); - } - match self.one_of_name { - ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - if self.has_name() { - match self.one_of_name.take() { - ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } - - // string desc = 3; - - - pub fn get_desc(&self) -> &str { - match self.one_of_desc { - ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(ref v)) => v, - _ => "", - } - } - pub fn clear_desc(&mut self) { - self.one_of_desc = ::std::option::Option::None; - } - - pub fn has_desc(&self) -> bool { - match self.one_of_desc { - ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_desc(&mut self, v: ::std::string::String) { - self.one_of_desc = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(v)) - } - - // Mutable pointer to the field. - pub fn mut_desc(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(_)) = self.one_of_desc { - } else { - self.one_of_desc = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(::std::string::String::new())); - } - match self.one_of_desc { - ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_desc(&mut self) -> ::std::string::String { - if self.has_desc() { - match self.one_of_desc.take() { - ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } - - // .ColorStyle color_style = 4; - - - pub fn get_color_style(&self) -> &super::app_create::ColorStyle { - match self.one_of_color_style { - ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(ref v)) => v, - _ => ::default_instance(), - } - } - pub fn clear_color_style(&mut self) { - self.one_of_color_style = ::std::option::Option::None; - } - - pub fn has_color_style(&self) -> bool { - match self.one_of_color_style { - ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_color_style(&mut self, v: super::app_create::ColorStyle) { - self.one_of_color_style = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(v)) - } - - // Mutable pointer to the field. - pub fn mut_color_style(&mut self) -> &mut super::app_create::ColorStyle { - if let ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(_)) = self.one_of_color_style { - } else { - self.one_of_color_style = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(super::app_create::ColorStyle::new())); - } - match self.one_of_color_style { - ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_color_style(&mut self) -> super::app_create::ColorStyle { - if self.has_color_style() { - match self.one_of_color_style.take() { - ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(v)) => v, - _ => panic!(), - } - } else { - super::app_create::ColorStyle::new() - } - } - - // bool is_trash = 5; - - - pub fn get_is_trash(&self) -> bool { - match self.one_of_is_trash { - ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_is_trash::is_trash(v)) => v, - _ => false, - } - } - pub fn clear_is_trash(&mut self) { - self.one_of_is_trash = ::std::option::Option::None; - } - - pub fn has_is_trash(&self) -> bool { - match self.one_of_is_trash { - ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_is_trash::is_trash(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_is_trash(&mut self, v: bool) { - self.one_of_is_trash = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_is_trash::is_trash(v)) - } -} - -impl ::protobuf::Message for UpdateAppRequest { - fn is_initialized(&self) -> bool { - if let Some(UpdateAppRequest_oneof_one_of_color_style::color_style(ref v)) = self.one_of_color_style { - 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.app_id)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_name = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(is.read_string()?)); - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_desc = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(is.read_string()?)); - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_color_style = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_color_style::color_style(is.read_message()?)); - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_is_trash = ::std::option::Option::Some(UpdateAppRequest_oneof_one_of_is_trash::is_trash(is.read_bool()?)); - }, - _ => { - ::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.app_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.app_id); - } - if let ::std::option::Option::Some(ref v) = self.one_of_name { - match v { - &UpdateAppRequest_oneof_one_of_name::name(ref v) => { - my_size += ::protobuf::rt::string_size(2, &v); - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_desc { - match v { - &UpdateAppRequest_oneof_one_of_desc::desc(ref v) => { - my_size += ::protobuf::rt::string_size(3, &v); - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_color_style { - match v { - &UpdateAppRequest_oneof_one_of_color_style::color_style(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_is_trash { - match v { - &UpdateAppRequest_oneof_one_of_is_trash::is_trash(v) => { - my_size += 2; - }, - }; - } - 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.app_id.is_empty() { - os.write_string(1, &self.app_id)?; - } - if let ::std::option::Option::Some(ref v) = self.one_of_name { - match v { - &UpdateAppRequest_oneof_one_of_name::name(ref v) => { - os.write_string(2, v)?; - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_desc { - match v { - &UpdateAppRequest_oneof_one_of_desc::desc(ref v) => { - os.write_string(3, v)?; - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_color_style { - match v { - &UpdateAppRequest_oneof_one_of_color_style::color_style(ref v) => { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_is_trash { - match v { - &UpdateAppRequest_oneof_one_of_is_trash::is_trash(v) => { - os.write_bool(5, 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> UpdateAppRequest { - UpdateAppRequest::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>( - "app_id", - |m: &UpdateAppRequest| { &m.app_id }, - |m: &mut UpdateAppRequest| { &mut m.app_id }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "name", - UpdateAppRequest::has_name, - UpdateAppRequest::get_name, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "desc", - UpdateAppRequest::has_desc, - UpdateAppRequest::get_desc, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, super::app_create::ColorStyle>( - "color_style", - UpdateAppRequest::has_color_style, - UpdateAppRequest::get_color_style, - )); - fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>( - "is_trash", - UpdateAppRequest::has_is_trash, - UpdateAppRequest::get_is_trash, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "UpdateAppRequest", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static UpdateAppRequest { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(UpdateAppRequest::new) - } -} - -impl ::protobuf::Clear for UpdateAppRequest { - fn clear(&mut self) { - self.app_id.clear(); - self.one_of_name = ::std::option::Option::None; - self.one_of_desc = ::std::option::Option::None; - self.one_of_color_style = ::std::option::Option::None; - self.one_of_is_trash = ::std::option::Option::None; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for UpdateAppRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UpdateAppRequest { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct UpdateAppParams { - // message fields - pub app_id: ::std::string::String, - // message oneof groups - pub one_of_name: ::std::option::Option, - pub one_of_desc: ::std::option::Option, - pub one_of_color_style: ::std::option::Option, - pub one_of_is_trash: ::std::option::Option, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a UpdateAppParams { - fn default() -> &'a UpdateAppParams { - ::default_instance() - } -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateAppParams_oneof_one_of_name { - name(::std::string::String), -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateAppParams_oneof_one_of_desc { - desc(::std::string::String), -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateAppParams_oneof_one_of_color_style { - color_style(super::app_create::ColorStyle), -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateAppParams_oneof_one_of_is_trash { - is_trash(bool), -} - -impl UpdateAppParams { - pub fn new() -> UpdateAppParams { - ::std::default::Default::default() - } - - // string app_id = 1; - - - pub fn get_app_id(&self) -> &str { - &self.app_id - } - pub fn clear_app_id(&mut self) { - self.app_id.clear(); - } - - // Param is passed by value, moved - pub fn set_app_id(&mut self, v: ::std::string::String) { - self.app_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_app_id(&mut self) -> &mut ::std::string::String { - &mut self.app_id - } - - // Take field - pub fn take_app_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.app_id, ::std::string::String::new()) - } - - // string name = 2; - - - pub fn get_name(&self) -> &str { - match self.one_of_name { - ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(ref v)) => v, - _ => "", - } - } - pub fn clear_name(&mut self) { - self.one_of_name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - match self.one_of_name { - ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.one_of_name = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(v)) - } - - // Mutable pointer to the field. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(_)) = self.one_of_name { - } else { - self.one_of_name = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(::std::string::String::new())); - } - match self.one_of_name { - ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - if self.has_name() { - match self.one_of_name.take() { - ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } - - // string desc = 3; - - - pub fn get_desc(&self) -> &str { - match self.one_of_desc { - ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(ref v)) => v, - _ => "", - } - } - pub fn clear_desc(&mut self) { - self.one_of_desc = ::std::option::Option::None; - } - - pub fn has_desc(&self) -> bool { - match self.one_of_desc { - ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_desc(&mut self, v: ::std::string::String) { - self.one_of_desc = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(v)) - } - - // Mutable pointer to the field. - pub fn mut_desc(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(_)) = self.one_of_desc { - } else { - self.one_of_desc = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(::std::string::String::new())); - } - match self.one_of_desc { - ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_desc(&mut self) -> ::std::string::String { - if self.has_desc() { - match self.one_of_desc.take() { - ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } - - // .ColorStyle color_style = 4; - - - pub fn get_color_style(&self) -> &super::app_create::ColorStyle { - match self.one_of_color_style { - ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(ref v)) => v, - _ => ::default_instance(), - } - } - pub fn clear_color_style(&mut self) { - self.one_of_color_style = ::std::option::Option::None; - } - - pub fn has_color_style(&self) -> bool { - match self.one_of_color_style { - ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_color_style(&mut self, v: super::app_create::ColorStyle) { - self.one_of_color_style = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(v)) - } - - // Mutable pointer to the field. - pub fn mut_color_style(&mut self) -> &mut super::app_create::ColorStyle { - if let ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(_)) = self.one_of_color_style { - } else { - self.one_of_color_style = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(super::app_create::ColorStyle::new())); - } - match self.one_of_color_style { - ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_color_style(&mut self) -> super::app_create::ColorStyle { - if self.has_color_style() { - match self.one_of_color_style.take() { - ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(v)) => v, - _ => panic!(), - } - } else { - super::app_create::ColorStyle::new() - } - } - - // bool is_trash = 5; - - - pub fn get_is_trash(&self) -> bool { - match self.one_of_is_trash { - ::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(v)) => v, - _ => false, - } - } - pub fn clear_is_trash(&mut self) { - self.one_of_is_trash = ::std::option::Option::None; - } - - pub fn has_is_trash(&self) -> bool { - match self.one_of_is_trash { - ::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_is_trash(&mut self, v: bool) { - self.one_of_is_trash = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(v)) - } -} - -impl ::protobuf::Message for UpdateAppParams { - fn is_initialized(&self) -> bool { - if let Some(UpdateAppParams_oneof_one_of_color_style::color_style(ref v)) = self.one_of_color_style { - 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.app_id)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_name = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_name::name(is.read_string()?)); - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_desc = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_desc::desc(is.read_string()?)); - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_color_style = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_color_style::color_style(is.read_message()?)); - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_is_trash = ::std::option::Option::Some(UpdateAppParams_oneof_one_of_is_trash::is_trash(is.read_bool()?)); - }, - _ => { - ::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.app_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.app_id); - } - if let ::std::option::Option::Some(ref v) = self.one_of_name { - match v { - &UpdateAppParams_oneof_one_of_name::name(ref v) => { - my_size += ::protobuf::rt::string_size(2, &v); - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_desc { - match v { - &UpdateAppParams_oneof_one_of_desc::desc(ref v) => { - my_size += ::protobuf::rt::string_size(3, &v); - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_color_style { - match v { - &UpdateAppParams_oneof_one_of_color_style::color_style(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_is_trash { - match v { - &UpdateAppParams_oneof_one_of_is_trash::is_trash(v) => { - my_size += 2; - }, - }; - } - 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.app_id.is_empty() { - os.write_string(1, &self.app_id)?; - } - if let ::std::option::Option::Some(ref v) = self.one_of_name { - match v { - &UpdateAppParams_oneof_one_of_name::name(ref v) => { - os.write_string(2, v)?; - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_desc { - match v { - &UpdateAppParams_oneof_one_of_desc::desc(ref v) => { - os.write_string(3, v)?; - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_color_style { - match v { - &UpdateAppParams_oneof_one_of_color_style::color_style(ref v) => { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_is_trash { - match v { - &UpdateAppParams_oneof_one_of_is_trash::is_trash(v) => { - os.write_bool(5, 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> UpdateAppParams { - UpdateAppParams::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>( - "app_id", - |m: &UpdateAppParams| { &m.app_id }, - |m: &mut UpdateAppParams| { &mut m.app_id }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "name", - UpdateAppParams::has_name, - UpdateAppParams::get_name, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "desc", - UpdateAppParams::has_desc, - UpdateAppParams::get_desc, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, super::app_create::ColorStyle>( - "color_style", - UpdateAppParams::has_color_style, - UpdateAppParams::get_color_style, - )); - fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>( - "is_trash", - UpdateAppParams::has_is_trash, - UpdateAppParams::get_is_trash, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "UpdateAppParams", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static UpdateAppParams { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(UpdateAppParams::new) - } -} - -impl ::protobuf::Clear for UpdateAppParams { - fn clear(&mut self) { - self.app_id.clear(); - self.one_of_name = ::std::option::Option::None; - self.one_of_desc = ::std::option::Option::None; - self.one_of_color_style = ::std::option::Option::None; - self.one_of_is_trash = ::std::option::Option::None; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for UpdateAppParams { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UpdateAppParams { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x10app_update.proto\x1a\x10app_create.proto\"\xe9\x01\n\x10UpdateAppR\ - equest\x12\x15\n\x06app_id\x18\x01\x20\x01(\tR\x05appId\x12\x14\n\x04nam\ - e\x18\x02\x20\x01(\tH\0R\x04name\x12\x14\n\x04desc\x18\x03\x20\x01(\tH\ - \x01R\x04desc\x12.\n\x0bcolor_style\x18\x04\x20\x01(\x0b2\x0b.ColorStyle\ - H\x02R\ncolorStyle\x12\x1b\n\x08is_trash\x18\x05\x20\x01(\x08H\x03R\x07i\ - sTrashB\r\n\x0bone_of_nameB\r\n\x0bone_of_descB\x14\n\x12one_of_color_st\ - yleB\x11\n\x0fone_of_is_trash\"\xe8\x01\n\x0fUpdateAppParams\x12\x15\n\ - \x06app_id\x18\x01\x20\x01(\tR\x05appId\x12\x14\n\x04name\x18\x02\x20\ - \x01(\tH\0R\x04name\x12\x14\n\x04desc\x18\x03\x20\x01(\tH\x01R\x04desc\ - \x12.\n\x0bcolor_style\x18\x04\x20\x01(\x0b2\x0b.ColorStyleH\x02R\ncolor\ - Style\x12\x1b\n\x08is_trash\x18\x05\x20\x01(\x08H\x03R\x07isTrashB\r\n\ - \x0bone_of_nameB\r\n\x0bone_of_descB\x14\n\x12one_of_color_styleB\x11\n\ - \x0fone_of_is_trashJ\xcb\x06\n\x06\x12\x04\0\0\x10\x01\n\x08\n\x01\x0c\ - \x12\x03\0\0\x12\n\t\n\x02\x03\0\x12\x03\x01\0\x1a\n\n\n\x02\x04\0\x12\ - \x04\x03\0\t\x01\n\n\n\x03\x04\0\x01\x12\x03\x03\x08\x18\n\x0b\n\x04\x04\ - \0\x02\0\x12\x03\x04\x04\x16\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x04\x04\ - \n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x04\x0b\x11\n\x0c\n\x05\x04\0\x02\ - \0\x03\x12\x03\x04\x14\x15\n\x0b\n\x04\x04\0\x08\0\x12\x03\x05\x04*\n\ - \x0c\n\x05\x04\0\x08\0\x01\x12\x03\x05\n\x15\n\x0b\n\x04\x04\0\x02\x01\ - \x12\x03\x05\x18(\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x05\x18\x1e\n\ - \x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x05\x1f#\n\x0c\n\x05\x04\0\x02\x01\ - \x03\x12\x03\x05&'\n\x0b\n\x04\x04\0\x08\x01\x12\x03\x06\x04*\n\x0c\n\ - \x05\x04\0\x08\x01\x01\x12\x03\x06\n\x15\n\x0b\n\x04\x04\0\x02\x02\x12\ - \x03\x06\x18(\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x06\x18\x1e\n\x0c\n\ - \x05\x04\0\x02\x02\x01\x12\x03\x06\x1f#\n\x0c\n\x05\x04\0\x02\x02\x03\ - \x12\x03\x06&'\n\x0b\n\x04\x04\0\x08\x02\x12\x03\x07\x04<\n\x0c\n\x05\ - \x04\0\x08\x02\x01\x12\x03\x07\n\x1c\n\x0b\n\x04\x04\0\x02\x03\x12\x03\ - \x07\x1f:\n\x0c\n\x05\x04\0\x02\x03\x06\x12\x03\x07\x1f)\n\x0c\n\x05\x04\ - \0\x02\x03\x01\x12\x03\x07*5\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x0789\ - \n\x0b\n\x04\x04\0\x08\x03\x12\x03\x08\x040\n\x0c\n\x05\x04\0\x08\x03\ - \x01\x12\x03\x08\n\x19\n\x0b\n\x04\x04\0\x02\x04\x12\x03\x08\x1c.\n\x0c\ - \n\x05\x04\0\x02\x04\x05\x12\x03\x08\x1c\x20\n\x0c\n\x05\x04\0\x02\x04\ - \x01\x12\x03\x08!)\n\x0c\n\x05\x04\0\x02\x04\x03\x12\x03\x08,-\n\n\n\x02\ - \x04\x01\x12\x04\n\0\x10\x01\n\n\n\x03\x04\x01\x01\x12\x03\n\x08\x17\n\ - \x0b\n\x04\x04\x01\x02\0\x12\x03\x0b\x04\x16\n\x0c\n\x05\x04\x01\x02\0\ - \x05\x12\x03\x0b\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x0b\x0b\x11\ - \n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x0b\x14\x15\n\x0b\n\x04\x04\x01\ - \x08\0\x12\x03\x0c\x04*\n\x0c\n\x05\x04\x01\x08\0\x01\x12\x03\x0c\n\x15\ - \n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x0c\x18(\n\x0c\n\x05\x04\x01\x02\ - \x01\x05\x12\x03\x0c\x18\x1e\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\x0c\ - \x1f#\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x0c&'\n\x0b\n\x04\x04\x01\ - \x08\x01\x12\x03\r\x04*\n\x0c\n\x05\x04\x01\x08\x01\x01\x12\x03\r\n\x15\ - \n\x0b\n\x04\x04\x01\x02\x02\x12\x03\r\x18(\n\x0c\n\x05\x04\x01\x02\x02\ - \x05\x12\x03\r\x18\x1e\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\r\x1f#\n\ - \x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\r&'\n\x0b\n\x04\x04\x01\x08\x02\ - \x12\x03\x0e\x04<\n\x0c\n\x05\x04\x01\x08\x02\x01\x12\x03\x0e\n\x1c\n\ - \x0b\n\x04\x04\x01\x02\x03\x12\x03\x0e\x1f:\n\x0c\n\x05\x04\x01\x02\x03\ - \x06\x12\x03\x0e\x1f)\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03\x0e*5\n\ - \x0c\n\x05\x04\x01\x02\x03\x03\x12\x03\x0e89\n\x0b\n\x04\x04\x01\x08\x03\ - \x12\x03\x0f\x040\n\x0c\n\x05\x04\x01\x08\x03\x01\x12\x03\x0f\n\x19\n\ - \x0b\n\x04\x04\x01\x02\x04\x12\x03\x0f\x1c.\n\x0c\n\x05\x04\x01\x02\x04\ - \x05\x12\x03\x0f\x1c\x20\n\x0c\n\x05\x04\x01\x02\x04\x01\x12\x03\x0f!)\n\ - \x0c\n\x05\x04\x01\x02\x04\x03\x12\x03\x0f,-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-core-data-model/src/protobuf/model/document b/shared-lib/flowy-core-data-model/src/protobuf/model/document deleted file mode 100644 index 30559e6564..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/model/document +++ /dev/null @@ -1,41 +0,0 @@ -#![cfg_attr(rustfmt, rustfmt::skip)] -// Auto-generated, do not edit - -mod view_update; -pub use view_update::*; - -mod workspace_setting; -pub use workspace_setting::*; - -mod app_query; -pub use app_query::*; - -mod errors; -pub use errors::*; - -mod workspace_update; -pub use workspace_update::*; - -mod app_create; -pub use app_create::*; - -mod workspace_query; -pub use workspace_query::*; - -mod view_create; -pub use view_create::*; - -mod workspace_create; -pub use workspace_create::*; - -mod app_update; -pub use app_update::*; - -mod view_query; -pub use view_query::*; - -mod trash_create; -pub use trash_create::*; - -mod export; -pub use export::*; diff --git a/shared-lib/flowy-core-data-model/src/protobuf/model/mod.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/mod.rs index 30559e6564..aa6a8a1401 100644 --- a/shared-lib/flowy-core-data-model/src/protobuf/model/mod.rs +++ b/shared-lib/flowy-core-data-model/src/protobuf/model/mod.rs @@ -1,41 +1,20 @@ #![cfg_attr(rustfmt, rustfmt::skip)] // Auto-generated, do not edit -mod view_update; -pub use view_update::*; +mod share; +pub use share::*; -mod workspace_setting; -pub use workspace_setting::*; - -mod app_query; -pub use app_query::*; +mod app; +pub use app::*; mod errors; pub use errors::*; -mod workspace_update; -pub use workspace_update::*; +mod view; +pub use view::*; -mod app_create; -pub use app_create::*; +mod trash; +pub use trash::*; -mod workspace_query; -pub use workspace_query::*; - -mod view_create; -pub use view_create::*; - -mod workspace_create; -pub use workspace_create::*; - -mod app_update; -pub use app_update::*; - -mod view_query; -pub use view_query::*; - -mod trash_create; -pub use trash_create::*; - -mod export; -pub use export::*; +mod workspace; +pub use workspace::*; diff --git a/shared-lib/flowy-core-data-model/src/protobuf/model/export.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/share.rs similarity index 99% rename from shared-lib/flowy-core-data-model/src/protobuf/model/export.rs rename to shared-lib/flowy-core-data-model/src/protobuf/model/share.rs index 48779acd48..7ad41ea786 100644 --- a/shared-lib/flowy-core-data-model/src/protobuf/model/export.rs +++ b/shared-lib/flowy-core-data-model/src/protobuf/model/share.rs @@ -17,7 +17,7 @@ #![allow(trivial_casts)] #![allow(unused_imports)] #![allow(unused_results)] -//! Generated file from `export.proto` +//! Generated file from `share.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. @@ -457,7 +457,7 @@ impl ::protobuf::reflect::ProtobufValue for ExportType { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x0cexport.proto\"T\n\rExportRequest\x12\x15\n\x06doc_id\x18\x01\x20\ + \n\x0bshare.proto\"T\n\rExportRequest\x12\x15\n\x06doc_id\x18\x01\x20\ \x01(\tR\x05docId\x12,\n\x0bexport_type\x18\x02\x20\x01(\x0e2\x0b.Export\ TypeR\nexportType\"N\n\nExportData\x12\x12\n\x04data\x18\x01\x20\x01(\tR\ \x04data\x12,\n\x0bexport_type\x18\x02\x20\x01(\x0e2\x0b.ExportTypeR\nex\ diff --git a/shared-lib/flowy-core-data-model/src/protobuf/model/trash_create.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/trash.rs similarity index 88% rename from shared-lib/flowy-core-data-model/src/protobuf/model/trash_create.rs rename to shared-lib/flowy-core-data-model/src/protobuf/model/trash.rs index d99b7f35d0..9be9f11a4a 100644 --- a/shared-lib/flowy-core-data-model/src/protobuf/model/trash_create.rs +++ b/shared-lib/flowy-core-data-model/src/protobuf/model/trash.rs @@ -17,7 +17,7 @@ #![allow(trivial_casts)] #![allow(unused_imports)] #![allow(unused_results)] -//! Generated file from `trash_create.proto` +//! Generated file from `trash.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. @@ -936,58 +936,58 @@ impl ::protobuf::reflect::ProtobufValue for TrashType { } static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x12trash_create.proto\"P\n\x0fRepeatedTrashId\x12\x1e\n\x05items\x18\ - \x01\x20\x03(\x0b2\x08.TrashIdR\x05items\x12\x1d\n\ndelete_all\x18\x02\ - \x20\x01(\x08R\tdeleteAll\"5\n\x07TrashId\x12\x0e\n\x02id\x18\x01\x20\ - \x01(\tR\x02id\x12\x1a\n\x02ty\x18\x02\x20\x01(\x0e2\n.TrashTypeR\x02ty\ - \"\x8d\x01\n\x05Trash\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x12\ - \n\x04name\x18\x02\x20\x01(\tR\x04name\x12#\n\rmodified_time\x18\x03\x20\ - \x01(\x03R\x0cmodifiedTime\x12\x1f\n\x0bcreate_time\x18\x04\x20\x01(\x03\ - R\ncreateTime\x12\x1a\n\x02ty\x18\x05\x20\x01(\x0e2\n.TrashTypeR\x02ty\"\ - -\n\rRepeatedTrash\x12\x1c\n\x05items\x18\x01\x20\x03(\x0b2\x06.TrashR\ - \x05items*+\n\tTrashType\x12\x0b\n\x07Unknown\x10\0\x12\x08\n\x04View\ - \x10\x01\x12\x07\n\x03App\x10\x02J\xc7\x06\n\x06\x12\x04\0\0\x18\x01\n\ - \x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x05\x01\n\n\ - \n\x03\x04\0\x01\x12\x03\x02\x08\x17\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\ - \x04\x1f\n\x0c\n\x05\x04\0\x02\0\x04\x12\x03\x03\x04\x0c\n\x0c\n\x05\x04\ - \0\x02\0\x06\x12\x03\x03\r\x14\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\ - \x15\x1a\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x1d\x1e\n\x0b\n\x04\x04\ - \0\x02\x01\x12\x03\x04\x04\x18\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\ - \x04\x08\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x04\t\x13\n\x0c\n\x05\x04\ - \0\x02\x01\x03\x12\x03\x04\x16\x17\n\n\n\x02\x04\x01\x12\x04\x06\0\t\x01\ - \n\n\n\x03\x04\x01\x01\x12\x03\x06\x08\x0f\n\x0b\n\x04\x04\x01\x02\0\x12\ - \x03\x07\x04\x12\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x07\x04\n\n\x0c\n\ - \x05\x04\x01\x02\0\x01\x12\x03\x07\x0b\r\n\x0c\n\x05\x04\x01\x02\0\x03\ - \x12\x03\x07\x10\x11\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x08\x04\x15\n\ - \x0c\n\x05\x04\x01\x02\x01\x06\x12\x03\x08\x04\r\n\x0c\n\x05\x04\x01\x02\ - \x01\x01\x12\x03\x08\x0e\x10\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x08\ - \x13\x14\n\n\n\x02\x04\x02\x12\x04\n\0\x10\x01\n\n\n\x03\x04\x02\x01\x12\ - \x03\n\x08\r\n\x0b\n\x04\x04\x02\x02\0\x12\x03\x0b\x04\x12\n\x0c\n\x05\ - \x04\x02\x02\0\x05\x12\x03\x0b\x04\n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\ - \x03\x0b\x0b\r\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x0b\x10\x11\n\x0b\n\ - \x04\x04\x02\x02\x01\x12\x03\x0c\x04\x14\n\x0c\n\x05\x04\x02\x02\x01\x05\ - \x12\x03\x0c\x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\x0c\x0b\x0f\n\ - \x0c\n\x05\x04\x02\x02\x01\x03\x12\x03\x0c\x12\x13\n\x0b\n\x04\x04\x02\ - \x02\x02\x12\x03\r\x04\x1c\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\x03\r\x04\ - \t\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\r\n\x17\n\x0c\n\x05\x04\x02\ - \x02\x02\x03\x12\x03\r\x1a\x1b\n\x0b\n\x04\x04\x02\x02\x03\x12\x03\x0e\ - \x04\x1a\n\x0c\n\x05\x04\x02\x02\x03\x05\x12\x03\x0e\x04\t\n\x0c\n\x05\ - \x04\x02\x02\x03\x01\x12\x03\x0e\n\x15\n\x0c\n\x05\x04\x02\x02\x03\x03\ - \x12\x03\x0e\x18\x19\n\x0b\n\x04\x04\x02\x02\x04\x12\x03\x0f\x04\x15\n\ - \x0c\n\x05\x04\x02\x02\x04\x06\x12\x03\x0f\x04\r\n\x0c\n\x05\x04\x02\x02\ - \x04\x01\x12\x03\x0f\x0e\x10\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\x03\x0f\ - \x13\x14\n\n\n\x02\x04\x03\x12\x04\x11\0\x13\x01\n\n\n\x03\x04\x03\x01\ - \x12\x03\x11\x08\x15\n\x0b\n\x04\x04\x03\x02\0\x12\x03\x12\x04\x1d\n\x0c\ - \n\x05\x04\x03\x02\0\x04\x12\x03\x12\x04\x0c\n\x0c\n\x05\x04\x03\x02\0\ - \x06\x12\x03\x12\r\x12\n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03\x12\x13\x18\ - \n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\x12\x1b\x1c\n\n\n\x02\x05\0\x12\ - \x04\x14\0\x18\x01\n\n\n\x03\x05\0\x01\x12\x03\x14\x05\x0e\n\x0b\n\x04\ - \x05\0\x02\0\x12\x03\x15\x04\x10\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x15\ - \x04\x0b\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x15\x0e\x0f\n\x0b\n\x04\x05\ - \0\x02\x01\x12\x03\x16\x04\r\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x16\ - \x04\x08\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\x16\x0b\x0c\n\x0b\n\x04\ - \x05\0\x02\x02\x12\x03\x17\x04\x0c\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\ - \x17\x04\x07\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x17\n\x0bb\x06proto3\ + \n\x0btrash.proto\"P\n\x0fRepeatedTrashId\x12\x1e\n\x05items\x18\x01\x20\ + \x03(\x0b2\x08.TrashIdR\x05items\x12\x1d\n\ndelete_all\x18\x02\x20\x01(\ + \x08R\tdeleteAll\"5\n\x07TrashId\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02\ + id\x12\x1a\n\x02ty\x18\x02\x20\x01(\x0e2\n.TrashTypeR\x02ty\"\x8d\x01\n\ + \x05Trash\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x12\n\x04name\ + \x18\x02\x20\x01(\tR\x04name\x12#\n\rmodified_time\x18\x03\x20\x01(\x03R\ + \x0cmodifiedTime\x12\x1f\n\x0bcreate_time\x18\x04\x20\x01(\x03R\ncreateT\ + ime\x12\x1a\n\x02ty\x18\x05\x20\x01(\x0e2\n.TrashTypeR\x02ty\"-\n\rRepea\ + tedTrash\x12\x1c\n\x05items\x18\x01\x20\x03(\x0b2\x06.TrashR\x05items*+\ + \n\tTrashType\x12\x0b\n\x07Unknown\x10\0\x12\x08\n\x04View\x10\x01\x12\ + \x07\n\x03App\x10\x02J\xc7\x06\n\x06\x12\x04\0\0\x18\x01\n\x08\n\x01\x0c\ + \x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x05\x01\n\n\n\x03\x04\0\ + \x01\x12\x03\x02\x08\x17\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x1f\n\ + \x0c\n\x05\x04\0\x02\0\x04\x12\x03\x03\x04\x0c\n\x0c\n\x05\x04\0\x02\0\ + \x06\x12\x03\x03\r\x14\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x15\x1a\n\ + \x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x1d\x1e\n\x0b\n\x04\x04\0\x02\x01\ + \x12\x03\x04\x04\x18\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\x04\x08\n\ + \x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x04\t\x13\n\x0c\n\x05\x04\0\x02\x01\ + \x03\x12\x03\x04\x16\x17\n\n\n\x02\x04\x01\x12\x04\x06\0\t\x01\n\n\n\x03\ + \x04\x01\x01\x12\x03\x06\x08\x0f\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x07\ + \x04\x12\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x07\x04\n\n\x0c\n\x05\x04\ + \x01\x02\0\x01\x12\x03\x07\x0b\r\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\ + \x07\x10\x11\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x08\x04\x15\n\x0c\n\x05\ + \x04\x01\x02\x01\x06\x12\x03\x08\x04\r\n\x0c\n\x05\x04\x01\x02\x01\x01\ + \x12\x03\x08\x0e\x10\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x08\x13\x14\ + \n\n\n\x02\x04\x02\x12\x04\n\0\x10\x01\n\n\n\x03\x04\x02\x01\x12\x03\n\ + \x08\r\n\x0b\n\x04\x04\x02\x02\0\x12\x03\x0b\x04\x12\n\x0c\n\x05\x04\x02\ + \x02\0\x05\x12\x03\x0b\x04\n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x0b\ + \x0b\r\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x0b\x10\x11\n\x0b\n\x04\x04\ + \x02\x02\x01\x12\x03\x0c\x04\x14\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\ + \x0c\x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\x0c\x0b\x0f\n\x0c\n\ + \x05\x04\x02\x02\x01\x03\x12\x03\x0c\x12\x13\n\x0b\n\x04\x04\x02\x02\x02\ + \x12\x03\r\x04\x1c\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\x03\r\x04\t\n\x0c\ + \n\x05\x04\x02\x02\x02\x01\x12\x03\r\n\x17\n\x0c\n\x05\x04\x02\x02\x02\ + \x03\x12\x03\r\x1a\x1b\n\x0b\n\x04\x04\x02\x02\x03\x12\x03\x0e\x04\x1a\n\ + \x0c\n\x05\x04\x02\x02\x03\x05\x12\x03\x0e\x04\t\n\x0c\n\x05\x04\x02\x02\ + \x03\x01\x12\x03\x0e\n\x15\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\x03\x0e\ + \x18\x19\n\x0b\n\x04\x04\x02\x02\x04\x12\x03\x0f\x04\x15\n\x0c\n\x05\x04\ + \x02\x02\x04\x06\x12\x03\x0f\x04\r\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\ + \x03\x0f\x0e\x10\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\x03\x0f\x13\x14\n\n\ + \n\x02\x04\x03\x12\x04\x11\0\x13\x01\n\n\n\x03\x04\x03\x01\x12\x03\x11\ + \x08\x15\n\x0b\n\x04\x04\x03\x02\0\x12\x03\x12\x04\x1d\n\x0c\n\x05\x04\ + \x03\x02\0\x04\x12\x03\x12\x04\x0c\n\x0c\n\x05\x04\x03\x02\0\x06\x12\x03\ + \x12\r\x12\n\x0c\n\x05\x04\x03\x02\0\x01\x12\x03\x12\x13\x18\n\x0c\n\x05\ + \x04\x03\x02\0\x03\x12\x03\x12\x1b\x1c\n\n\n\x02\x05\0\x12\x04\x14\0\x18\ + \x01\n\n\n\x03\x05\0\x01\x12\x03\x14\x05\x0e\n\x0b\n\x04\x05\0\x02\0\x12\ + \x03\x15\x04\x10\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x15\x04\x0b\n\x0c\n\ + \x05\x05\0\x02\0\x02\x12\x03\x15\x0e\x0f\n\x0b\n\x04\x05\0\x02\x01\x12\ + \x03\x16\x04\r\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x16\x04\x08\n\x0c\n\ + \x05\x05\0\x02\x01\x02\x12\x03\x16\x0b\x0c\n\x0b\n\x04\x05\0\x02\x02\x12\ + \x03\x17\x04\x0c\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\x17\x04\x07\n\x0c\ + \n\x05\x05\0\x02\x02\x02\x12\x03\x17\n\x0bb\x06proto3\ "; static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT; diff --git a/shared-lib/flowy-core-data-model/src/protobuf/model/view.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/view.rs new file mode 100644 index 0000000000..bcfbd746c2 --- /dev/null +++ b/shared-lib/flowy-core-data-model/src/protobuf/model/view.rs @@ -0,0 +1,2917 @@ +// This file is generated by rust-protobuf 2.22.1. 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.proto` + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; + +#[derive(PartialEq,Clone,Default)] +pub struct View { + // 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 view_type: ViewType, + pub version: i64, + pub belongings: ::protobuf::SingularPtrField, + pub modified_time: i64, + pub create_time: i64, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a View { + fn default() -> &'a View { + ::default_instance() + } +} + +impl View { + pub fn new() -> View { + ::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()) + } + + // .ViewType view_type = 5; + + + pub fn get_view_type(&self) -> ViewType { + self.view_type + } + pub fn clear_view_type(&mut self) { + self.view_type = ViewType::Blank; + } + + // Param is passed by value, moved + pub fn set_view_type(&mut self, v: ViewType) { + self.view_type = v; + } + + // int64 version = 6; + + + pub fn get_version(&self) -> i64 { + self.version + } + pub fn clear_version(&mut self) { + self.version = 0; + } + + // Param is passed by value, moved + pub fn set_version(&mut self, v: i64) { + self.version = v; + } + + // .RepeatedView belongings = 7; + + + pub fn get_belongings(&self) -> &RepeatedView { + self.belongings.as_ref().unwrap_or_else(|| ::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()) + } + + // int64 modified_time = 8; + + + pub fn get_modified_time(&self) -> i64 { + self.modified_time + } + pub fn clear_modified_time(&mut self) { + self.modified_time = 0; + } + + // Param is passed by value, moved + pub fn set_modified_time(&mut self, v: i64) { + self.modified_time = v; + } + + // int64 create_time = 9; + + + pub fn get_create_time(&self) -> i64 { + self.create_time + } + pub fn clear_create_time(&mut self) { + self.create_time = 0; + } + + // Param is passed by value, moved + pub fn set_create_time(&mut self, v: i64) { + self.create_time = v; + } +} + +impl ::protobuf::Message for View { + fn is_initialized(&self) -> bool { + for v in &self.belongings { + 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.view_type, 5, &mut self.unknown_fields)? + }, + 6 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.version = tmp; + }, + 7 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.belongings)?; + }, + 8 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.modified_time = tmp; + }, + 9 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.create_time = tmp; + }, + _ => { + ::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.view_type != ViewType::Blank { + my_size += ::protobuf::rt::enum_size(5, self.view_type); + } + if self.version != 0 { + my_size += ::protobuf::rt::value_size(6, self.version, ::protobuf::wire_format::WireTypeVarint); + } + 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 self.modified_time != 0 { + my_size += ::protobuf::rt::value_size(8, self.modified_time, ::protobuf::wire_format::WireTypeVarint); + } + if self.create_time != 0 { + my_size += ::protobuf::rt::value_size(9, self.create_time, ::protobuf::wire_format::WireTypeVarint); + } + 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.view_type != ViewType::Blank { + os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.view_type))?; + } + if self.version != 0 { + os.write_int64(6, self.version)?; + } + if let Some(ref v) = self.belongings.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)?; + } + if self.modified_time != 0 { + os.write_int64(8, self.modified_time)?; + } + if self.create_time != 0 { + os.write_int64(9, self.create_time)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> View { + View::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: &View| { &m.id }, + |m: &mut View| { &mut m.id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "belong_to_id", + |m: &View| { &m.belong_to_id }, + |m: &mut View| { &mut m.belong_to_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "name", + |m: &View| { &m.name }, + |m: &mut View| { &mut m.name }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "desc", + |m: &View| { &m.desc }, + |m: &mut View| { &mut m.desc }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "view_type", + |m: &View| { &m.view_type }, + |m: &mut View| { &mut m.view_type }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "version", + |m: &View| { &m.version }, + |m: &mut View| { &mut m.version }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "belongings", + |m: &View| { &m.belongings }, + |m: &mut View| { &mut m.belongings }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "modified_time", + |m: &View| { &m.modified_time }, + |m: &mut View| { &mut m.modified_time }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "create_time", + |m: &View| { &m.create_time }, + |m: &mut View| { &mut m.create_time }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "View", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static View { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(View::new) + } +} + +impl ::protobuf::Clear for View { + fn clear(&mut self) { + self.id.clear(); + self.belong_to_id.clear(); + self.name.clear(); + self.desc.clear(); + self.view_type = ViewType::Blank; + self.version = 0; + self.belongings.clear(); + self.modified_time = 0; + self.create_time = 0; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for View { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for View { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct RepeatedView { + // message fields + pub items: ::protobuf::RepeatedField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a RepeatedView { + fn default() -> &'a RepeatedView { + ::default_instance() + } +} + +impl RepeatedView { + pub fn new() -> RepeatedView { + ::std::default::Default::default() + } + + // repeated .View items = 1; + + + pub fn get_items(&self) -> &[View] { + &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) { + self.items = v; + } + + // Mutable pointer to the field. + pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.items + } + + // Take field + pub fn take_items(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new()) + } +} + +impl ::protobuf::Message for RepeatedView { + fn is_initialized(&self) -> bool { + for v in &self.items { + 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_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())?; + }, + }; + } + ::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 { + 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<()> { + 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(()) + } + + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + 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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "items", + |m: &RepeatedView| { &m.items }, + |m: &mut RepeatedView| { &mut m.items }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RepeatedView", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static RepeatedView { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RepeatedView::new) + } +} + +impl ::protobuf::Clear for RepeatedView { + fn clear(&mut self) { + self.items.clear(); + self.unknown_fields.clear(); + } +} + +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 RepeatedView { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct CreateViewRequest { + // message fields + pub belong_to_id: ::std::string::String, + pub name: ::std::string::String, + pub desc: ::std::string::String, + pub view_type: ViewType, + // message oneof groups + pub one_of_thumbnail: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CreateViewRequest { + fn default() -> &'a CreateViewRequest { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum CreateViewRequest_oneof_one_of_thumbnail { + thumbnail(::std::string::String), +} + +impl CreateViewRequest { + pub fn new() -> CreateViewRequest { + ::std::default::Default::default() + } + + // string belong_to_id = 1; + + + 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 = 2; + + + 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 = 3; + + + 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()) + } + + // string thumbnail = 4; + + + pub fn get_thumbnail(&self) -> &str { + match self.one_of_thumbnail { + ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v)) => v, + _ => "", + } + } + pub fn clear_thumbnail(&mut self) { + self.one_of_thumbnail = ::std::option::Option::None; + } + + pub fn has_thumbnail(&self) -> bool { + match self.one_of_thumbnail { + ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_thumbnail(&mut self, v: ::std::string::String) { + self.one_of_thumbnail = ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(v)) + } + + // Mutable pointer to the field. + pub fn mut_thumbnail(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(_)) = self.one_of_thumbnail { + } else { + self.one_of_thumbnail = ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(::std::string::String::new())); + } + match self.one_of_thumbnail { + ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_thumbnail(&mut self) -> ::std::string::String { + if self.has_thumbnail() { + match self.one_of_thumbnail.take() { + ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } + + // .ViewType view_type = 5; + + + pub fn get_view_type(&self) -> ViewType { + self.view_type + } + pub fn clear_view_type(&mut self) { + self.view_type = ViewType::Blank; + } + + // Param is passed by value, moved + pub fn set_view_type(&mut self, v: ViewType) { + self.view_type = v; + } +} + +impl ::protobuf::Message for CreateViewRequest { + 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.belong_to_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?; + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_thumbnail = ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(is.read_string()?)); + }, + 5 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.view_type, 5, &mut self.unknown_fields)? + }, + _ => { + ::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.belong_to_id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.belong_to_id); + } + if !self.name.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.name); + } + if !self.desc.is_empty() { + my_size += ::protobuf::rt::string_size(3, &self.desc); + } + if self.view_type != ViewType::Blank { + my_size += ::protobuf::rt::enum_size(5, self.view_type); + } + if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail { + match v { + &CreateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v) => { + my_size += ::protobuf::rt::string_size(4, &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.belong_to_id.is_empty() { + os.write_string(1, &self.belong_to_id)?; + } + if !self.name.is_empty() { + os.write_string(2, &self.name)?; + } + if !self.desc.is_empty() { + os.write_string(3, &self.desc)?; + } + if self.view_type != ViewType::Blank { + os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.view_type))?; + } + if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail { + match v { + &CreateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v) => { + os.write_string(4, 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CreateViewRequest { + CreateViewRequest::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>( + "belong_to_id", + |m: &CreateViewRequest| { &m.belong_to_id }, + |m: &mut CreateViewRequest| { &mut m.belong_to_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "name", + |m: &CreateViewRequest| { &m.name }, + |m: &mut CreateViewRequest| { &mut m.name }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "desc", + |m: &CreateViewRequest| { &m.desc }, + |m: &mut CreateViewRequest| { &mut m.desc }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "thumbnail", + CreateViewRequest::has_thumbnail, + CreateViewRequest::get_thumbnail, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "view_type", + |m: &CreateViewRequest| { &m.view_type }, + |m: &mut CreateViewRequest| { &mut m.view_type }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "CreateViewRequest", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static CreateViewRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CreateViewRequest::new) + } +} + +impl ::protobuf::Clear for CreateViewRequest { + fn clear(&mut self) { + self.belong_to_id.clear(); + self.name.clear(); + self.desc.clear(); + self.one_of_thumbnail = ::std::option::Option::None; + self.view_type = ViewType::Blank; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for CreateViewRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for CreateViewRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct CreateViewParams { + // message fields + pub belong_to_id: ::std::string::String, + pub name: ::std::string::String, + pub desc: ::std::string::String, + pub thumbnail: ::std::string::String, + pub view_type: ViewType, + pub view_data: ::std::string::String, + pub view_id: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CreateViewParams { + fn default() -> &'a CreateViewParams { + ::default_instance() + } +} + +impl CreateViewParams { + pub fn new() -> CreateViewParams { + ::std::default::Default::default() + } + + // string belong_to_id = 1; + + + 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 = 2; + + + 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 = 3; + + + 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()) + } + + // string thumbnail = 4; + + + pub fn get_thumbnail(&self) -> &str { + &self.thumbnail + } + pub fn clear_thumbnail(&mut self) { + self.thumbnail.clear(); + } + + // Param is passed by value, moved + pub fn set_thumbnail(&mut self, v: ::std::string::String) { + self.thumbnail = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_thumbnail(&mut self) -> &mut ::std::string::String { + &mut self.thumbnail + } + + // Take field + pub fn take_thumbnail(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.thumbnail, ::std::string::String::new()) + } + + // .ViewType view_type = 5; + + + pub fn get_view_type(&self) -> ViewType { + self.view_type + } + pub fn clear_view_type(&mut self) { + self.view_type = ViewType::Blank; + } + + // Param is passed by value, moved + pub fn set_view_type(&mut self, v: ViewType) { + self.view_type = v; + } + + // string view_data = 6; + + + pub fn get_view_data(&self) -> &str { + &self.view_data + } + pub fn clear_view_data(&mut self) { + self.view_data.clear(); + } + + // Param is passed by value, moved + pub fn set_view_data(&mut self, v: ::std::string::String) { + self.view_data = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_view_data(&mut self) -> &mut ::std::string::String { + &mut self.view_data + } + + // Take field + pub fn take_view_data(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.view_data, ::std::string::String::new()) + } + + // string view_id = 7; + + + pub fn get_view_id(&self) -> &str { + &self.view_id + } + pub fn clear_view_id(&mut self) { + self.view_id.clear(); + } + + // Param is passed by value, moved + pub fn set_view_id(&mut self, v: ::std::string::String) { + self.view_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_view_id(&mut self) -> &mut ::std::string::String { + &mut self.view_id + } + + // Take field + pub fn take_view_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.view_id, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for CreateViewParams { + 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.belong_to_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?; + }, + 4 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.thumbnail)?; + }, + 5 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.view_type, 5, &mut self.unknown_fields)? + }, + 6 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.view_data)?; + }, + 7 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.view_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.belong_to_id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.belong_to_id); + } + if !self.name.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.name); + } + if !self.desc.is_empty() { + my_size += ::protobuf::rt::string_size(3, &self.desc); + } + if !self.thumbnail.is_empty() { + my_size += ::protobuf::rt::string_size(4, &self.thumbnail); + } + if self.view_type != ViewType::Blank { + my_size += ::protobuf::rt::enum_size(5, self.view_type); + } + if !self.view_data.is_empty() { + my_size += ::protobuf::rt::string_size(6, &self.view_data); + } + if !self.view_id.is_empty() { + my_size += ::protobuf::rt::string_size(7, &self.view_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.belong_to_id.is_empty() { + os.write_string(1, &self.belong_to_id)?; + } + if !self.name.is_empty() { + os.write_string(2, &self.name)?; + } + if !self.desc.is_empty() { + os.write_string(3, &self.desc)?; + } + if !self.thumbnail.is_empty() { + os.write_string(4, &self.thumbnail)?; + } + if self.view_type != ViewType::Blank { + os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.view_type))?; + } + if !self.view_data.is_empty() { + os.write_string(6, &self.view_data)?; + } + if !self.view_id.is_empty() { + os.write_string(7, &self.view_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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CreateViewParams { + CreateViewParams::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>( + "belong_to_id", + |m: &CreateViewParams| { &m.belong_to_id }, + |m: &mut CreateViewParams| { &mut m.belong_to_id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "name", + |m: &CreateViewParams| { &m.name }, + |m: &mut CreateViewParams| { &mut m.name }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "desc", + |m: &CreateViewParams| { &m.desc }, + |m: &mut CreateViewParams| { &mut m.desc }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "thumbnail", + |m: &CreateViewParams| { &m.thumbnail }, + |m: &mut CreateViewParams| { &mut m.thumbnail }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( + "view_type", + |m: &CreateViewParams| { &m.view_type }, + |m: &mut CreateViewParams| { &mut m.view_type }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "view_data", + |m: &CreateViewParams| { &m.view_data }, + |m: &mut CreateViewParams| { &mut m.view_data }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "view_id", + |m: &CreateViewParams| { &m.view_id }, + |m: &mut CreateViewParams| { &mut m.view_id }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "CreateViewParams", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static CreateViewParams { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CreateViewParams::new) + } +} + +impl ::protobuf::Clear for CreateViewParams { + fn clear(&mut self) { + self.belong_to_id.clear(); + self.name.clear(); + self.desc.clear(); + self.thumbnail.clear(); + self.view_type = ViewType::Blank; + self.view_data.clear(); + self.view_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for CreateViewParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for CreateViewParams { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct QueryViewRequest { + // message fields + pub view_ids: ::protobuf::RepeatedField<::std::string::String>, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a QueryViewRequest { + fn default() -> &'a QueryViewRequest { + ::default_instance() + } +} + +impl QueryViewRequest { + pub fn new() -> QueryViewRequest { + ::std::default::Default::default() + } + + // repeated string view_ids = 1; + + + pub fn get_view_ids(&self) -> &[::std::string::String] { + &self.view_ids + } + pub fn clear_view_ids(&mut self) { + self.view_ids.clear(); + } + + // Param is passed by value, moved + pub fn set_view_ids(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { + self.view_ids = v; + } + + // Mutable pointer to the field. + pub fn mut_view_ids(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { + &mut self.view_ids + } + + // Take field + pub fn take_view_ids(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { + ::std::mem::replace(&mut self.view_ids, ::protobuf::RepeatedField::new()) + } +} + +impl ::protobuf::Message for QueryViewRequest { + 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.view_ids)?; + }, + _ => { + ::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.view_ids { + 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.view_ids { + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> QueryViewRequest { + QueryViewRequest::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>( + "view_ids", + |m: &QueryViewRequest| { &m.view_ids }, + |m: &mut QueryViewRequest| { &mut m.view_ids }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "QueryViewRequest", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static QueryViewRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(QueryViewRequest::new) + } +} + +impl ::protobuf::Clear for QueryViewRequest { + fn clear(&mut self) { + self.view_ids.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for QueryViewRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for QueryViewRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct ViewId { + // message fields + pub view_id: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ViewId { + fn default() -> &'a ViewId { + ::default_instance() + } +} + +impl ViewId { + pub fn new() -> ViewId { + ::std::default::Default::default() + } + + // string view_id = 1; + + + pub fn get_view_id(&self) -> &str { + &self.view_id + } + pub fn clear_view_id(&mut self) { + self.view_id.clear(); + } + + // Param is passed by value, moved + pub fn set_view_id(&mut self, v: ::std::string::String) { + self.view_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_view_id(&mut self) -> &mut ::std::string::String { + &mut self.view_id + } + + // Take field + pub fn take_view_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.view_id, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for ViewId { + 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.view_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.view_id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.view_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.view_id.is_empty() { + os.write_string(1, &self.view_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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ViewId { + ViewId::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>( + "view_id", + |m: &ViewId| { &m.view_id }, + |m: &mut ViewId| { &mut m.view_id }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "ViewId", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static ViewId { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ViewId::new) + } +} + +impl ::protobuf::Clear for ViewId { + fn clear(&mut self) { + self.view_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for ViewId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for ViewId { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[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 { + ::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) -> ::std::boxed::Box { + 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", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static RepeatedViewId { + static instance: ::protobuf::rt::LazyV2 = ::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 UpdateViewRequest { + // message fields + pub view_id: ::std::string::String, + // message oneof groups + pub one_of_name: ::std::option::Option, + pub one_of_desc: ::std::option::Option, + pub one_of_thumbnail: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UpdateViewRequest { + fn default() -> &'a UpdateViewRequest { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateViewRequest_oneof_one_of_name { + name(::std::string::String), +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateViewRequest_oneof_one_of_desc { + desc(::std::string::String), +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateViewRequest_oneof_one_of_thumbnail { + thumbnail(::std::string::String), +} + +impl UpdateViewRequest { + pub fn new() -> UpdateViewRequest { + ::std::default::Default::default() + } + + // string view_id = 1; + + + pub fn get_view_id(&self) -> &str { + &self.view_id + } + pub fn clear_view_id(&mut self) { + self.view_id.clear(); + } + + // Param is passed by value, moved + pub fn set_view_id(&mut self, v: ::std::string::String) { + self.view_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_view_id(&mut self) -> &mut ::std::string::String { + &mut self.view_id + } + + // Take field + pub fn take_view_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.view_id, ::std::string::String::new()) + } + + // string name = 2; + + + pub fn get_name(&self) -> &str { + match self.one_of_name { + ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(ref v)) => v, + _ => "", + } + } + pub fn clear_name(&mut self) { + self.one_of_name = ::std::option::Option::None; + } + + pub fn has_name(&self) -> bool { + match self.one_of_name { + ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_name(&mut self, v: ::std::string::String) { + self.one_of_name = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(v)) + } + + // Mutable pointer to the field. + pub fn mut_name(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(_)) = self.one_of_name { + } else { + self.one_of_name = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(::std::string::String::new())); + } + match self.one_of_name { + ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_name(&mut self) -> ::std::string::String { + if self.has_name() { + match self.one_of_name.take() { + ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } + + // string desc = 3; + + + pub fn get_desc(&self) -> &str { + match self.one_of_desc { + ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(ref v)) => v, + _ => "", + } + } + pub fn clear_desc(&mut self) { + self.one_of_desc = ::std::option::Option::None; + } + + pub fn has_desc(&self) -> bool { + match self.one_of_desc { + ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_desc(&mut self, v: ::std::string::String) { + self.one_of_desc = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(v)) + } + + // Mutable pointer to the field. + pub fn mut_desc(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(_)) = self.one_of_desc { + } else { + self.one_of_desc = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(::std::string::String::new())); + } + match self.one_of_desc { + ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_desc(&mut self) -> ::std::string::String { + if self.has_desc() { + match self.one_of_desc.take() { + ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } + + // string thumbnail = 4; + + + pub fn get_thumbnail(&self) -> &str { + match self.one_of_thumbnail { + ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v)) => v, + _ => "", + } + } + pub fn clear_thumbnail(&mut self) { + self.one_of_thumbnail = ::std::option::Option::None; + } + + pub fn has_thumbnail(&self) -> bool { + match self.one_of_thumbnail { + ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_thumbnail(&mut self, v: ::std::string::String) { + self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(v)) + } + + // Mutable pointer to the field. + pub fn mut_thumbnail(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(_)) = self.one_of_thumbnail { + } else { + self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(::std::string::String::new())); + } + match self.one_of_thumbnail { + ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_thumbnail(&mut self) -> ::std::string::String { + if self.has_thumbnail() { + match self.one_of_thumbnail.take() { + ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } +} + +impl ::protobuf::Message for UpdateViewRequest { + 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.view_id)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_name = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(is.read_string()?)); + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_desc = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(is.read_string()?)); + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(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.view_id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.view_id); + } + if let ::std::option::Option::Some(ref v) = self.one_of_name { + match v { + &UpdateViewRequest_oneof_one_of_name::name(ref v) => { + my_size += ::protobuf::rt::string_size(2, &v); + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_desc { + match v { + &UpdateViewRequest_oneof_one_of_desc::desc(ref v) => { + my_size += ::protobuf::rt::string_size(3, &v); + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail { + match v { + &UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v) => { + my_size += ::protobuf::rt::string_size(4, &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.view_id.is_empty() { + os.write_string(1, &self.view_id)?; + } + if let ::std::option::Option::Some(ref v) = self.one_of_name { + match v { + &UpdateViewRequest_oneof_one_of_name::name(ref v) => { + os.write_string(2, v)?; + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_desc { + match v { + &UpdateViewRequest_oneof_one_of_desc::desc(ref v) => { + os.write_string(3, v)?; + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail { + match v { + &UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v) => { + os.write_string(4, 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UpdateViewRequest { + UpdateViewRequest::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>( + "view_id", + |m: &UpdateViewRequest| { &m.view_id }, + |m: &mut UpdateViewRequest| { &mut m.view_id }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "name", + UpdateViewRequest::has_name, + UpdateViewRequest::get_name, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "desc", + UpdateViewRequest::has_desc, + UpdateViewRequest::get_desc, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "thumbnail", + UpdateViewRequest::has_thumbnail, + UpdateViewRequest::get_thumbnail, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "UpdateViewRequest", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static UpdateViewRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(UpdateViewRequest::new) + } +} + +impl ::protobuf::Clear for UpdateViewRequest { + fn clear(&mut self) { + self.view_id.clear(); + self.one_of_name = ::std::option::Option::None; + self.one_of_desc = ::std::option::Option::None; + self.one_of_thumbnail = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for UpdateViewRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for UpdateViewRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct UpdateViewParams { + // message fields + pub view_id: ::std::string::String, + // message oneof groups + pub one_of_name: ::std::option::Option, + pub one_of_desc: ::std::option::Option, + pub one_of_thumbnail: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UpdateViewParams { + fn default() -> &'a UpdateViewParams { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateViewParams_oneof_one_of_name { + name(::std::string::String), +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateViewParams_oneof_one_of_desc { + desc(::std::string::String), +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateViewParams_oneof_one_of_thumbnail { + thumbnail(::std::string::String), +} + +impl UpdateViewParams { + pub fn new() -> UpdateViewParams { + ::std::default::Default::default() + } + + // string view_id = 1; + + + pub fn get_view_id(&self) -> &str { + &self.view_id + } + pub fn clear_view_id(&mut self) { + self.view_id.clear(); + } + + // Param is passed by value, moved + pub fn set_view_id(&mut self, v: ::std::string::String) { + self.view_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_view_id(&mut self) -> &mut ::std::string::String { + &mut self.view_id + } + + // Take field + pub fn take_view_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.view_id, ::std::string::String::new()) + } + + // string name = 2; + + + pub fn get_name(&self) -> &str { + match self.one_of_name { + ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(ref v)) => v, + _ => "", + } + } + pub fn clear_name(&mut self) { + self.one_of_name = ::std::option::Option::None; + } + + pub fn has_name(&self) -> bool { + match self.one_of_name { + ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_name(&mut self, v: ::std::string::String) { + self.one_of_name = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(v)) + } + + // Mutable pointer to the field. + pub fn mut_name(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(_)) = self.one_of_name { + } else { + self.one_of_name = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(::std::string::String::new())); + } + match self.one_of_name { + ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_name(&mut self) -> ::std::string::String { + if self.has_name() { + match self.one_of_name.take() { + ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } + + // string desc = 3; + + + pub fn get_desc(&self) -> &str { + match self.one_of_desc { + ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(ref v)) => v, + _ => "", + } + } + pub fn clear_desc(&mut self) { + self.one_of_desc = ::std::option::Option::None; + } + + pub fn has_desc(&self) -> bool { + match self.one_of_desc { + ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_desc(&mut self, v: ::std::string::String) { + self.one_of_desc = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(v)) + } + + // Mutable pointer to the field. + pub fn mut_desc(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(_)) = self.one_of_desc { + } else { + self.one_of_desc = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(::std::string::String::new())); + } + match self.one_of_desc { + ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_desc(&mut self) -> ::std::string::String { + if self.has_desc() { + match self.one_of_desc.take() { + ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } + + // string thumbnail = 4; + + + pub fn get_thumbnail(&self) -> &str { + match self.one_of_thumbnail { + ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref v)) => v, + _ => "", + } + } + pub fn clear_thumbnail(&mut self) { + self.one_of_thumbnail = ::std::option::Option::None; + } + + pub fn has_thumbnail(&self) -> bool { + match self.one_of_thumbnail { + ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_thumbnail(&mut self, v: ::std::string::String) { + self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(v)) + } + + // Mutable pointer to the field. + pub fn mut_thumbnail(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(_)) = self.one_of_thumbnail { + } else { + self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(::std::string::String::new())); + } + match self.one_of_thumbnail { + ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_thumbnail(&mut self) -> ::std::string::String { + if self.has_thumbnail() { + match self.one_of_thumbnail.take() { + ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } +} + +impl ::protobuf::Message for UpdateViewParams { + 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.view_id)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_name = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(is.read_string()?)); + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_desc = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(is.read_string()?)); + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(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.view_id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.view_id); + } + if let ::std::option::Option::Some(ref v) = self.one_of_name { + match v { + &UpdateViewParams_oneof_one_of_name::name(ref v) => { + my_size += ::protobuf::rt::string_size(2, &v); + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_desc { + match v { + &UpdateViewParams_oneof_one_of_desc::desc(ref v) => { + my_size += ::protobuf::rt::string_size(3, &v); + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail { + match v { + &UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref v) => { + my_size += ::protobuf::rt::string_size(4, &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.view_id.is_empty() { + os.write_string(1, &self.view_id)?; + } + if let ::std::option::Option::Some(ref v) = self.one_of_name { + match v { + &UpdateViewParams_oneof_one_of_name::name(ref v) => { + os.write_string(2, v)?; + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_desc { + match v { + &UpdateViewParams_oneof_one_of_desc::desc(ref v) => { + os.write_string(3, v)?; + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail { + match v { + &UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref v) => { + os.write_string(4, 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UpdateViewParams { + UpdateViewParams::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>( + "view_id", + |m: &UpdateViewParams| { &m.view_id }, + |m: &mut UpdateViewParams| { &mut m.view_id }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "name", + UpdateViewParams::has_name, + UpdateViewParams::get_name, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "desc", + UpdateViewParams::has_desc, + UpdateViewParams::get_desc, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "thumbnail", + UpdateViewParams::has_thumbnail, + UpdateViewParams::get_thumbnail, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "UpdateViewParams", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static UpdateViewParams { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(UpdateViewParams::new) + } +} + +impl ::protobuf::Clear for UpdateViewParams { + fn clear(&mut self) { + self.view_id.clear(); + self.one_of_name = ::std::option::Option::None; + self.one_of_desc = ::std::option::Option::None; + self.one_of_thumbnail = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for UpdateViewParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for UpdateViewParams { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum ViewType { + Blank = 0, + Doc = 1, +} + +impl ::protobuf::ProtobufEnum for ViewType { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(ViewType::Blank), + 1 => ::std::option::Option::Some(ViewType::Doc), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [ViewType] = &[ + ViewType::Blank, + ViewType::Doc, + ]; + values + } + + fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; + descriptor.get(|| { + ::protobuf::reflect::EnumDescriptor::new_pb_name::("ViewType", file_descriptor_proto()) + }) + } +} + +impl ::std::marker::Copy for ViewType { +} + +impl ::std::default::Default for ViewType { + fn default() -> Self { + ViewType::Blank + } +} + +impl ::protobuf::reflect::ProtobufValue for ViewType { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +static file_descriptor_proto_data: &'static [u8] = b"\ + \n\nview.proto\"\x97\x02\n\x04View\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\tview_type\x18\x05\x20\x01(\x0e2\t.ViewTypeR\x08view\ + Type\x12\x18\n\x07version\x18\x06\x20\x01(\x03R\x07version\x12-\n\nbelon\ + gings\x18\x07\x20\x01(\x0b2\r.RepeatedViewR\nbelongings\x12#\n\rmodified\ + _time\x18\x08\x20\x01(\x03R\x0cmodifiedTime\x12\x1f\n\x0bcreate_time\x18\ + \t\x20\x01(\x03R\ncreateTime\"+\n\x0cRepeatedView\x12\x1b\n\x05items\x18\ + \x01\x20\x03(\x0b2\x05.ViewR\x05items\"\xb9\x01\n\x11CreateViewRequest\ + \x12\x20\n\x0cbelong_to_id\x18\x01\x20\x01(\tR\nbelongToId\x12\x12\n\x04\ + name\x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\ + \x04desc\x12\x1e\n\tthumbnail\x18\x04\x20\x01(\tH\0R\tthumbnail\x12&\n\t\ + view_type\x18\x05\x20\x01(\x0e2\t.ViewTypeR\x08viewTypeB\x12\n\x10one_of\ + _thumbnail\"\xd8\x01\n\x10CreateViewParams\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\x1c\n\tthumbnail\ + \x18\x04\x20\x01(\tR\tthumbnail\x12&\n\tview_type\x18\x05\x20\x01(\x0e2\ + \t.ViewTypeR\x08viewType\x12\x1b\n\tview_data\x18\x06\x20\x01(\tR\x08vie\ + wData\x12\x17\n\x07view_id\x18\x07\x20\x01(\tR\x06viewId\"-\n\x10QueryVi\ + ewRequest\x12\x19\n\x08view_ids\x18\x01\x20\x03(\tR\x07viewIds\"!\n\x06V\ + iewId\x12\x17\n\x07view_id\x18\x01\x20\x01(\tR\x06viewId\"&\n\x0eRepeate\ + dViewId\x12\x14\n\x05items\x18\x01\x20\x03(\tR\x05items\"\xaa\x01\n\x11U\ + pdateViewRequest\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_thu\ + mbnail\"\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_desc\ + B\x12\n\x10one_of_thumbnail*\x1e\n\x08ViewType\x12\t\n\x05Blank\x10\0\ + \x12\x07\n\x03Doc\x10\x01J\xd2\x12\n\x06\x12\x04\0\08\x01\n\x08\n\x01\ + \x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x0c\x01\n\n\n\x03\x04\ + \0\x01\x12\x03\x02\x08\x0c\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x12\n\ + \x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\ + \x12\x03\x03\x0b\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x10\x11\n\x0b\ + \n\x04\x04\0\x02\x01\x12\x03\x04\x04\x1c\n\x0c\n\x05\x04\0\x02\x01\x05\ + \x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x04\x0b\x17\n\ + \x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x04\x1a\x1b\n\x0b\n\x04\x04\0\x02\ + \x02\x12\x03\x05\x04\x14\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x05\x04\n\ + \n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x05\x0b\x0f\n\x0c\n\x05\x04\0\x02\ + \x02\x03\x12\x03\x05\x12\x13\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x06\x04\ + \x14\n\x0c\n\x05\x04\0\x02\x03\x05\x12\x03\x06\x04\n\n\x0c\n\x05\x04\0\ + \x02\x03\x01\x12\x03\x06\x0b\x0f\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\ + \x06\x12\x13\n\x0b\n\x04\x04\0\x02\x04\x12\x03\x07\x04\x1b\n\x0c\n\x05\ + \x04\0\x02\x04\x06\x12\x03\x07\x04\x0c\n\x0c\n\x05\x04\0\x02\x04\x01\x12\ + \x03\x07\r\x16\n\x0c\n\x05\x04\0\x02\x04\x03\x12\x03\x07\x19\x1a\n\x0b\n\ + \x04\x04\0\x02\x05\x12\x03\x08\x04\x16\n\x0c\n\x05\x04\0\x02\x05\x05\x12\ + \x03\x08\x04\t\n\x0c\n\x05\x04\0\x02\x05\x01\x12\x03\x08\n\x11\n\x0c\n\ + \x05\x04\0\x02\x05\x03\x12\x03\x08\x14\x15\n\x0b\n\x04\x04\0\x02\x06\x12\ + \x03\t\x04\x20\n\x0c\n\x05\x04\0\x02\x06\x06\x12\x03\t\x04\x10\n\x0c\n\ + \x05\x04\0\x02\x06\x01\x12\x03\t\x11\x1b\n\x0c\n\x05\x04\0\x02\x06\x03\ + \x12\x03\t\x1e\x1f\n\x0b\n\x04\x04\0\x02\x07\x12\x03\n\x04\x1c\n\x0c\n\ + \x05\x04\0\x02\x07\x05\x12\x03\n\x04\t\n\x0c\n\x05\x04\0\x02\x07\x01\x12\ + \x03\n\n\x17\n\x0c\n\x05\x04\0\x02\x07\x03\x12\x03\n\x1a\x1b\n\x0b\n\x04\ + \x04\0\x02\x08\x12\x03\x0b\x04\x1a\n\x0c\n\x05\x04\0\x02\x08\x05\x12\x03\ + \x0b\x04\t\n\x0c\n\x05\x04\0\x02\x08\x01\x12\x03\x0b\n\x15\n\x0c\n\x05\ + \x04\0\x02\x08\x03\x12\x03\x0b\x18\x19\n\n\n\x02\x04\x01\x12\x04\r\0\x0f\ + \x01\n\n\n\x03\x04\x01\x01\x12\x03\r\x08\x14\n\x0b\n\x04\x04\x01\x02\0\ + \x12\x03\x0e\x04\x1c\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x0e\x04\x0c\n\ + \x0c\n\x05\x04\x01\x02\0\x06\x12\x03\x0e\r\x11\n\x0c\n\x05\x04\x01\x02\0\ + \x01\x12\x03\x0e\x12\x17\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x0e\x1a\ + \x1b\n\n\n\x02\x04\x02\x12\x04\x10\0\x16\x01\n\n\n\x03\x04\x02\x01\x12\ + \x03\x10\x08\x19\n\x0b\n\x04\x04\x02\x02\0\x12\x03\x11\x04\x1c\n\x0c\n\ + \x05\x04\x02\x02\0\x05\x12\x03\x11\x04\n\n\x0c\n\x05\x04\x02\x02\0\x01\ + \x12\x03\x11\x0b\x17\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x11\x1a\x1b\n\ + \x0b\n\x04\x04\x02\x02\x01\x12\x03\x12\x04\x14\n\x0c\n\x05\x04\x02\x02\ + \x01\x05\x12\x03\x12\x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\x12\ + \x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\x03\x12\x12\x13\n\x0b\n\x04\ + \x04\x02\x02\x02\x12\x03\x13\x04\x14\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\ + \x03\x13\x04\n\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\x13\x0b\x0f\n\x0c\ + \n\x05\x04\x02\x02\x02\x03\x12\x03\x13\x12\x13\n\x0b\n\x04\x04\x02\x08\0\ + \x12\x03\x14\x044\n\x0c\n\x05\x04\x02\x08\0\x01\x12\x03\x14\n\x1a\n\x0b\ + \n\x04\x04\x02\x02\x03\x12\x03\x14\x1d2\n\x0c\n\x05\x04\x02\x02\x03\x05\ + \x12\x03\x14\x1d#\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\x14$-\n\x0c\n\ + \x05\x04\x02\x02\x03\x03\x12\x03\x1401\n\x0b\n\x04\x04\x02\x02\x04\x12\ + \x03\x15\x04\x1b\n\x0c\n\x05\x04\x02\x02\x04\x06\x12\x03\x15\x04\x0c\n\ + \x0c\n\x05\x04\x02\x02\x04\x01\x12\x03\x15\r\x16\n\x0c\n\x05\x04\x02\x02\ + \x04\x03\x12\x03\x15\x19\x1a\n\n\n\x02\x04\x03\x12\x04\x17\0\x1f\x01\n\n\ + \n\x03\x04\x03\x01\x12\x03\x17\x08\x18\n\x0b\n\x04\x04\x03\x02\0\x12\x03\ + \x18\x04\x1c\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x18\x04\n\n\x0c\n\x05\ + \x04\x03\x02\0\x01\x12\x03\x18\x0b\x17\n\x0c\n\x05\x04\x03\x02\0\x03\x12\ + \x03\x18\x1a\x1b\n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x19\x04\x14\n\x0c\n\ + \x05\x04\x03\x02\x01\x05\x12\x03\x19\x04\n\n\x0c\n\x05\x04\x03\x02\x01\ + \x01\x12\x03\x19\x0b\x0f\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\x03\x19\x12\ + \x13\n\x0b\n\x04\x04\x03\x02\x02\x12\x03\x1a\x04\x14\n\x0c\n\x05\x04\x03\ + \x02\x02\x05\x12\x03\x1a\x04\n\n\x0c\n\x05\x04\x03\x02\x02\x01\x12\x03\ + \x1a\x0b\x0f\n\x0c\n\x05\x04\x03\x02\x02\x03\x12\x03\x1a\x12\x13\n\x0b\n\ + \x04\x04\x03\x02\x03\x12\x03\x1b\x04\x19\n\x0c\n\x05\x04\x03\x02\x03\x05\ + \x12\x03\x1b\x04\n\n\x0c\n\x05\x04\x03\x02\x03\x01\x12\x03\x1b\x0b\x14\n\ + \x0c\n\x05\x04\x03\x02\x03\x03\x12\x03\x1b\x17\x18\n\x0b\n\x04\x04\x03\ + \x02\x04\x12\x03\x1c\x04\x1b\n\x0c\n\x05\x04\x03\x02\x04\x06\x12\x03\x1c\ + \x04\x0c\n\x0c\n\x05\x04\x03\x02\x04\x01\x12\x03\x1c\r\x16\n\x0c\n\x05\ + \x04\x03\x02\x04\x03\x12\x03\x1c\x19\x1a\n\x0b\n\x04\x04\x03\x02\x05\x12\ + \x03\x1d\x04\x19\n\x0c\n\x05\x04\x03\x02\x05\x05\x12\x03\x1d\x04\n\n\x0c\ + \n\x05\x04\x03\x02\x05\x01\x12\x03\x1d\x0b\x14\n\x0c\n\x05\x04\x03\x02\ + \x05\x03\x12\x03\x1d\x17\x18\n\x0b\n\x04\x04\x03\x02\x06\x12\x03\x1e\x04\ + \x17\n\x0c\n\x05\x04\x03\x02\x06\x05\x12\x03\x1e\x04\n\n\x0c\n\x05\x04\ + \x03\x02\x06\x01\x12\x03\x1e\x0b\x12\n\x0c\n\x05\x04\x03\x02\x06\x03\x12\ + \x03\x1e\x15\x16\n\n\n\x02\x04\x04\x12\x04\x20\0\"\x01\n\n\n\x03\x04\x04\ + \x01\x12\x03\x20\x08\x18\n\x0b\n\x04\x04\x04\x02\0\x12\x03!\x04!\n\x0c\n\ + \x05\x04\x04\x02\0\x04\x12\x03!\x04\x0c\n\x0c\n\x05\x04\x04\x02\0\x05\ + \x12\x03!\r\x13\n\x0c\n\x05\x04\x04\x02\0\x01\x12\x03!\x14\x1c\n\x0c\n\ + \x05\x04\x04\x02\0\x03\x12\x03!\x1f\x20\n\n\n\x02\x04\x05\x12\x04#\0%\ + \x01\n\n\n\x03\x04\x05\x01\x12\x03#\x08\x0e\n\x0b\n\x04\x04\x05\x02\0\ + \x12\x03$\x04\x17\n\x0c\n\x05\x04\x05\x02\0\x05\x12\x03$\x04\n\n\x0c\n\ + \x05\x04\x05\x02\0\x01\x12\x03$\x0b\x12\n\x0c\n\x05\x04\x05\x02\0\x03\ + \x12\x03$\x15\x16\n\n\n\x02\x04\x06\x12\x04&\0(\x01\n\n\n\x03\x04\x06\ + \x01\x12\x03&\x08\x16\n\x0b\n\x04\x04\x06\x02\0\x12\x03'\x04\x1e\n\x0c\n\ + \x05\x04\x06\x02\0\x04\x12\x03'\x04\x0c\n\x0c\n\x05\x04\x06\x02\0\x05\ + \x12\x03'\r\x13\n\x0c\n\x05\x04\x06\x02\0\x01\x12\x03'\x14\x19\n\x0c\n\ + \x05\x04\x06\x02\0\x03\x12\x03'\x1c\x1d\n\n\n\x02\x04\x07\x12\x04)\0.\ + \x01\n\n\n\x03\x04\x07\x01\x12\x03)\x08\x19\n\x0b\n\x04\x04\x07\x02\0\ + \x12\x03*\x04\x17\n\x0c\n\x05\x04\x07\x02\0\x05\x12\x03*\x04\n\n\x0c\n\ + \x05\x04\x07\x02\0\x01\x12\x03*\x0b\x12\n\x0c\n\x05\x04\x07\x02\0\x03\ + \x12\x03*\x15\x16\n\x0b\n\x04\x04\x07\x08\0\x12\x03+\x04*\n\x0c\n\x05\ + \x04\x07\x08\0\x01\x12\x03+\n\x15\n\x0b\n\x04\x04\x07\x02\x01\x12\x03+\ + \x18(\n\x0c\n\x05\x04\x07\x02\x01\x05\x12\x03+\x18\x1e\n\x0c\n\x05\x04\ + \x07\x02\x01\x01\x12\x03+\x1f#\n\x0c\n\x05\x04\x07\x02\x01\x03\x12\x03+&\ + '\n\x0b\n\x04\x04\x07\x08\x01\x12\x03,\x04*\n\x0c\n\x05\x04\x07\x08\x01\ + \x01\x12\x03,\n\x15\n\x0b\n\x04\x04\x07\x02\x02\x12\x03,\x18(\n\x0c\n\ + \x05\x04\x07\x02\x02\x05\x12\x03,\x18\x1e\n\x0c\n\x05\x04\x07\x02\x02\ + \x01\x12\x03,\x1f#\n\x0c\n\x05\x04\x07\x02\x02\x03\x12\x03,&'\n\x0b\n\ + \x04\x04\x07\x08\x02\x12\x03-\x044\n\x0c\n\x05\x04\x07\x08\x02\x01\x12\ + \x03-\n\x1a\n\x0b\n\x04\x04\x07\x02\x03\x12\x03-\x1d2\n\x0c\n\x05\x04\ + \x07\x02\x03\x05\x12\x03-\x1d#\n\x0c\n\x05\x04\x07\x02\x03\x01\x12\x03-$\ + -\n\x0c\n\x05\x04\x07\x02\x03\x03\x12\x03-01\n\n\n\x02\x04\x08\x12\x04/\ + \04\x01\n\n\n\x03\x04\x08\x01\x12\x03/\x08\x18\n\x0b\n\x04\x04\x08\x02\0\ + \x12\x030\x04\x17\n\x0c\n\x05\x04\x08\x02\0\x05\x12\x030\x04\n\n\x0c\n\ + \x05\x04\x08\x02\0\x01\x12\x030\x0b\x12\n\x0c\n\x05\x04\x08\x02\0\x03\ + \x12\x030\x15\x16\n\x0b\n\x04\x04\x08\x08\0\x12\x031\x04*\n\x0c\n\x05\ + \x04\x08\x08\0\x01\x12\x031\n\x15\n\x0b\n\x04\x04\x08\x02\x01\x12\x031\ + \x18(\n\x0c\n\x05\x04\x08\x02\x01\x05\x12\x031\x18\x1e\n\x0c\n\x05\x04\ + \x08\x02\x01\x01\x12\x031\x1f#\n\x0c\n\x05\x04\x08\x02\x01\x03\x12\x031&\ + '\n\x0b\n\x04\x04\x08\x08\x01\x12\x032\x04*\n\x0c\n\x05\x04\x08\x08\x01\ + \x01\x12\x032\n\x15\n\x0b\n\x04\x04\x08\x02\x02\x12\x032\x18(\n\x0c\n\ + \x05\x04\x08\x02\x02\x05\x12\x032\x18\x1e\n\x0c\n\x05\x04\x08\x02\x02\ + \x01\x12\x032\x1f#\n\x0c\n\x05\x04\x08\x02\x02\x03\x12\x032&'\n\x0b\n\ + \x04\x04\x08\x08\x02\x12\x033\x044\n\x0c\n\x05\x04\x08\x08\x02\x01\x12\ + \x033\n\x1a\n\x0b\n\x04\x04\x08\x02\x03\x12\x033\x1d2\n\x0c\n\x05\x04\ + \x08\x02\x03\x05\x12\x033\x1d#\n\x0c\n\x05\x04\x08\x02\x03\x01\x12\x033$\ + -\n\x0c\n\x05\x04\x08\x02\x03\x03\x12\x03301\n\n\n\x02\x05\0\x12\x045\08\ + \x01\n\n\n\x03\x05\0\x01\x12\x035\x05\r\n\x0b\n\x04\x05\0\x02\0\x12\x036\ + \x04\x0e\n\x0c\n\x05\x05\0\x02\0\x01\x12\x036\x04\t\n\x0c\n\x05\x05\0\ + \x02\0\x02\x12\x036\x0c\r\n\x0b\n\x04\x05\0\x02\x01\x12\x037\x04\x0c\n\ + \x0c\n\x05\x05\0\x02\x01\x01\x12\x037\x04\x07\n\x0c\n\x05\x05\0\x02\x01\ + \x02\x12\x037\n\x0bb\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-core-data-model/src/protobuf/model/view_create.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/view_create.rs deleted file mode 100644 index 8519e7d46b..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/model/view_create.rs +++ /dev/null @@ -1,1582 +0,0 @@ -// This file is generated by rust-protobuf 2.22.1. 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_create.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; - -#[derive(PartialEq,Clone,Default)] -pub struct CreateViewRequest { - // message fields - pub belong_to_id: ::std::string::String, - pub name: ::std::string::String, - pub desc: ::std::string::String, - pub view_type: ViewType, - // message oneof groups - pub one_of_thumbnail: ::std::option::Option, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a CreateViewRequest { - fn default() -> &'a CreateViewRequest { - ::default_instance() - } -} - -#[derive(Clone,PartialEq,Debug)] -pub enum CreateViewRequest_oneof_one_of_thumbnail { - thumbnail(::std::string::String), -} - -impl CreateViewRequest { - pub fn new() -> CreateViewRequest { - ::std::default::Default::default() - } - - // string belong_to_id = 1; - - - 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 = 2; - - - 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 = 3; - - - 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()) - } - - // string thumbnail = 4; - - - pub fn get_thumbnail(&self) -> &str { - match self.one_of_thumbnail { - ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v)) => v, - _ => "", - } - } - pub fn clear_thumbnail(&mut self) { - self.one_of_thumbnail = ::std::option::Option::None; - } - - pub fn has_thumbnail(&self) -> bool { - match self.one_of_thumbnail { - ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_thumbnail(&mut self, v: ::std::string::String) { - self.one_of_thumbnail = ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(v)) - } - - // Mutable pointer to the field. - pub fn mut_thumbnail(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(_)) = self.one_of_thumbnail { - } else { - self.one_of_thumbnail = ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(::std::string::String::new())); - } - match self.one_of_thumbnail { - ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_thumbnail(&mut self) -> ::std::string::String { - if self.has_thumbnail() { - match self.one_of_thumbnail.take() { - ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } - - // .ViewType view_type = 5; - - - pub fn get_view_type(&self) -> ViewType { - self.view_type - } - pub fn clear_view_type(&mut self) { - self.view_type = ViewType::Blank; - } - - // Param is passed by value, moved - pub fn set_view_type(&mut self, v: ViewType) { - self.view_type = v; - } -} - -impl ::protobuf::Message for CreateViewRequest { - 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.belong_to_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?; - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_thumbnail = ::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(is.read_string()?)); - }, - 5 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.view_type, 5, &mut self.unknown_fields)? - }, - _ => { - ::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.belong_to_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.belong_to_id); - } - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.name); - } - if !self.desc.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.desc); - } - if self.view_type != ViewType::Blank { - my_size += ::protobuf::rt::enum_size(5, self.view_type); - } - if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail { - match v { - &CreateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v) => { - my_size += ::protobuf::rt::string_size(4, &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.belong_to_id.is_empty() { - os.write_string(1, &self.belong_to_id)?; - } - if !self.name.is_empty() { - os.write_string(2, &self.name)?; - } - if !self.desc.is_empty() { - os.write_string(3, &self.desc)?; - } - if self.view_type != ViewType::Blank { - os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.view_type))?; - } - if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail { - match v { - &CreateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v) => { - os.write_string(4, 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> CreateViewRequest { - CreateViewRequest::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>( - "belong_to_id", - |m: &CreateViewRequest| { &m.belong_to_id }, - |m: &mut CreateViewRequest| { &mut m.belong_to_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &CreateViewRequest| { &m.name }, - |m: &mut CreateViewRequest| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "desc", - |m: &CreateViewRequest| { &m.desc }, - |m: &mut CreateViewRequest| { &mut m.desc }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "thumbnail", - CreateViewRequest::has_thumbnail, - CreateViewRequest::get_thumbnail, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "view_type", - |m: &CreateViewRequest| { &m.view_type }, - |m: &mut CreateViewRequest| { &mut m.view_type }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "CreateViewRequest", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static CreateViewRequest { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(CreateViewRequest::new) - } -} - -impl ::protobuf::Clear for CreateViewRequest { - fn clear(&mut self) { - self.belong_to_id.clear(); - self.name.clear(); - self.desc.clear(); - self.one_of_thumbnail = ::std::option::Option::None; - self.view_type = ViewType::Blank; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for CreateViewRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CreateViewRequest { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct CreateViewParams { - // message fields - pub belong_to_id: ::std::string::String, - pub name: ::std::string::String, - pub desc: ::std::string::String, - pub thumbnail: ::std::string::String, - pub view_type: ViewType, - pub view_data: ::std::string::String, - pub view_id: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a CreateViewParams { - fn default() -> &'a CreateViewParams { - ::default_instance() - } -} - -impl CreateViewParams { - pub fn new() -> CreateViewParams { - ::std::default::Default::default() - } - - // string belong_to_id = 1; - - - 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 = 2; - - - 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 = 3; - - - 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()) - } - - // string thumbnail = 4; - - - pub fn get_thumbnail(&self) -> &str { - &self.thumbnail - } - pub fn clear_thumbnail(&mut self) { - self.thumbnail.clear(); - } - - // Param is passed by value, moved - pub fn set_thumbnail(&mut self, v: ::std::string::String) { - self.thumbnail = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_thumbnail(&mut self) -> &mut ::std::string::String { - &mut self.thumbnail - } - - // Take field - pub fn take_thumbnail(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.thumbnail, ::std::string::String::new()) - } - - // .ViewType view_type = 5; - - - pub fn get_view_type(&self) -> ViewType { - self.view_type - } - pub fn clear_view_type(&mut self) { - self.view_type = ViewType::Blank; - } - - // Param is passed by value, moved - pub fn set_view_type(&mut self, v: ViewType) { - self.view_type = v; - } - - // string view_data = 6; - - - pub fn get_view_data(&self) -> &str { - &self.view_data - } - pub fn clear_view_data(&mut self) { - self.view_data.clear(); - } - - // Param is passed by value, moved - pub fn set_view_data(&mut self, v: ::std::string::String) { - self.view_data = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_view_data(&mut self) -> &mut ::std::string::String { - &mut self.view_data - } - - // Take field - pub fn take_view_data(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.view_data, ::std::string::String::new()) - } - - // string view_id = 7; - - - pub fn get_view_id(&self) -> &str { - &self.view_id - } - pub fn clear_view_id(&mut self) { - self.view_id.clear(); - } - - // Param is passed by value, moved - pub fn set_view_id(&mut self, v: ::std::string::String) { - self.view_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_view_id(&mut self) -> &mut ::std::string::String { - &mut self.view_id - } - - // Take field - pub fn take_view_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.view_id, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for CreateViewParams { - 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.belong_to_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.thumbnail)?; - }, - 5 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.view_type, 5, &mut self.unknown_fields)? - }, - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.view_data)?; - }, - 7 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.view_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.belong_to_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.belong_to_id); - } - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.name); - } - if !self.desc.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.desc); - } - if !self.thumbnail.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.thumbnail); - } - if self.view_type != ViewType::Blank { - my_size += ::protobuf::rt::enum_size(5, self.view_type); - } - if !self.view_data.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.view_data); - } - if !self.view_id.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.view_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.belong_to_id.is_empty() { - os.write_string(1, &self.belong_to_id)?; - } - if !self.name.is_empty() { - os.write_string(2, &self.name)?; - } - if !self.desc.is_empty() { - os.write_string(3, &self.desc)?; - } - if !self.thumbnail.is_empty() { - os.write_string(4, &self.thumbnail)?; - } - if self.view_type != ViewType::Blank { - os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.view_type))?; - } - if !self.view_data.is_empty() { - os.write_string(6, &self.view_data)?; - } - if !self.view_id.is_empty() { - os.write_string(7, &self.view_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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> CreateViewParams { - CreateViewParams::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>( - "belong_to_id", - |m: &CreateViewParams| { &m.belong_to_id }, - |m: &mut CreateViewParams| { &mut m.belong_to_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &CreateViewParams| { &m.name }, - |m: &mut CreateViewParams| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "desc", - |m: &CreateViewParams| { &m.desc }, - |m: &mut CreateViewParams| { &mut m.desc }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "thumbnail", - |m: &CreateViewParams| { &m.thumbnail }, - |m: &mut CreateViewParams| { &mut m.thumbnail }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "view_type", - |m: &CreateViewParams| { &m.view_type }, - |m: &mut CreateViewParams| { &mut m.view_type }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "view_data", - |m: &CreateViewParams| { &m.view_data }, - |m: &mut CreateViewParams| { &mut m.view_data }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "view_id", - |m: &CreateViewParams| { &m.view_id }, - |m: &mut CreateViewParams| { &mut m.view_id }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "CreateViewParams", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static CreateViewParams { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(CreateViewParams::new) - } -} - -impl ::protobuf::Clear for CreateViewParams { - fn clear(&mut self) { - self.belong_to_id.clear(); - self.name.clear(); - self.desc.clear(); - self.thumbnail.clear(); - self.view_type = ViewType::Blank; - self.view_data.clear(); - self.view_id.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for CreateViewParams { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CreateViewParams { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct View { - // 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 view_type: ViewType, - pub version: i64, - pub belongings: ::protobuf::SingularPtrField, - pub modified_time: i64, - pub create_time: i64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a View { - fn default() -> &'a View { - ::default_instance() - } -} - -impl View { - pub fn new() -> View { - ::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()) - } - - // .ViewType view_type = 5; - - - pub fn get_view_type(&self) -> ViewType { - self.view_type - } - pub fn clear_view_type(&mut self) { - self.view_type = ViewType::Blank; - } - - // Param is passed by value, moved - pub fn set_view_type(&mut self, v: ViewType) { - self.view_type = v; - } - - // int64 version = 6; - - - pub fn get_version(&self) -> i64 { - self.version - } - pub fn clear_version(&mut self) { - self.version = 0; - } - - // Param is passed by value, moved - pub fn set_version(&mut self, v: i64) { - self.version = v; - } - - // .RepeatedView belongings = 7; - - - pub fn get_belongings(&self) -> &RepeatedView { - self.belongings.as_ref().unwrap_or_else(|| ::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()) - } - - // int64 modified_time = 8; - - - pub fn get_modified_time(&self) -> i64 { - self.modified_time - } - pub fn clear_modified_time(&mut self) { - self.modified_time = 0; - } - - // Param is passed by value, moved - pub fn set_modified_time(&mut self, v: i64) { - self.modified_time = v; - } - - // int64 create_time = 9; - - - pub fn get_create_time(&self) -> i64 { - self.create_time - } - pub fn clear_create_time(&mut self) { - self.create_time = 0; - } - - // Param is passed by value, moved - pub fn set_create_time(&mut self, v: i64) { - self.create_time = v; - } -} - -impl ::protobuf::Message for View { - fn is_initialized(&self) -> bool { - for v in &self.belongings { - 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.view_type, 5, &mut self.unknown_fields)? - }, - 6 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.version = tmp; - }, - 7 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.belongings)?; - }, - 8 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.modified_time = tmp; - }, - 9 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.create_time = tmp; - }, - _ => { - ::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.view_type != ViewType::Blank { - my_size += ::protobuf::rt::enum_size(5, self.view_type); - } - if self.version != 0 { - my_size += ::protobuf::rt::value_size(6, self.version, ::protobuf::wire_format::WireTypeVarint); - } - 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 self.modified_time != 0 { - my_size += ::protobuf::rt::value_size(8, self.modified_time, ::protobuf::wire_format::WireTypeVarint); - } - if self.create_time != 0 { - my_size += ::protobuf::rt::value_size(9, self.create_time, ::protobuf::wire_format::WireTypeVarint); - } - 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.view_type != ViewType::Blank { - os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.view_type))?; - } - if self.version != 0 { - os.write_int64(6, self.version)?; - } - if let Some(ref v) = self.belongings.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)?; - } - if self.modified_time != 0 { - os.write_int64(8, self.modified_time)?; - } - if self.create_time != 0 { - os.write_int64(9, self.create_time)?; - } - 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> View { - View::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: &View| { &m.id }, - |m: &mut View| { &mut m.id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "belong_to_id", - |m: &View| { &m.belong_to_id }, - |m: &mut View| { &mut m.belong_to_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &View| { &m.name }, - |m: &mut View| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "desc", - |m: &View| { &m.desc }, - |m: &mut View| { &mut m.desc }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "view_type", - |m: &View| { &m.view_type }, - |m: &mut View| { &mut m.view_type }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "version", - |m: &View| { &m.version }, - |m: &mut View| { &mut m.version }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "belongings", - |m: &View| { &m.belongings }, - |m: &mut View| { &mut m.belongings }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "modified_time", - |m: &View| { &m.modified_time }, - |m: &mut View| { &mut m.modified_time }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "create_time", - |m: &View| { &m.create_time }, - |m: &mut View| { &mut m.create_time }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "View", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static View { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(View::new) - } -} - -impl ::protobuf::Clear for View { - fn clear(&mut self) { - self.id.clear(); - self.belong_to_id.clear(); - self.name.clear(); - self.desc.clear(); - self.view_type = ViewType::Blank; - self.version = 0; - self.belongings.clear(); - self.modified_time = 0; - self.create_time = 0; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for View { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for View { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct RepeatedView { - // message fields - pub items: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a RepeatedView { - fn default() -> &'a RepeatedView { - ::default_instance() - } -} - -impl RepeatedView { - pub fn new() -> RepeatedView { - ::std::default::Default::default() - } - - // repeated .View items = 1; - - - pub fn get_items(&self) -> &[View] { - &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) { - self.items = v; - } - - // Mutable pointer to the field. - pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.items - } - - // Take field - pub fn take_items(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for RepeatedView { - fn is_initialized(&self) -> bool { - for v in &self.items { - 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_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())?; - }, - }; - } - ::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 { - 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<()> { - 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(()) - } - - 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - 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_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "items", - |m: &RepeatedView| { &m.items }, - |m: &mut RepeatedView| { &mut m.items }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RepeatedView", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static RepeatedView { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(RepeatedView::new) - } -} - -impl ::protobuf::Clear for RepeatedView { - fn clear(&mut self) { - self.items.clear(); - self.unknown_fields.clear(); - } -} - -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 RepeatedView { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum ViewType { - Blank = 0, - Doc = 1, -} - -impl ::protobuf::ProtobufEnum for ViewType { - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(ViewType::Blank), - 1 => ::std::option::Option::Some(ViewType::Doc), - _ => ::std::option::Option::None - } - } - - fn values() -> &'static [Self] { - static values: &'static [ViewType] = &[ - ViewType::Blank, - ViewType::Doc, - ]; - values - } - - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT; - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new_pb_name::("ViewType", file_descriptor_proto()) - }) - } -} - -impl ::std::marker::Copy for ViewType { -} - -impl ::std::default::Default for ViewType { - fn default() -> Self { - ViewType::Blank - } -} - -impl ::protobuf::reflect::ProtobufValue for ViewType { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x11view_create.proto\"\xb9\x01\n\x11CreateViewRequest\x12\x20\n\x0cbe\ - long_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\x1e\n\ - \tthumbnail\x18\x04\x20\x01(\tH\0R\tthumbnail\x12&\n\tview_type\x18\x05\ - \x20\x01(\x0e2\t.ViewTypeR\x08viewTypeB\x12\n\x10one_of_thumbnail\"\xd8\ - \x01\n\x10CreateViewParams\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\x04\ - desc\x18\x03\x20\x01(\tR\x04desc\x12\x1c\n\tthumbnail\x18\x04\x20\x01(\t\ - R\tthumbnail\x12&\n\tview_type\x18\x05\x20\x01(\x0e2\t.ViewTypeR\x08view\ - Type\x12\x1b\n\tview_data\x18\x06\x20\x01(\tR\x08viewData\x12\x17\n\x07v\ - iew_id\x18\x07\x20\x01(\tR\x06viewId\"\x97\x02\n\x04View\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\x04\ - desc\x18\x04\x20\x01(\tR\x04desc\x12&\n\tview_type\x18\x05\x20\x01(\x0e2\ - \t.ViewTypeR\x08viewType\x12\x18\n\x07version\x18\x06\x20\x01(\x03R\x07v\ - ersion\x12-\n\nbelongings\x18\x07\x20\x01(\x0b2\r.RepeatedViewR\nbelongi\ - ngs\x12#\n\rmodified_time\x18\x08\x20\x01(\x03R\x0cmodifiedTime\x12\x1f\ - \n\x0bcreate_time\x18\t\x20\x01(\x03R\ncreateTime\"+\n\x0cRepeatedView\ - \x12\x1b\n\x05items\x18\x01\x20\x03(\x0b2\x05.ViewR\x05items*\x1e\n\x08V\ - iewType\x12\t\n\x05Blank\x10\0\x12\x07\n\x03Doc\x10\x01J\xbf\x0b\n\x06\ - \x12\x04\0\0#\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\ - \x04\x02\0\x08\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x19\n\x0b\n\x04\ - \x04\0\x02\0\x12\x03\x03\x04\x1c\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\ - \x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x0b\x17\n\x0c\n\x05\x04\0\ - \x02\0\x03\x12\x03\x03\x1a\x1b\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x04\ - \x14\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x04\x04\n\n\x0c\n\x05\x04\0\ - \x02\x01\x01\x12\x03\x04\x0b\x0f\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\ - \x04\x12\x13\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x04\x14\n\x0c\n\x05\ - \x04\0\x02\x02\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\x02\x01\x12\ - \x03\x05\x0b\x0f\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x05\x12\x13\n\x0b\ - \n\x04\x04\0\x08\0\x12\x03\x06\x044\n\x0c\n\x05\x04\0\x08\0\x01\x12\x03\ - \x06\n\x1a\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x06\x1d2\n\x0c\n\x05\x04\0\ - \x02\x03\x05\x12\x03\x06\x1d#\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x06$\ - -\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x0601\n\x0b\n\x04\x04\0\x02\x04\ - \x12\x03\x07\x04\x1b\n\x0c\n\x05\x04\0\x02\x04\x06\x12\x03\x07\x04\x0c\n\ - \x0c\n\x05\x04\0\x02\x04\x01\x12\x03\x07\r\x16\n\x0c\n\x05\x04\0\x02\x04\ - \x03\x12\x03\x07\x19\x1a\n\n\n\x02\x04\x01\x12\x04\t\0\x11\x01\n\n\n\x03\ - \x04\x01\x01\x12\x03\t\x08\x18\n\x0b\n\x04\x04\x01\x02\0\x12\x03\n\x04\ - \x1c\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\n\x04\n\n\x0c\n\x05\x04\x01\ - \x02\0\x01\x12\x03\n\x0b\x17\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\n\x1a\ - \x1b\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\x0b\x04\x14\n\x0c\n\x05\x04\x01\ - \x02\x01\x05\x12\x03\x0b\x04\n\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\ - \x0b\x0b\x0f\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\x0b\x12\x13\n\x0b\n\ - \x04\x04\x01\x02\x02\x12\x03\x0c\x04\x14\n\x0c\n\x05\x04\x01\x02\x02\x05\ - \x12\x03\x0c\x04\n\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\x0c\x0b\x0f\n\ - \x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\x0c\x12\x13\n\x0b\n\x04\x04\x01\ - \x02\x03\x12\x03\r\x04\x19\n\x0c\n\x05\x04\x01\x02\x03\x05\x12\x03\r\x04\ - \n\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\x03\r\x0b\x14\n\x0c\n\x05\x04\x01\ - \x02\x03\x03\x12\x03\r\x17\x18\n\x0b\n\x04\x04\x01\x02\x04\x12\x03\x0e\ - \x04\x1b\n\x0c\n\x05\x04\x01\x02\x04\x06\x12\x03\x0e\x04\x0c\n\x0c\n\x05\ - \x04\x01\x02\x04\x01\x12\x03\x0e\r\x16\n\x0c\n\x05\x04\x01\x02\x04\x03\ - \x12\x03\x0e\x19\x1a\n\x0b\n\x04\x04\x01\x02\x05\x12\x03\x0f\x04\x19\n\ - \x0c\n\x05\x04\x01\x02\x05\x05\x12\x03\x0f\x04\n\n\x0c\n\x05\x04\x01\x02\ - \x05\x01\x12\x03\x0f\x0b\x14\n\x0c\n\x05\x04\x01\x02\x05\x03\x12\x03\x0f\ - \x17\x18\n\x0b\n\x04\x04\x01\x02\x06\x12\x03\x10\x04\x17\n\x0c\n\x05\x04\ - \x01\x02\x06\x05\x12\x03\x10\x04\n\n\x0c\n\x05\x04\x01\x02\x06\x01\x12\ - \x03\x10\x0b\x12\n\x0c\n\x05\x04\x01\x02\x06\x03\x12\x03\x10\x15\x16\n\n\ - \n\x02\x04\x02\x12\x04\x12\0\x1c\x01\n\n\n\x03\x04\x02\x01\x12\x03\x12\ - \x08\x0c\n\x0b\n\x04\x04\x02\x02\0\x12\x03\x13\x04\x12\n\x0c\n\x05\x04\ - \x02\x02\0\x05\x12\x03\x13\x04\n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\ - \x13\x0b\r\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\x13\x10\x11\n\x0b\n\x04\ - \x04\x02\x02\x01\x12\x03\x14\x04\x1c\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\ - \x03\x14\x04\n\n\x0c\n\x05\x04\x02\x02\x01\x01\x12\x03\x14\x0b\x17\n\x0c\ - \n\x05\x04\x02\x02\x01\x03\x12\x03\x14\x1a\x1b\n\x0b\n\x04\x04\x02\x02\ - \x02\x12\x03\x15\x04\x14\n\x0c\n\x05\x04\x02\x02\x02\x05\x12\x03\x15\x04\ - \n\n\x0c\n\x05\x04\x02\x02\x02\x01\x12\x03\x15\x0b\x0f\n\x0c\n\x05\x04\ - \x02\x02\x02\x03\x12\x03\x15\x12\x13\n\x0b\n\x04\x04\x02\x02\x03\x12\x03\ - \x16\x04\x14\n\x0c\n\x05\x04\x02\x02\x03\x05\x12\x03\x16\x04\n\n\x0c\n\ - \x05\x04\x02\x02\x03\x01\x12\x03\x16\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x03\ - \x03\x12\x03\x16\x12\x13\n\x0b\n\x04\x04\x02\x02\x04\x12\x03\x17\x04\x1b\ - \n\x0c\n\x05\x04\x02\x02\x04\x06\x12\x03\x17\x04\x0c\n\x0c\n\x05\x04\x02\ - \x02\x04\x01\x12\x03\x17\r\x16\n\x0c\n\x05\x04\x02\x02\x04\x03\x12\x03\ - \x17\x19\x1a\n\x0b\n\x04\x04\x02\x02\x05\x12\x03\x18\x04\x16\n\x0c\n\x05\ - \x04\x02\x02\x05\x05\x12\x03\x18\x04\t\n\x0c\n\x05\x04\x02\x02\x05\x01\ - \x12\x03\x18\n\x11\n\x0c\n\x05\x04\x02\x02\x05\x03\x12\x03\x18\x14\x15\n\ - \x0b\n\x04\x04\x02\x02\x06\x12\x03\x19\x04\x20\n\x0c\n\x05\x04\x02\x02\ - \x06\x06\x12\x03\x19\x04\x10\n\x0c\n\x05\x04\x02\x02\x06\x01\x12\x03\x19\ - \x11\x1b\n\x0c\n\x05\x04\x02\x02\x06\x03\x12\x03\x19\x1e\x1f\n\x0b\n\x04\ - \x04\x02\x02\x07\x12\x03\x1a\x04\x1c\n\x0c\n\x05\x04\x02\x02\x07\x05\x12\ - \x03\x1a\x04\t\n\x0c\n\x05\x04\x02\x02\x07\x01\x12\x03\x1a\n\x17\n\x0c\n\ - \x05\x04\x02\x02\x07\x03\x12\x03\x1a\x1a\x1b\n\x0b\n\x04\x04\x02\x02\x08\ - \x12\x03\x1b\x04\x1a\n\x0c\n\x05\x04\x02\x02\x08\x05\x12\x03\x1b\x04\t\n\ - \x0c\n\x05\x04\x02\x02\x08\x01\x12\x03\x1b\n\x15\n\x0c\n\x05\x04\x02\x02\ - \x08\x03\x12\x03\x1b\x18\x19\n\n\n\x02\x04\x03\x12\x04\x1d\0\x1f\x01\n\n\ - \n\x03\x04\x03\x01\x12\x03\x1d\x08\x14\n\x0b\n\x04\x04\x03\x02\0\x12\x03\ - \x1e\x04\x1c\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03\x1e\x04\x0c\n\x0c\n\ - \x05\x04\x03\x02\0\x06\x12\x03\x1e\r\x11\n\x0c\n\x05\x04\x03\x02\0\x01\ - \x12\x03\x1e\x12\x17\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\x1e\x1a\x1b\n\ - \n\n\x02\x05\0\x12\x04\x20\0#\x01\n\n\n\x03\x05\0\x01\x12\x03\x20\x05\r\ - \n\x0b\n\x04\x05\0\x02\0\x12\x03!\x04\x0e\n\x0c\n\x05\x05\0\x02\0\x01\ - \x12\x03!\x04\t\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03!\x0c\r\n\x0b\n\x04\ - \x05\0\x02\x01\x12\x03\"\x04\x0c\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\"\ - \x04\x07\n\x0c\n\x05\x05\0\x02\x01\x02\x12\x03\"\n\x0bb\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-core-data-model/src/protobuf/model/view_query.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/view_query.rs deleted file mode 100644 index c2ce34e0b9..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/model/view_query.rs +++ /dev/null @@ -1,532 +0,0 @@ -// This file is generated by rust-protobuf 2.22.1. 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_query.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; - -#[derive(PartialEq,Clone,Default)] -pub struct QueryViewRequest { - // message fields - pub view_ids: ::protobuf::RepeatedField<::std::string::String>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a QueryViewRequest { - fn default() -> &'a QueryViewRequest { - ::default_instance() - } -} - -impl QueryViewRequest { - pub fn new() -> QueryViewRequest { - ::std::default::Default::default() - } - - // repeated string view_ids = 1; - - - pub fn get_view_ids(&self) -> &[::std::string::String] { - &self.view_ids - } - pub fn clear_view_ids(&mut self) { - self.view_ids.clear(); - } - - // Param is passed by value, moved - pub fn set_view_ids(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.view_ids = v; - } - - // Mutable pointer to the field. - pub fn mut_view_ids(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.view_ids - } - - // Take field - pub fn take_view_ids(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.view_ids, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for QueryViewRequest { - 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.view_ids)?; - }, - _ => { - ::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.view_ids { - 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.view_ids { - 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> QueryViewRequest { - QueryViewRequest::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>( - "view_ids", - |m: &QueryViewRequest| { &m.view_ids }, - |m: &mut QueryViewRequest| { &mut m.view_ids }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "QueryViewRequest", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static QueryViewRequest { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(QueryViewRequest::new) - } -} - -impl ::protobuf::Clear for QueryViewRequest { - fn clear(&mut self) { - self.view_ids.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for QueryViewRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for QueryViewRequest { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct ViewId { - // message fields - pub view_id: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ViewId { - fn default() -> &'a ViewId { - ::default_instance() - } -} - -impl ViewId { - pub fn new() -> ViewId { - ::std::default::Default::default() - } - - // string view_id = 1; - - - pub fn get_view_id(&self) -> &str { - &self.view_id - } - pub fn clear_view_id(&mut self) { - self.view_id.clear(); - } - - // Param is passed by value, moved - pub fn set_view_id(&mut self, v: ::std::string::String) { - self.view_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_view_id(&mut self) -> &mut ::std::string::String { - &mut self.view_id - } - - // Take field - pub fn take_view_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.view_id, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for ViewId { - 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.view_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.view_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.view_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.view_id.is_empty() { - os.write_string(1, &self.view_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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ViewId { - ViewId::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>( - "view_id", - |m: &ViewId| { &m.view_id }, - |m: &mut ViewId| { &mut m.view_id }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "ViewId", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static ViewId { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ViewId::new) - } -} - -impl ::protobuf::Clear for ViewId { - fn clear(&mut self) { - self.view_id.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for ViewId { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ViewId { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[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 { - ::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) -> ::std::boxed::Box { - 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", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static RepeatedViewId { - static instance: ::protobuf::rt::LazyV2 = ::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) - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x10view_query.proto\"-\n\x10QueryViewRequest\x12\x19\n\x08view_ids\ - \x18\x01\x20\x03(\tR\x07viewIds\"!\n\x06ViewId\x12\x17\n\x07view_id\x18\ - \x01\x20\x01(\tR\x06viewId\"&\n\x0eRepeatedViewId\x12\x14\n\x05items\x18\ - \x01\x20\x03(\tR\x05itemsJ\x9b\x02\n\x06\x12\x04\0\0\n\x01\n\x08\n\x01\ - \x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x04\x01\n\n\n\x03\x04\ - \0\x01\x12\x03\x02\x08\x18\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04!\n\ - \x0c\n\x05\x04\0\x02\0\x04\x12\x03\x03\x04\x0c\n\x0c\n\x05\x04\0\x02\0\ - \x05\x12\x03\x03\r\x13\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x14\x1c\n\ - \x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x1f\x20\n\n\n\x02\x04\x01\x12\x04\ - \x05\0\x07\x01\n\n\n\x03\x04\x01\x01\x12\x03\x05\x08\x0e\n\x0b\n\x04\x04\ - \x01\x02\0\x12\x03\x06\x04\x17\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x06\ - \x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x06\x0b\x12\n\x0c\n\x05\x04\ - \x01\x02\0\x03\x12\x03\x06\x15\x16\n\n\n\x02\x04\x02\x12\x04\x08\0\n\x01\ - \n\n\n\x03\x04\x02\x01\x12\x03\x08\x08\x16\n\x0b\n\x04\x04\x02\x02\0\x12\ - \x03\t\x04\x1e\n\x0c\n\x05\x04\x02\x02\0\x04\x12\x03\t\x04\x0c\n\x0c\n\ - \x05\x04\x02\x02\0\x05\x12\x03\t\r\x13\n\x0c\n\x05\x04\x02\x02\0\x01\x12\ - \x03\t\x14\x19\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03\t\x1c\x1db\x06proto\ - 3\ -"; - -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-core-data-model/src/protobuf/model/view_update.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/view_update.rs deleted file mode 100644 index 52077bca3f..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/model/view_update.rs +++ /dev/null @@ -1,886 +0,0 @@ -// This file is generated by rust-protobuf 2.22.1. 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_update.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; - -#[derive(PartialEq,Clone,Default)] -pub struct UpdateViewRequest { - // message fields - pub view_id: ::std::string::String, - // message oneof groups - pub one_of_name: ::std::option::Option, - pub one_of_desc: ::std::option::Option, - pub one_of_thumbnail: ::std::option::Option, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a UpdateViewRequest { - fn default() -> &'a UpdateViewRequest { - ::default_instance() - } -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateViewRequest_oneof_one_of_name { - name(::std::string::String), -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateViewRequest_oneof_one_of_desc { - desc(::std::string::String), -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateViewRequest_oneof_one_of_thumbnail { - thumbnail(::std::string::String), -} - -impl UpdateViewRequest { - pub fn new() -> UpdateViewRequest { - ::std::default::Default::default() - } - - // string view_id = 1; - - - pub fn get_view_id(&self) -> &str { - &self.view_id - } - pub fn clear_view_id(&mut self) { - self.view_id.clear(); - } - - // Param is passed by value, moved - pub fn set_view_id(&mut self, v: ::std::string::String) { - self.view_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_view_id(&mut self) -> &mut ::std::string::String { - &mut self.view_id - } - - // Take field - pub fn take_view_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.view_id, ::std::string::String::new()) - } - - // string name = 2; - - - pub fn get_name(&self) -> &str { - match self.one_of_name { - ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(ref v)) => v, - _ => "", - } - } - pub fn clear_name(&mut self) { - self.one_of_name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - match self.one_of_name { - ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.one_of_name = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(v)) - } - - // Mutable pointer to the field. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(_)) = self.one_of_name { - } else { - self.one_of_name = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(::std::string::String::new())); - } - match self.one_of_name { - ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - if self.has_name() { - match self.one_of_name.take() { - ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } - - // string desc = 3; - - - pub fn get_desc(&self) -> &str { - match self.one_of_desc { - ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(ref v)) => v, - _ => "", - } - } - pub fn clear_desc(&mut self) { - self.one_of_desc = ::std::option::Option::None; - } - - pub fn has_desc(&self) -> bool { - match self.one_of_desc { - ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_desc(&mut self, v: ::std::string::String) { - self.one_of_desc = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(v)) - } - - // Mutable pointer to the field. - pub fn mut_desc(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(_)) = self.one_of_desc { - } else { - self.one_of_desc = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(::std::string::String::new())); - } - match self.one_of_desc { - ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_desc(&mut self) -> ::std::string::String { - if self.has_desc() { - match self.one_of_desc.take() { - ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } - - // string thumbnail = 4; - - - pub fn get_thumbnail(&self) -> &str { - match self.one_of_thumbnail { - ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v)) => v, - _ => "", - } - } - pub fn clear_thumbnail(&mut self) { - self.one_of_thumbnail = ::std::option::Option::None; - } - - pub fn has_thumbnail(&self) -> bool { - match self.one_of_thumbnail { - ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_thumbnail(&mut self, v: ::std::string::String) { - self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(v)) - } - - // Mutable pointer to the field. - pub fn mut_thumbnail(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(_)) = self.one_of_thumbnail { - } else { - self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(::std::string::String::new())); - } - match self.one_of_thumbnail { - ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_thumbnail(&mut self) -> ::std::string::String { - if self.has_thumbnail() { - match self.one_of_thumbnail.take() { - ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } -} - -impl ::protobuf::Message for UpdateViewRequest { - 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.view_id)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_name = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(is.read_string()?)); - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_desc = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(is.read_string()?)); - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(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.view_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.view_id); - } - if let ::std::option::Option::Some(ref v) = self.one_of_name { - match v { - &UpdateViewRequest_oneof_one_of_name::name(ref v) => { - my_size += ::protobuf::rt::string_size(2, &v); - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_desc { - match v { - &UpdateViewRequest_oneof_one_of_desc::desc(ref v) => { - my_size += ::protobuf::rt::string_size(3, &v); - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail { - match v { - &UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v) => { - my_size += ::protobuf::rt::string_size(4, &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.view_id.is_empty() { - os.write_string(1, &self.view_id)?; - } - if let ::std::option::Option::Some(ref v) = self.one_of_name { - match v { - &UpdateViewRequest_oneof_one_of_name::name(ref v) => { - os.write_string(2, v)?; - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_desc { - match v { - &UpdateViewRequest_oneof_one_of_desc::desc(ref v) => { - os.write_string(3, v)?; - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail { - match v { - &UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v) => { - os.write_string(4, 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> UpdateViewRequest { - UpdateViewRequest::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>( - "view_id", - |m: &UpdateViewRequest| { &m.view_id }, - |m: &mut UpdateViewRequest| { &mut m.view_id }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "name", - UpdateViewRequest::has_name, - UpdateViewRequest::get_name, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "desc", - UpdateViewRequest::has_desc, - UpdateViewRequest::get_desc, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "thumbnail", - UpdateViewRequest::has_thumbnail, - UpdateViewRequest::get_thumbnail, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "UpdateViewRequest", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static UpdateViewRequest { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(UpdateViewRequest::new) - } -} - -impl ::protobuf::Clear for UpdateViewRequest { - fn clear(&mut self) { - self.view_id.clear(); - self.one_of_name = ::std::option::Option::None; - self.one_of_desc = ::std::option::Option::None; - self.one_of_thumbnail = ::std::option::Option::None; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for UpdateViewRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UpdateViewRequest { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct UpdateViewParams { - // message fields - pub view_id: ::std::string::String, - // message oneof groups - pub one_of_name: ::std::option::Option, - pub one_of_desc: ::std::option::Option, - pub one_of_thumbnail: ::std::option::Option, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a UpdateViewParams { - fn default() -> &'a UpdateViewParams { - ::default_instance() - } -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateViewParams_oneof_one_of_name { - name(::std::string::String), -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateViewParams_oneof_one_of_desc { - desc(::std::string::String), -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateViewParams_oneof_one_of_thumbnail { - thumbnail(::std::string::String), -} - -impl UpdateViewParams { - pub fn new() -> UpdateViewParams { - ::std::default::Default::default() - } - - // string view_id = 1; - - - pub fn get_view_id(&self) -> &str { - &self.view_id - } - pub fn clear_view_id(&mut self) { - self.view_id.clear(); - } - - // Param is passed by value, moved - pub fn set_view_id(&mut self, v: ::std::string::String) { - self.view_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_view_id(&mut self) -> &mut ::std::string::String { - &mut self.view_id - } - - // Take field - pub fn take_view_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.view_id, ::std::string::String::new()) - } - - // string name = 2; - - - pub fn get_name(&self) -> &str { - match self.one_of_name { - ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(ref v)) => v, - _ => "", - } - } - pub fn clear_name(&mut self) { - self.one_of_name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - match self.one_of_name { - ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.one_of_name = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(v)) - } - - // Mutable pointer to the field. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(_)) = self.one_of_name { - } else { - self.one_of_name = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(::std::string::String::new())); - } - match self.one_of_name { - ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - if self.has_name() { - match self.one_of_name.take() { - ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } - - // string desc = 3; - - - pub fn get_desc(&self) -> &str { - match self.one_of_desc { - ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(ref v)) => v, - _ => "", - } - } - pub fn clear_desc(&mut self) { - self.one_of_desc = ::std::option::Option::None; - } - - pub fn has_desc(&self) -> bool { - match self.one_of_desc { - ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_desc(&mut self, v: ::std::string::String) { - self.one_of_desc = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(v)) - } - - // Mutable pointer to the field. - pub fn mut_desc(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(_)) = self.one_of_desc { - } else { - self.one_of_desc = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(::std::string::String::new())); - } - match self.one_of_desc { - ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_desc(&mut self) -> ::std::string::String { - if self.has_desc() { - match self.one_of_desc.take() { - ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } - - // string thumbnail = 4; - - - pub fn get_thumbnail(&self) -> &str { - match self.one_of_thumbnail { - ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref v)) => v, - _ => "", - } - } - pub fn clear_thumbnail(&mut self) { - self.one_of_thumbnail = ::std::option::Option::None; - } - - pub fn has_thumbnail(&self) -> bool { - match self.one_of_thumbnail { - ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_thumbnail(&mut self, v: ::std::string::String) { - self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(v)) - } - - // Mutable pointer to the field. - pub fn mut_thumbnail(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(_)) = self.one_of_thumbnail { - } else { - self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(::std::string::String::new())); - } - match self.one_of_thumbnail { - ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_thumbnail(&mut self) -> ::std::string::String { - if self.has_thumbnail() { - match self.one_of_thumbnail.take() { - ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } -} - -impl ::protobuf::Message for UpdateViewParams { - 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.view_id)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_name = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_name::name(is.read_string()?)); - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_desc = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_desc::desc(is.read_string()?)); - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewParams_oneof_one_of_thumbnail::thumbnail(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.view_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.view_id); - } - if let ::std::option::Option::Some(ref v) = self.one_of_name { - match v { - &UpdateViewParams_oneof_one_of_name::name(ref v) => { - my_size += ::protobuf::rt::string_size(2, &v); - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_desc { - match v { - &UpdateViewParams_oneof_one_of_desc::desc(ref v) => { - my_size += ::protobuf::rt::string_size(3, &v); - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail { - match v { - &UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref v) => { - my_size += ::protobuf::rt::string_size(4, &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.view_id.is_empty() { - os.write_string(1, &self.view_id)?; - } - if let ::std::option::Option::Some(ref v) = self.one_of_name { - match v { - &UpdateViewParams_oneof_one_of_name::name(ref v) => { - os.write_string(2, v)?; - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_desc { - match v { - &UpdateViewParams_oneof_one_of_desc::desc(ref v) => { - os.write_string(3, v)?; - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail { - match v { - &UpdateViewParams_oneof_one_of_thumbnail::thumbnail(ref v) => { - os.write_string(4, 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> UpdateViewParams { - UpdateViewParams::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>( - "view_id", - |m: &UpdateViewParams| { &m.view_id }, - |m: &mut UpdateViewParams| { &mut m.view_id }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "name", - UpdateViewParams::has_name, - UpdateViewParams::get_name, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "desc", - UpdateViewParams::has_desc, - UpdateViewParams::get_desc, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "thumbnail", - UpdateViewParams::has_thumbnail, - UpdateViewParams::get_thumbnail, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "UpdateViewParams", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static UpdateViewParams { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(UpdateViewParams::new) - } -} - -impl ::protobuf::Clear for UpdateViewParams { - fn clear(&mut self) { - self.view_id.clear(); - self.one_of_name = ::std::option::Option::None; - self.one_of_desc = ::std::option::Option::None; - self.one_of_thumbnail = ::std::option::Option::None; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for UpdateViewParams { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UpdateViewParams { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x11view_update.proto\"\xaa\x01\n\x11UpdateViewRequest\x12\x17\n\x07vi\ - ew_id\x18\x01\x20\x01(\tR\x06viewId\x12\x14\n\x04name\x18\x02\x20\x01(\t\ - H\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\x10UpdateViewPa\ - rams\x12\x17\n\x07view_id\x18\x01\x20\x01(\tR\x06viewId\x12\x14\n\x04nam\ - e\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_thumbnailJ\x9c\ - \x05\n\x06\x12\x04\0\0\r\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\ - \x04\0\x12\x04\x02\0\x07\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x19\n\ - \x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\x17\n\x0c\n\x05\x04\0\x02\0\x05\ - \x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03\x0b\x12\n\x0c\ - \n\x05\x04\0\x02\0\x03\x12\x03\x03\x15\x16\n\x0b\n\x04\x04\0\x08\0\x12\ - \x03\x04\x04*\n\x0c\n\x05\x04\0\x08\0\x01\x12\x03\x04\n\x15\n\x0b\n\x04\ - \x04\0\x02\x01\x12\x03\x04\x18(\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\ - \x04\x18\x1e\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x04\x1f#\n\x0c\n\x05\ - \x04\0\x02\x01\x03\x12\x03\x04&'\n\x0b\n\x04\x04\0\x08\x01\x12\x03\x05\ - \x04*\n\x0c\n\x05\x04\0\x08\x01\x01\x12\x03\x05\n\x15\n\x0b\n\x04\x04\0\ - \x02\x02\x12\x03\x05\x18(\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x05\x18\ - \x1e\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x05\x1f#\n\x0c\n\x05\x04\0\ - \x02\x02\x03\x12\x03\x05&'\n\x0b\n\x04\x04\0\x08\x02\x12\x03\x06\x044\n\ - \x0c\n\x05\x04\0\x08\x02\x01\x12\x03\x06\n\x1a\n\x0b\n\x04\x04\0\x02\x03\ - \x12\x03\x06\x1d2\n\x0c\n\x05\x04\0\x02\x03\x05\x12\x03\x06\x1d#\n\x0c\n\ - \x05\x04\0\x02\x03\x01\x12\x03\x06$-\n\x0c\n\x05\x04\0\x02\x03\x03\x12\ - \x03\x0601\n\n\n\x02\x04\x01\x12\x04\x08\0\r\x01\n\n\n\x03\x04\x01\x01\ - \x12\x03\x08\x08\x18\n\x0b\n\x04\x04\x01\x02\0\x12\x03\t\x04\x17\n\x0c\n\ - \x05\x04\x01\x02\0\x05\x12\x03\t\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\ - \x03\t\x0b\x12\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\t\x15\x16\n\x0b\n\ - \x04\x04\x01\x08\0\x12\x03\n\x04*\n\x0c\n\x05\x04\x01\x08\0\x01\x12\x03\ - \n\n\x15\n\x0b\n\x04\x04\x01\x02\x01\x12\x03\n\x18(\n\x0c\n\x05\x04\x01\ - \x02\x01\x05\x12\x03\n\x18\x1e\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\n\ - \x1f#\n\x0c\n\x05\x04\x01\x02\x01\x03\x12\x03\n&'\n\x0b\n\x04\x04\x01\ - \x08\x01\x12\x03\x0b\x04*\n\x0c\n\x05\x04\x01\x08\x01\x01\x12\x03\x0b\n\ - \x15\n\x0b\n\x04\x04\x01\x02\x02\x12\x03\x0b\x18(\n\x0c\n\x05\x04\x01\ - \x02\x02\x05\x12\x03\x0b\x18\x1e\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\ - \x0b\x1f#\n\x0c\n\x05\x04\x01\x02\x02\x03\x12\x03\x0b&'\n\x0b\n\x04\x04\ - \x01\x08\x02\x12\x03\x0c\x044\n\x0c\n\x05\x04\x01\x08\x02\x01\x12\x03\ - \x0c\n\x1a\n\x0b\n\x04\x04\x01\x02\x03\x12\x03\x0c\x1d2\n\x0c\n\x05\x04\ - \x01\x02\x03\x05\x12\x03\x0c\x1d#\n\x0c\n\x05\x04\x01\x02\x03\x01\x12\ - \x03\x0c$-\n\x0c\n\x05\x04\x01\x02\x03\x03\x12\x03\x0c01b\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-core-data-model/src/protobuf/model/workspace.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/workspace.rs new file mode 100644 index 0000000000..0384732e33 --- /dev/null +++ b/shared-lib/flowy-core-data-model/src/protobuf/model/workspace.rs @@ -0,0 +1,2381 @@ +// This file is generated by rust-protobuf 2.22.1. 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 `workspace.proto` + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; + +#[derive(PartialEq,Clone,Default)] +pub struct Workspace { + // message fields + pub id: ::std::string::String, + pub name: ::std::string::String, + pub desc: ::std::string::String, + pub apps: ::protobuf::SingularPtrField, + pub modified_time: i64, + pub create_time: i64, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Workspace { + fn default() -> &'a Workspace { + ::default_instance() + } +} + +impl Workspace { + pub fn new() -> Workspace { + ::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 name = 2; + + + 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 = 3; + + + 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()) + } + + // .RepeatedApp apps = 4; + + + pub fn get_apps(&self) -> &super::app::RepeatedApp { + self.apps.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_apps(&mut self) { + self.apps.clear(); + } + + pub fn has_apps(&self) -> bool { + self.apps.is_some() + } + + // Param is passed by value, moved + pub fn set_apps(&mut self, v: super::app::RepeatedApp) { + self.apps = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_apps(&mut self) -> &mut super::app::RepeatedApp { + if self.apps.is_none() { + self.apps.set_default(); + } + self.apps.as_mut().unwrap() + } + + // Take field + pub fn take_apps(&mut self) -> super::app::RepeatedApp { + self.apps.take().unwrap_or_else(|| super::app::RepeatedApp::new()) + } + + // int64 modified_time = 5; + + + pub fn get_modified_time(&self) -> i64 { + self.modified_time + } + pub fn clear_modified_time(&mut self) { + self.modified_time = 0; + } + + // Param is passed by value, moved + pub fn set_modified_time(&mut self, v: i64) { + self.modified_time = v; + } + + // int64 create_time = 6; + + + pub fn get_create_time(&self) -> i64 { + self.create_time + } + pub fn clear_create_time(&mut self) { + self.create_time = 0; + } + + // Param is passed by value, moved + pub fn set_create_time(&mut self, v: i64) { + self.create_time = v; + } +} + +impl ::protobuf::Message for Workspace { + fn is_initialized(&self) -> bool { + for v in &self.apps { + 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.name)?; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?; + }, + 4 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.apps)?; + }, + 5 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.modified_time = tmp; + }, + 6 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.create_time = tmp; + }, + _ => { + ::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.name.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.name); + } + if !self.desc.is_empty() { + my_size += ::protobuf::rt::string_size(3, &self.desc); + } + if let Some(ref v) = self.apps.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.modified_time != 0 { + my_size += ::protobuf::rt::value_size(5, self.modified_time, ::protobuf::wire_format::WireTypeVarint); + } + if self.create_time != 0 { + my_size += ::protobuf::rt::value_size(6, self.create_time, ::protobuf::wire_format::WireTypeVarint); + } + 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.name.is_empty() { + os.write_string(2, &self.name)?; + } + if !self.desc.is_empty() { + os.write_string(3, &self.desc)?; + } + if let Some(ref v) = self.apps.as_ref() { + os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.modified_time != 0 { + os.write_int64(5, self.modified_time)?; + } + if self.create_time != 0 { + os.write_int64(6, self.create_time)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Workspace { + Workspace::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: &Workspace| { &m.id }, + |m: &mut Workspace| { &mut m.id }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "name", + |m: &Workspace| { &m.name }, + |m: &mut Workspace| { &mut m.name }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "desc", + |m: &Workspace| { &m.desc }, + |m: &mut Workspace| { &mut m.desc }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( + "apps", + |m: &Workspace| { &m.apps }, + |m: &mut Workspace| { &mut m.apps }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "modified_time", + |m: &Workspace| { &m.modified_time }, + |m: &mut Workspace| { &mut m.modified_time }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( + "create_time", + |m: &Workspace| { &m.create_time }, + |m: &mut Workspace| { &mut m.create_time }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "Workspace", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static Workspace { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Workspace::new) + } +} + +impl ::protobuf::Clear for Workspace { + fn clear(&mut self) { + self.id.clear(); + self.name.clear(); + self.desc.clear(); + self.apps.clear(); + self.modified_time = 0; + self.create_time = 0; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for Workspace { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for Workspace { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct RepeatedWorkspace { + // message fields + pub items: ::protobuf::RepeatedField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a RepeatedWorkspace { + fn default() -> &'a RepeatedWorkspace { + ::default_instance() + } +} + +impl RepeatedWorkspace { + pub fn new() -> RepeatedWorkspace { + ::std::default::Default::default() + } + + // repeated .Workspace items = 1; + + + pub fn get_items(&self) -> &[Workspace] { + &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) { + self.items = v; + } + + // Mutable pointer to the field. + pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.items + } + + // Take field + pub fn take_items(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new()) + } +} + +impl ::protobuf::Message for RepeatedWorkspace { + fn is_initialized(&self) -> bool { + for v in &self.items { + 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_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())?; + }, + }; + } + ::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 { + 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<()> { + 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(()) + } + + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> RepeatedWorkspace { + RepeatedWorkspace::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>( + "items", + |m: &RepeatedWorkspace| { &m.items }, + |m: &mut RepeatedWorkspace| { &mut m.items }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "RepeatedWorkspace", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static RepeatedWorkspace { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RepeatedWorkspace::new) + } +} + +impl ::protobuf::Clear for RepeatedWorkspace { + fn clear(&mut self) { + self.items.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for RepeatedWorkspace { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for RepeatedWorkspace { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct CreateWorkspaceRequest { + // message fields + pub name: ::std::string::String, + pub desc: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CreateWorkspaceRequest { + fn default() -> &'a CreateWorkspaceRequest { + ::default_instance() + } +} + +impl CreateWorkspaceRequest { + pub fn new() -> CreateWorkspaceRequest { + ::std::default::Default::default() + } + + // string name = 1; + + + 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 = 2; + + + 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()) + } +} + +impl ::protobuf::Message for CreateWorkspaceRequest { + 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.name)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?; + }, + _ => { + ::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.name.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.name); + } + if !self.desc.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.desc); + } + 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.name.is_empty() { + os.write_string(1, &self.name)?; + } + if !self.desc.is_empty() { + os.write_string(2, &self.desc)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CreateWorkspaceRequest { + CreateWorkspaceRequest::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>( + "name", + |m: &CreateWorkspaceRequest| { &m.name }, + |m: &mut CreateWorkspaceRequest| { &mut m.name }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "desc", + |m: &CreateWorkspaceRequest| { &m.desc }, + |m: &mut CreateWorkspaceRequest| { &mut m.desc }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "CreateWorkspaceRequest", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static CreateWorkspaceRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CreateWorkspaceRequest::new) + } +} + +impl ::protobuf::Clear for CreateWorkspaceRequest { + fn clear(&mut self) { + self.name.clear(); + self.desc.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for CreateWorkspaceRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for CreateWorkspaceRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct CreateWorkspaceParams { + // message fields + pub name: ::std::string::String, + pub desc: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CreateWorkspaceParams { + fn default() -> &'a CreateWorkspaceParams { + ::default_instance() + } +} + +impl CreateWorkspaceParams { + pub fn new() -> CreateWorkspaceParams { + ::std::default::Default::default() + } + + // string name = 1; + + + 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 = 2; + + + 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()) + } +} + +impl ::protobuf::Message for CreateWorkspaceParams { + 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.name)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?; + }, + _ => { + ::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.name.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.name); + } + if !self.desc.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.desc); + } + 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.name.is_empty() { + os.write_string(1, &self.name)?; + } + if !self.desc.is_empty() { + os.write_string(2, &self.desc)?; + } + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CreateWorkspaceParams { + CreateWorkspaceParams::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>( + "name", + |m: &CreateWorkspaceParams| { &m.name }, + |m: &mut CreateWorkspaceParams| { &mut m.name }, + )); + fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( + "desc", + |m: &CreateWorkspaceParams| { &m.desc }, + |m: &mut CreateWorkspaceParams| { &mut m.desc }, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "CreateWorkspaceParams", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static CreateWorkspaceParams { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CreateWorkspaceParams::new) + } +} + +impl ::protobuf::Clear for CreateWorkspaceParams { + fn clear(&mut self) { + self.name.clear(); + self.desc.clear(); + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for CreateWorkspaceParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for CreateWorkspaceParams { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct QueryWorkspaceRequest { + // message oneof groups + pub one_of_workspace_id: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a QueryWorkspaceRequest { + fn default() -> &'a QueryWorkspaceRequest { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum QueryWorkspaceRequest_oneof_one_of_workspace_id { + workspace_id(::std::string::String), +} + +impl QueryWorkspaceRequest { + pub fn new() -> QueryWorkspaceRequest { + ::std::default::Default::default() + } + + // string workspace_id = 1; + + + pub fn get_workspace_id(&self) -> &str { + match self.one_of_workspace_id { + ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(ref v)) => v, + _ => "", + } + } + pub fn clear_workspace_id(&mut self) { + self.one_of_workspace_id = ::std::option::Option::None; + } + + pub fn has_workspace_id(&self) -> bool { + match self.one_of_workspace_id { + ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_workspace_id(&mut self, v: ::std::string::String) { + self.one_of_workspace_id = ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(v)) + } + + // Mutable pointer to the field. + pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(_)) = self.one_of_workspace_id { + } else { + self.one_of_workspace_id = ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(::std::string::String::new())); + } + match self.one_of_workspace_id { + ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_workspace_id(&mut self) -> ::std::string::String { + if self.has_workspace_id() { + match self.one_of_workspace_id.take() { + ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } +} + +impl ::protobuf::Message for QueryWorkspaceRequest { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_workspace_id = ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_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 let ::std::option::Option::Some(ref v) = self.one_of_workspace_id { + match v { + &QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(ref v) => { + my_size += ::protobuf::rt::string_size(1, &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 let ::std::option::Option::Some(ref v) = self.one_of_workspace_id { + match v { + &QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(ref v) => { + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> QueryWorkspaceRequest { + QueryWorkspaceRequest::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_string_accessor::<_>( + "workspace_id", + QueryWorkspaceRequest::has_workspace_id, + QueryWorkspaceRequest::get_workspace_id, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "QueryWorkspaceRequest", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static QueryWorkspaceRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(QueryWorkspaceRequest::new) + } +} + +impl ::protobuf::Clear for QueryWorkspaceRequest { + fn clear(&mut self) { + self.one_of_workspace_id = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for QueryWorkspaceRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for QueryWorkspaceRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct WorkspaceId { + // message oneof groups + pub one_of_workspace_id: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a WorkspaceId { + fn default() -> &'a WorkspaceId { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum WorkspaceId_oneof_one_of_workspace_id { + workspace_id(::std::string::String), +} + +impl WorkspaceId { + pub fn new() -> WorkspaceId { + ::std::default::Default::default() + } + + // string workspace_id = 1; + + + pub fn get_workspace_id(&self) -> &str { + match self.one_of_workspace_id { + ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(ref v)) => v, + _ => "", + } + } + pub fn clear_workspace_id(&mut self) { + self.one_of_workspace_id = ::std::option::Option::None; + } + + pub fn has_workspace_id(&self) -> bool { + match self.one_of_workspace_id { + ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_workspace_id(&mut self, v: ::std::string::String) { + self.one_of_workspace_id = ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(v)) + } + + // Mutable pointer to the field. + pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(_)) = self.one_of_workspace_id { + } else { + self.one_of_workspace_id = ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(::std::string::String::new())); + } + match self.one_of_workspace_id { + ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_workspace_id(&mut self) -> ::std::string::String { + if self.has_workspace_id() { + match self.one_of_workspace_id.take() { + ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } +} + +impl ::protobuf::Message for WorkspaceId { + 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 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_workspace_id = ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_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 let ::std::option::Option::Some(ref v) = self.one_of_workspace_id { + match v { + &WorkspaceId_oneof_one_of_workspace_id::workspace_id(ref v) => { + my_size += ::protobuf::rt::string_size(1, &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 let ::std::option::Option::Some(ref v) = self.one_of_workspace_id { + match v { + &WorkspaceId_oneof_one_of_workspace_id::workspace_id(ref v) => { + 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> WorkspaceId { + WorkspaceId::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_string_accessor::<_>( + "workspace_id", + WorkspaceId::has_workspace_id, + WorkspaceId::get_workspace_id, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "WorkspaceId", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static WorkspaceId { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(WorkspaceId::new) + } +} + +impl ::protobuf::Clear for WorkspaceId { + fn clear(&mut self) { + self.one_of_workspace_id = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for WorkspaceId { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for WorkspaceId { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct CurrentWorkspaceSetting { + // message fields + pub workspace: ::protobuf::SingularPtrField, + // message oneof groups + pub one_of_latest_view: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CurrentWorkspaceSetting { + fn default() -> &'a CurrentWorkspaceSetting { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum CurrentWorkspaceSetting_oneof_one_of_latest_view { + latest_view(super::view::View), +} + +impl CurrentWorkspaceSetting { + pub fn new() -> CurrentWorkspaceSetting { + ::std::default::Default::default() + } + + // .Workspace workspace = 1; + + + pub fn get_workspace(&self) -> &Workspace { + self.workspace.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_workspace(&mut self) { + self.workspace.clear(); + } + + pub fn has_workspace(&self) -> bool { + self.workspace.is_some() + } + + // Param is passed by value, moved + pub fn set_workspace(&mut self, v: Workspace) { + self.workspace = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_workspace(&mut self) -> &mut Workspace { + if self.workspace.is_none() { + self.workspace.set_default(); + } + self.workspace.as_mut().unwrap() + } + + // Take field + pub fn take_workspace(&mut self) -> Workspace { + self.workspace.take().unwrap_or_else(|| Workspace::new()) + } + + // .View latest_view = 2; + + + pub fn get_latest_view(&self) -> &super::view::View { + match self.one_of_latest_view { + ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(ref v)) => v, + _ => ::default_instance(), + } + } + pub fn clear_latest_view(&mut self) { + self.one_of_latest_view = ::std::option::Option::None; + } + + pub fn has_latest_view(&self) -> bool { + match self.one_of_latest_view { + ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_latest_view(&mut self, v: super::view::View) { + self.one_of_latest_view = ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(v)) + } + + // Mutable pointer to the field. + pub fn mut_latest_view(&mut self) -> &mut super::view::View { + if let ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(_)) = self.one_of_latest_view { + } else { + self.one_of_latest_view = ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(super::view::View::new())); + } + match self.one_of_latest_view { + ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_latest_view(&mut self) -> super::view::View { + if self.has_latest_view() { + match self.one_of_latest_view.take() { + ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(v)) => v, + _ => panic!(), + } + } else { + super::view::View::new() + } + } +} + +impl ::protobuf::Message for CurrentWorkspaceSetting { + fn is_initialized(&self) -> bool { + for v in &self.workspace { + if !v.is_initialized() { + return false; + } + }; + if let Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(ref v)) = self.one_of_latest_view { + 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.workspace)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_latest_view = ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(is.read_message()?)); + }, + _ => { + ::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.workspace.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let ::std::option::Option::Some(ref v) = self.one_of_latest_view { + match v { + &CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(ref v) => { + 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.workspace.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 ::std::option::Option::Some(ref v) = self.one_of_latest_view { + match v { + &CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(ref v) => { + os.write_tag(2, ::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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CurrentWorkspaceSetting { + CurrentWorkspaceSetting::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>( + "workspace", + |m: &CurrentWorkspaceSetting| { &m.workspace }, + |m: &mut CurrentWorkspaceSetting| { &mut m.workspace }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, super::view::View>( + "latest_view", + CurrentWorkspaceSetting::has_latest_view, + CurrentWorkspaceSetting::get_latest_view, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "CurrentWorkspaceSetting", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static CurrentWorkspaceSetting { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CurrentWorkspaceSetting::new) + } +} + +impl ::protobuf::Clear for CurrentWorkspaceSetting { + fn clear(&mut self) { + self.workspace.clear(); + self.one_of_latest_view = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for CurrentWorkspaceSetting { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for CurrentWorkspaceSetting { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct UpdateWorkspaceRequest { + // message fields + pub id: ::std::string::String, + // message oneof groups + pub one_of_name: ::std::option::Option, + pub one_of_desc: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UpdateWorkspaceRequest { + fn default() -> &'a UpdateWorkspaceRequest { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateWorkspaceRequest_oneof_one_of_name { + name(::std::string::String), +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateWorkspaceRequest_oneof_one_of_desc { + desc(::std::string::String), +} + +impl UpdateWorkspaceRequest { + pub fn new() -> UpdateWorkspaceRequest { + ::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 name = 2; + + + pub fn get_name(&self) -> &str { + match self.one_of_name { + ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(ref v)) => v, + _ => "", + } + } + pub fn clear_name(&mut self) { + self.one_of_name = ::std::option::Option::None; + } + + pub fn has_name(&self) -> bool { + match self.one_of_name { + ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_name(&mut self, v: ::std::string::String) { + self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(v)) + } + + // Mutable pointer to the field. + pub fn mut_name(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(_)) = self.one_of_name { + } else { + self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(::std::string::String::new())); + } + match self.one_of_name { + ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_name(&mut self) -> ::std::string::String { + if self.has_name() { + match self.one_of_name.take() { + ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } + + // string desc = 3; + + + pub fn get_desc(&self) -> &str { + match self.one_of_desc { + ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(ref v)) => v, + _ => "", + } + } + pub fn clear_desc(&mut self) { + self.one_of_desc = ::std::option::Option::None; + } + + pub fn has_desc(&self) -> bool { + match self.one_of_desc { + ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_desc(&mut self, v: ::std::string::String) { + self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(v)) + } + + // Mutable pointer to the field. + pub fn mut_desc(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(_)) = self.one_of_desc { + } else { + self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(::std::string::String::new())); + } + match self.one_of_desc { + ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_desc(&mut self) -> ::std::string::String { + if self.has_desc() { + match self.one_of_desc.take() { + ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } +} + +impl ::protobuf::Message for UpdateWorkspaceRequest { + 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.id)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(is.read_string()?)); + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(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.id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.id); + } + if let ::std::option::Option::Some(ref v) = self.one_of_name { + match v { + &UpdateWorkspaceRequest_oneof_one_of_name::name(ref v) => { + my_size += ::protobuf::rt::string_size(2, &v); + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_desc { + match v { + &UpdateWorkspaceRequest_oneof_one_of_desc::desc(ref v) => { + my_size += ::protobuf::rt::string_size(3, &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.id.is_empty() { + os.write_string(1, &self.id)?; + } + if let ::std::option::Option::Some(ref v) = self.one_of_name { + match v { + &UpdateWorkspaceRequest_oneof_one_of_name::name(ref v) => { + os.write_string(2, v)?; + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_desc { + match v { + &UpdateWorkspaceRequest_oneof_one_of_desc::desc(ref v) => { + os.write_string(3, 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UpdateWorkspaceRequest { + UpdateWorkspaceRequest::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: &UpdateWorkspaceRequest| { &m.id }, + |m: &mut UpdateWorkspaceRequest| { &mut m.id }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "name", + UpdateWorkspaceRequest::has_name, + UpdateWorkspaceRequest::get_name, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "desc", + UpdateWorkspaceRequest::has_desc, + UpdateWorkspaceRequest::get_desc, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "UpdateWorkspaceRequest", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static UpdateWorkspaceRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(UpdateWorkspaceRequest::new) + } +} + +impl ::protobuf::Clear for UpdateWorkspaceRequest { + fn clear(&mut self) { + self.id.clear(); + self.one_of_name = ::std::option::Option::None; + self.one_of_desc = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for UpdateWorkspaceRequest { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for UpdateWorkspaceRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default)] +pub struct UpdateWorkspaceParams { + // message fields + pub id: ::std::string::String, + // message oneof groups + pub one_of_name: ::std::option::Option, + pub one_of_desc: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UpdateWorkspaceParams { + fn default() -> &'a UpdateWorkspaceParams { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateWorkspaceParams_oneof_one_of_name { + name(::std::string::String), +} + +#[derive(Clone,PartialEq,Debug)] +pub enum UpdateWorkspaceParams_oneof_one_of_desc { + desc(::std::string::String), +} + +impl UpdateWorkspaceParams { + pub fn new() -> UpdateWorkspaceParams { + ::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 name = 2; + + + pub fn get_name(&self) -> &str { + match self.one_of_name { + ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(ref v)) => v, + _ => "", + } + } + pub fn clear_name(&mut self) { + self.one_of_name = ::std::option::Option::None; + } + + pub fn has_name(&self) -> bool { + match self.one_of_name { + ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_name(&mut self, v: ::std::string::String) { + self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(v)) + } + + // Mutable pointer to the field. + pub fn mut_name(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(_)) = self.one_of_name { + } else { + self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(::std::string::String::new())); + } + match self.one_of_name { + ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_name(&mut self) -> ::std::string::String { + if self.has_name() { + match self.one_of_name.take() { + ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } + + // string desc = 3; + + + pub fn get_desc(&self) -> &str { + match self.one_of_desc { + ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(ref v)) => v, + _ => "", + } + } + pub fn clear_desc(&mut self) { + self.one_of_desc = ::std::option::Option::None; + } + + pub fn has_desc(&self) -> bool { + match self.one_of_desc { + ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_desc(&mut self, v: ::std::string::String) { + self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(v)) + } + + // Mutable pointer to the field. + pub fn mut_desc(&mut self) -> &mut ::std::string::String { + if let ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(_)) = self.one_of_desc { + } else { + self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(::std::string::String::new())); + } + match self.one_of_desc { + ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(ref mut v)) => v, + _ => panic!(), + } + } + + // Take field + pub fn take_desc(&mut self) -> ::std::string::String { + if self.has_desc() { + match self.one_of_desc.take() { + ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(v)) => v, + _ => panic!(), + } + } else { + ::std::string::String::new() + } + } +} + +impl ::protobuf::Message for UpdateWorkspaceParams { + 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.id)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(is.read_string()?)); + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(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.id.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.id); + } + if let ::std::option::Option::Some(ref v) = self.one_of_name { + match v { + &UpdateWorkspaceParams_oneof_one_of_name::name(ref v) => { + my_size += ::protobuf::rt::string_size(2, &v); + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_desc { + match v { + &UpdateWorkspaceParams_oneof_one_of_desc::desc(ref v) => { + my_size += ::protobuf::rt::string_size(3, &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.id.is_empty() { + os.write_string(1, &self.id)?; + } + if let ::std::option::Option::Some(ref v) = self.one_of_name { + match v { + &UpdateWorkspaceParams_oneof_one_of_name::name(ref v) => { + os.write_string(2, v)?; + }, + }; + } + if let ::std::option::Option::Some(ref v) = self.one_of_desc { + match v { + &UpdateWorkspaceParams_oneof_one_of_desc::desc(ref v) => { + os.write_string(3, 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) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UpdateWorkspaceParams { + UpdateWorkspaceParams::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: &UpdateWorkspaceParams| { &m.id }, + |m: &mut UpdateWorkspaceParams| { &mut m.id }, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "name", + UpdateWorkspaceParams::has_name, + UpdateWorkspaceParams::get_name, + )); + fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( + "desc", + UpdateWorkspaceParams::has_desc, + UpdateWorkspaceParams::get_desc, + )); + ::protobuf::reflect::MessageDescriptor::new_pb_name::( + "UpdateWorkspaceParams", + fields, + file_descriptor_proto() + ) + }) + } + + fn default_instance() -> &'static UpdateWorkspaceParams { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(UpdateWorkspaceParams::new) + } +} + +impl ::protobuf::Clear for UpdateWorkspaceParams { + fn clear(&mut self) { + self.id.clear(); + self.one_of_name = ::std::option::Option::None; + self.one_of_desc = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::std::fmt::Debug for UpdateWorkspaceParams { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + ::protobuf::text_format::fmt(self, f) + } +} + +impl ::protobuf::reflect::ProtobufValue for UpdateWorkspaceParams { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +static file_descriptor_proto_data: &'static [u8] = b"\ + \n\x0fworkspace.proto\x1a\tapp.proto\x1a\nview.proto\"\xab\x01\n\tWorksp\ + ace\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\x02id\x12\x12\n\x04name\x18\x02\ + \x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x03\x20\x01(\tR\x04desc\x12\ + \x20\n\x04apps\x18\x04\x20\x01(\x0b2\x0c.RepeatedAppR\x04apps\x12#\n\rmo\ + dified_time\x18\x05\x20\x01(\x03R\x0cmodifiedTime\x12\x1f\n\x0bcreate_ti\ + me\x18\x06\x20\x01(\x03R\ncreateTime\"5\n\x11RepeatedWorkspace\x12\x20\n\ + \x05items\x18\x01\x20\x03(\x0b2\n.WorkspaceR\x05items\"@\n\x16CreateWork\ + spaceRequest\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x12\n\x04\ + desc\x18\x02\x20\x01(\tR\x04desc\"?\n\x15CreateWorkspaceParams\x12\x12\n\ + \x04name\x18\x01\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x02\x20\x01(\ + \tR\x04desc\"S\n\x15QueryWorkspaceRequest\x12#\n\x0cworkspace_id\x18\x01\ + \x20\x01(\tH\0R\x0bworkspaceIdB\x15\n\x13one_of_workspace_id\"I\n\x0bWor\ + kspaceId\x12#\n\x0cworkspace_id\x18\x01\x20\x01(\tH\0R\x0bworkspaceIdB\ + \x15\n\x13one_of_workspace_id\"\x83\x01\n\x17CurrentWorkspaceSetting\x12\ + (\n\tworkspace\x18\x01\x20\x01(\x0b2\n.WorkspaceR\tworkspace\x12(\n\x0bl\ + atest_view\x18\x02\x20\x01(\x0b2\x05.ViewH\0R\nlatestViewB\x14\n\x12one_\ + of_latest_view\"r\n\x16UpdateWorkspaceRequest\x12\x0e\n\x02id\x18\x01\ + \x20\x01(\tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\x12\ + \x14\n\x04desc\x18\x03\x20\x01(\tH\x01R\x04descB\r\n\x0bone_of_nameB\r\n\ + \x0bone_of_desc\"q\n\x15UpdateWorkspaceParams\x12\x0e\n\x02id\x18\x01\ + \x20\x01(\tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\x12\ + \x14\n\x04desc\x18\x03\x20\x01(\tH\x01R\x04descB\r\n\x0bone_of_nameB\r\n\ + \x0bone_of_descJ\xce\x0c\n\x06\x12\x04\0\0*\x01\n\x08\n\x01\x0c\x12\x03\ + \0\0\x12\n\t\n\x02\x03\0\x12\x03\x01\0\x13\n\t\n\x02\x03\x01\x12\x03\x02\ + \0\x14\n\n\n\x02\x04\0\x12\x04\x04\0\x0b\x01\n\n\n\x03\x04\0\x01\x12\x03\ + \x04\x08\x11\n\x0b\n\x04\x04\0\x02\0\x12\x03\x05\x04\x12\n\x0c\n\x05\x04\ + \0\x02\0\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x05\ + \x0b\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x05\x10\x11\n\x0b\n\x04\x04\0\ + \x02\x01\x12\x03\x06\x04\x14\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x06\ + \x04\n\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x06\x0b\x0f\n\x0c\n\x05\x04\ + \0\x02\x01\x03\x12\x03\x06\x12\x13\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x07\ + \x04\x14\n\x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x07\x04\n\n\x0c\n\x05\x04\ + \0\x02\x02\x01\x12\x03\x07\x0b\x0f\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\ + \x07\x12\x13\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x08\x04\x19\n\x0c\n\x05\ + \x04\0\x02\x03\x06\x12\x03\x08\x04\x0f\n\x0c\n\x05\x04\0\x02\x03\x01\x12\ + \x03\x08\x10\x14\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x08\x17\x18\n\x0b\ + \n\x04\x04\0\x02\x04\x12\x03\t\x04\x1c\n\x0c\n\x05\x04\0\x02\x04\x05\x12\ + \x03\t\x04\t\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\t\n\x17\n\x0c\n\x05\ + \x04\0\x02\x04\x03\x12\x03\t\x1a\x1b\n\x0b\n\x04\x04\0\x02\x05\x12\x03\n\ + \x04\x1a\n\x0c\n\x05\x04\0\x02\x05\x05\x12\x03\n\x04\t\n\x0c\n\x05\x04\0\ + \x02\x05\x01\x12\x03\n\n\x15\n\x0c\n\x05\x04\0\x02\x05\x03\x12\x03\n\x18\ + \x19\n\n\n\x02\x04\x01\x12\x04\x0c\0\x0e\x01\n\n\n\x03\x04\x01\x01\x12\ + \x03\x0c\x08\x19\n\x0b\n\x04\x04\x01\x02\0\x12\x03\r\x04!\n\x0c\n\x05\ + \x04\x01\x02\0\x04\x12\x03\r\x04\x0c\n\x0c\n\x05\x04\x01\x02\0\x06\x12\ + \x03\r\r\x16\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\r\x17\x1c\n\x0c\n\x05\ + \x04\x01\x02\0\x03\x12\x03\r\x1f\x20\n\n\n\x02\x04\x02\x12\x04\x0f\0\x12\ + \x01\n\n\n\x03\x04\x02\x01\x12\x03\x0f\x08\x1e\n\x0b\n\x04\x04\x02\x02\0\ + \x12\x03\x10\x04\x14\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\x10\x04\n\n\ + \x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x10\x0b\x0f\n\x0c\n\x05\x04\x02\x02\ + \0\x03\x12\x03\x10\x12\x13\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\x11\x04\ + \x14\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\x11\x04\n\n\x0c\n\x05\x04\ + \x02\x02\x01\x01\x12\x03\x11\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\ + \x03\x11\x12\x13\n\n\n\x02\x04\x03\x12\x04\x13\0\x16\x01\n\n\n\x03\x04\ + \x03\x01\x12\x03\x13\x08\x1d\n\x0b\n\x04\x04\x03\x02\0\x12\x03\x14\x04\ + \x14\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03\x14\x04\n\n\x0c\n\x05\x04\x03\ + \x02\0\x01\x12\x03\x14\x0b\x0f\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\x14\ + \x12\x13\n\x0b\n\x04\x04\x03\x02\x01\x12\x03\x15\x04\x14\n\x0c\n\x05\x04\ + \x03\x02\x01\x05\x12\x03\x15\x04\n\n\x0c\n\x05\x04\x03\x02\x01\x01\x12\ + \x03\x15\x0b\x0f\n\x0c\n\x05\x04\x03\x02\x01\x03\x12\x03\x15\x12\x13\n\n\ + \n\x02\x04\x04\x12\x04\x17\0\x19\x01\n\n\n\x03\x04\x04\x01\x12\x03\x17\ + \x08\x1d\n\x0b\n\x04\x04\x04\x08\0\x12\x03\x18\x04:\n\x0c\n\x05\x04\x04\ + \x08\0\x01\x12\x03\x18\n\x1d\n\x0b\n\x04\x04\x04\x02\0\x12\x03\x18\x208\ + \n\x0c\n\x05\x04\x04\x02\0\x05\x12\x03\x18\x20&\n\x0c\n\x05\x04\x04\x02\ + \0\x01\x12\x03\x18'3\n\x0c\n\x05\x04\x04\x02\0\x03\x12\x03\x1867\n\n\n\ + \x02\x04\x05\x12\x04\x1a\0\x1c\x01\n\n\n\x03\x04\x05\x01\x12\x03\x1a\x08\ + \x13\n\x0b\n\x04\x04\x05\x08\0\x12\x03\x1b\x04:\n\x0c\n\x05\x04\x05\x08\ + \0\x01\x12\x03\x1b\n\x1d\n\x0b\n\x04\x04\x05\x02\0\x12\x03\x1b\x208\n\ + \x0c\n\x05\x04\x05\x02\0\x05\x12\x03\x1b\x20&\n\x0c\n\x05\x04\x05\x02\0\ + \x01\x12\x03\x1b'3\n\x0c\n\x05\x04\x05\x02\0\x03\x12\x03\x1b67\n\n\n\x02\ + \x04\x06\x12\x04\x1d\0\x20\x01\n\n\n\x03\x04\x06\x01\x12\x03\x1d\x08\x1f\ + \n\x0b\n\x04\x04\x06\x02\0\x12\x03\x1e\x04\x1c\n\x0c\n\x05\x04\x06\x02\0\ + \x06\x12\x03\x1e\x04\r\n\x0c\n\x05\x04\x06\x02\0\x01\x12\x03\x1e\x0e\x17\ + \n\x0c\n\x05\x04\x06\x02\0\x03\x12\x03\x1e\x1a\x1b\n\x0b\n\x04\x04\x06\ + \x08\0\x12\x03\x1f\x046\n\x0c\n\x05\x04\x06\x08\0\x01\x12\x03\x1f\n\x1c\ + \n\x0b\n\x04\x04\x06\x02\x01\x12\x03\x1f\x1f4\n\x0c\n\x05\x04\x06\x02\ + \x01\x06\x12\x03\x1f\x1f#\n\x0c\n\x05\x04\x06\x02\x01\x01\x12\x03\x1f$/\ + \n\x0c\n\x05\x04\x06\x02\x01\x03\x12\x03\x1f23\n\n\n\x02\x04\x07\x12\x04\ + !\0%\x01\n\n\n\x03\x04\x07\x01\x12\x03!\x08\x1e\n\x0b\n\x04\x04\x07\x02\ + \0\x12\x03\"\x04\x12\n\x0c\n\x05\x04\x07\x02\0\x05\x12\x03\"\x04\n\n\x0c\ + \n\x05\x04\x07\x02\0\x01\x12\x03\"\x0b\r\n\x0c\n\x05\x04\x07\x02\0\x03\ + \x12\x03\"\x10\x11\n\x0b\n\x04\x04\x07\x08\0\x12\x03#\x04*\n\x0c\n\x05\ + \x04\x07\x08\0\x01\x12\x03#\n\x15\n\x0b\n\x04\x04\x07\x02\x01\x12\x03#\ + \x18(\n\x0c\n\x05\x04\x07\x02\x01\x05\x12\x03#\x18\x1e\n\x0c\n\x05\x04\ + \x07\x02\x01\x01\x12\x03#\x1f#\n\x0c\n\x05\x04\x07\x02\x01\x03\x12\x03#&\ + '\n\x0b\n\x04\x04\x07\x08\x01\x12\x03$\x04*\n\x0c\n\x05\x04\x07\x08\x01\ + \x01\x12\x03$\n\x15\n\x0b\n\x04\x04\x07\x02\x02\x12\x03$\x18(\n\x0c\n\ + \x05\x04\x07\x02\x02\x05\x12\x03$\x18\x1e\n\x0c\n\x05\x04\x07\x02\x02\ + \x01\x12\x03$\x1f#\n\x0c\n\x05\x04\x07\x02\x02\x03\x12\x03$&'\n\n\n\x02\ + \x04\x08\x12\x04&\0*\x01\n\n\n\x03\x04\x08\x01\x12\x03&\x08\x1d\n\x0b\n\ + \x04\x04\x08\x02\0\x12\x03'\x04\x12\n\x0c\n\x05\x04\x08\x02\0\x05\x12\ + \x03'\x04\n\n\x0c\n\x05\x04\x08\x02\0\x01\x12\x03'\x0b\r\n\x0c\n\x05\x04\ + \x08\x02\0\x03\x12\x03'\x10\x11\n\x0b\n\x04\x04\x08\x08\0\x12\x03(\x04*\ + \n\x0c\n\x05\x04\x08\x08\0\x01\x12\x03(\n\x15\n\x0b\n\x04\x04\x08\x02\ + \x01\x12\x03(\x18(\n\x0c\n\x05\x04\x08\x02\x01\x05\x12\x03(\x18\x1e\n\ + \x0c\n\x05\x04\x08\x02\x01\x01\x12\x03(\x1f#\n\x0c\n\x05\x04\x08\x02\x01\ + \x03\x12\x03(&'\n\x0b\n\x04\x04\x08\x08\x01\x12\x03)\x04*\n\x0c\n\x05\ + \x04\x08\x08\x01\x01\x12\x03)\n\x15\n\x0b\n\x04\x04\x08\x02\x02\x12\x03)\ + \x18(\n\x0c\n\x05\x04\x08\x02\x02\x05\x12\x03)\x18\x1e\n\x0c\n\x05\x04\ + \x08\x02\x02\x01\x12\x03)\x1f#\n\x0c\n\x05\x04\x08\x02\x02\x03\x12\x03)&\ + '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-core-data-model/src/protobuf/model/workspace_create.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/workspace_create.rs deleted file mode 100644 index 60d7d52ac1..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/model/workspace_create.rs +++ /dev/null @@ -1,1025 +0,0 @@ -// This file is generated by rust-protobuf 2.22.1. 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 `workspace_create.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; - -#[derive(PartialEq,Clone,Default)] -pub struct CreateWorkspaceRequest { - // message fields - pub name: ::std::string::String, - pub desc: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a CreateWorkspaceRequest { - fn default() -> &'a CreateWorkspaceRequest { - ::default_instance() - } -} - -impl CreateWorkspaceRequest { - pub fn new() -> CreateWorkspaceRequest { - ::std::default::Default::default() - } - - // string name = 1; - - - 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 = 2; - - - 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()) - } -} - -impl ::protobuf::Message for CreateWorkspaceRequest { - 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.name)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?; - }, - _ => { - ::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.name.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.name); - } - if !self.desc.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.desc); - } - 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.name.is_empty() { - os.write_string(1, &self.name)?; - } - if !self.desc.is_empty() { - os.write_string(2, &self.desc)?; - } - 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> CreateWorkspaceRequest { - CreateWorkspaceRequest::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>( - "name", - |m: &CreateWorkspaceRequest| { &m.name }, - |m: &mut CreateWorkspaceRequest| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "desc", - |m: &CreateWorkspaceRequest| { &m.desc }, - |m: &mut CreateWorkspaceRequest| { &mut m.desc }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "CreateWorkspaceRequest", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static CreateWorkspaceRequest { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(CreateWorkspaceRequest::new) - } -} - -impl ::protobuf::Clear for CreateWorkspaceRequest { - fn clear(&mut self) { - self.name.clear(); - self.desc.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for CreateWorkspaceRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CreateWorkspaceRequest { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct CreateWorkspaceParams { - // message fields - pub name: ::std::string::String, - pub desc: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a CreateWorkspaceParams { - fn default() -> &'a CreateWorkspaceParams { - ::default_instance() - } -} - -impl CreateWorkspaceParams { - pub fn new() -> CreateWorkspaceParams { - ::std::default::Default::default() - } - - // string name = 1; - - - 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 = 2; - - - 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()) - } -} - -impl ::protobuf::Message for CreateWorkspaceParams { - 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.name)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?; - }, - _ => { - ::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.name.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.name); - } - if !self.desc.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.desc); - } - 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.name.is_empty() { - os.write_string(1, &self.name)?; - } - if !self.desc.is_empty() { - os.write_string(2, &self.desc)?; - } - 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> CreateWorkspaceParams { - CreateWorkspaceParams::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>( - "name", - |m: &CreateWorkspaceParams| { &m.name }, - |m: &mut CreateWorkspaceParams| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "desc", - |m: &CreateWorkspaceParams| { &m.desc }, - |m: &mut CreateWorkspaceParams| { &mut m.desc }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "CreateWorkspaceParams", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static CreateWorkspaceParams { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(CreateWorkspaceParams::new) - } -} - -impl ::protobuf::Clear for CreateWorkspaceParams { - fn clear(&mut self) { - self.name.clear(); - self.desc.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for CreateWorkspaceParams { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CreateWorkspaceParams { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct Workspace { - // message fields - pub id: ::std::string::String, - pub name: ::std::string::String, - pub desc: ::std::string::String, - pub apps: ::protobuf::SingularPtrField, - pub modified_time: i64, - pub create_time: i64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Workspace { - fn default() -> &'a Workspace { - ::default_instance() - } -} - -impl Workspace { - pub fn new() -> Workspace { - ::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 name = 2; - - - 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 = 3; - - - 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()) - } - - // .RepeatedApp apps = 4; - - - pub fn get_apps(&self) -> &super::app_create::RepeatedApp { - self.apps.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_apps(&mut self) { - self.apps.clear(); - } - - pub fn has_apps(&self) -> bool { - self.apps.is_some() - } - - // Param is passed by value, moved - pub fn set_apps(&mut self, v: super::app_create::RepeatedApp) { - self.apps = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_apps(&mut self) -> &mut super::app_create::RepeatedApp { - if self.apps.is_none() { - self.apps.set_default(); - } - self.apps.as_mut().unwrap() - } - - // Take field - pub fn take_apps(&mut self) -> super::app_create::RepeatedApp { - self.apps.take().unwrap_or_else(|| super::app_create::RepeatedApp::new()) - } - - // int64 modified_time = 5; - - - pub fn get_modified_time(&self) -> i64 { - self.modified_time - } - pub fn clear_modified_time(&mut self) { - self.modified_time = 0; - } - - // Param is passed by value, moved - pub fn set_modified_time(&mut self, v: i64) { - self.modified_time = v; - } - - // int64 create_time = 6; - - - pub fn get_create_time(&self) -> i64 { - self.create_time - } - pub fn clear_create_time(&mut self) { - self.create_time = 0; - } - - // Param is passed by value, moved - pub fn set_create_time(&mut self, v: i64) { - self.create_time = v; - } -} - -impl ::protobuf::Message for Workspace { - fn is_initialized(&self) -> bool { - for v in &self.apps { - 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.name)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.desc)?; - }, - 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.apps)?; - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.modified_time = tmp; - }, - 6 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.create_time = tmp; - }, - _ => { - ::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.name.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.name); - } - if !self.desc.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.desc); - } - if let Some(ref v) = self.apps.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if self.modified_time != 0 { - my_size += ::protobuf::rt::value_size(5, self.modified_time, ::protobuf::wire_format::WireTypeVarint); - } - if self.create_time != 0 { - my_size += ::protobuf::rt::value_size(6, self.create_time, ::protobuf::wire_format::WireTypeVarint); - } - 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.name.is_empty() { - os.write_string(2, &self.name)?; - } - if !self.desc.is_empty() { - os.write_string(3, &self.desc)?; - } - if let Some(ref v) = self.apps.as_ref() { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if self.modified_time != 0 { - os.write_int64(5, self.modified_time)?; - } - if self.create_time != 0 { - os.write_int64(6, self.create_time)?; - } - 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> Workspace { - Workspace::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: &Workspace| { &m.id }, - |m: &mut Workspace| { &mut m.id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "name", - |m: &Workspace| { &m.name }, - |m: &mut Workspace| { &mut m.name }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "desc", - |m: &Workspace| { &m.desc }, - |m: &mut Workspace| { &mut m.desc }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "apps", - |m: &Workspace| { &m.apps }, - |m: &mut Workspace| { &mut m.apps }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "modified_time", - |m: &Workspace| { &m.modified_time }, - |m: &mut Workspace| { &mut m.modified_time }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>( - "create_time", - |m: &Workspace| { &m.create_time }, - |m: &mut Workspace| { &mut m.create_time }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "Workspace", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static Workspace { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Workspace::new) - } -} - -impl ::protobuf::Clear for Workspace { - fn clear(&mut self) { - self.id.clear(); - self.name.clear(); - self.desc.clear(); - self.apps.clear(); - self.modified_time = 0; - self.create_time = 0; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for Workspace { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for Workspace { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct RepeatedWorkspace { - // message fields - pub items: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a RepeatedWorkspace { - fn default() -> &'a RepeatedWorkspace { - ::default_instance() - } -} - -impl RepeatedWorkspace { - pub fn new() -> RepeatedWorkspace { - ::std::default::Default::default() - } - - // repeated .Workspace items = 1; - - - pub fn get_items(&self) -> &[Workspace] { - &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) { - self.items = v; - } - - // Mutable pointer to the field. - pub fn mut_items(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.items - } - - // Take field - pub fn take_items(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.items, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for RepeatedWorkspace { - fn is_initialized(&self) -> bool { - for v in &self.items { - 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_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())?; - }, - }; - } - ::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 { - 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<()> { - 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(()) - } - - 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> RepeatedWorkspace { - RepeatedWorkspace::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>( - "items", - |m: &RepeatedWorkspace| { &m.items }, - |m: &mut RepeatedWorkspace| { &mut m.items }, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "RepeatedWorkspace", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static RepeatedWorkspace { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(RepeatedWorkspace::new) - } -} - -impl ::protobuf::Clear for RepeatedWorkspace { - fn clear(&mut self) { - self.items.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for RepeatedWorkspace { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RepeatedWorkspace { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x16workspace_create.proto\x1a\x10app_create.proto\"@\n\x16CreateWorks\ - paceRequest\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x12\n\x04d\ - esc\x18\x02\x20\x01(\tR\x04desc\"?\n\x15CreateWorkspaceParams\x12\x12\n\ - \x04name\x18\x01\x20\x01(\tR\x04name\x12\x12\n\x04desc\x18\x02\x20\x01(\ - \tR\x04desc\"\xab\x01\n\tWorkspace\x12\x0e\n\x02id\x18\x01\x20\x01(\tR\ - \x02id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x12\n\x04desc\ - \x18\x03\x20\x01(\tR\x04desc\x12\x20\n\x04apps\x18\x04\x20\x01(\x0b2\x0c\ - .RepeatedAppR\x04apps\x12#\n\rmodified_time\x18\x05\x20\x01(\x03R\x0cmod\ - ifiedTime\x12\x1f\n\x0bcreate_time\x18\x06\x20\x01(\x03R\ncreateTime\"5\ - \n\x11RepeatedWorkspace\x12\x20\n\x05items\x18\x01\x20\x03(\x0b2\n.Works\ - paceR\x05itemsJ\xe8\x05\n\x06\x12\x04\0\0\x15\x01\n\x08\n\x01\x0c\x12\ - \x03\0\0\x12\n\t\n\x02\x03\0\x12\x03\x01\0\x1a\n\n\n\x02\x04\0\x12\x04\ - \x03\0\x06\x01\n\n\n\x03\x04\0\x01\x12\x03\x03\x08\x1e\n\x0b\n\x04\x04\0\ - \x02\0\x12\x03\x04\x04\x14\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x04\x04\n\ - \n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x04\x0b\x0f\n\x0c\n\x05\x04\0\x02\0\ - \x03\x12\x03\x04\x12\x13\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x05\x04\x14\n\ - \x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x05\x04\n\n\x0c\n\x05\x04\0\x02\x01\ - \x01\x12\x03\x05\x0b\x0f\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x05\x12\ - \x13\n\n\n\x02\x04\x01\x12\x04\x07\0\n\x01\n\n\n\x03\x04\x01\x01\x12\x03\ - \x07\x08\x1d\n\x0b\n\x04\x04\x01\x02\0\x12\x03\x08\x04\x14\n\x0c\n\x05\ - \x04\x01\x02\0\x05\x12\x03\x08\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\ - \x03\x08\x0b\x0f\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x08\x12\x13\n\x0b\ - \n\x04\x04\x01\x02\x01\x12\x03\t\x04\x14\n\x0c\n\x05\x04\x01\x02\x01\x05\ - \x12\x03\t\x04\n\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\t\x0b\x0f\n\x0c\ - \n\x05\x04\x01\x02\x01\x03\x12\x03\t\x12\x13\n\n\n\x02\x04\x02\x12\x04\ - \x0b\0\x12\x01\n\n\n\x03\x04\x02\x01\x12\x03\x0b\x08\x11\n\x0b\n\x04\x04\ - \x02\x02\0\x12\x03\x0c\x04\x12\n\x0c\n\x05\x04\x02\x02\0\x05\x12\x03\x0c\ - \x04\n\n\x0c\n\x05\x04\x02\x02\0\x01\x12\x03\x0c\x0b\r\n\x0c\n\x05\x04\ - \x02\x02\0\x03\x12\x03\x0c\x10\x11\n\x0b\n\x04\x04\x02\x02\x01\x12\x03\r\ - \x04\x14\n\x0c\n\x05\x04\x02\x02\x01\x05\x12\x03\r\x04\n\n\x0c\n\x05\x04\ - \x02\x02\x01\x01\x12\x03\r\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x01\x03\x12\ - \x03\r\x12\x13\n\x0b\n\x04\x04\x02\x02\x02\x12\x03\x0e\x04\x14\n\x0c\n\ - \x05\x04\x02\x02\x02\x05\x12\x03\x0e\x04\n\n\x0c\n\x05\x04\x02\x02\x02\ - \x01\x12\x03\x0e\x0b\x0f\n\x0c\n\x05\x04\x02\x02\x02\x03\x12\x03\x0e\x12\ - \x13\n\x0b\n\x04\x04\x02\x02\x03\x12\x03\x0f\x04\x19\n\x0c\n\x05\x04\x02\ - \x02\x03\x06\x12\x03\x0f\x04\x0f\n\x0c\n\x05\x04\x02\x02\x03\x01\x12\x03\ - \x0f\x10\x14\n\x0c\n\x05\x04\x02\x02\x03\x03\x12\x03\x0f\x17\x18\n\x0b\n\ - \x04\x04\x02\x02\x04\x12\x03\x10\x04\x1c\n\x0c\n\x05\x04\x02\x02\x04\x05\ - \x12\x03\x10\x04\t\n\x0c\n\x05\x04\x02\x02\x04\x01\x12\x03\x10\n\x17\n\ - \x0c\n\x05\x04\x02\x02\x04\x03\x12\x03\x10\x1a\x1b\n\x0b\n\x04\x04\x02\ - \x02\x05\x12\x03\x11\x04\x1a\n\x0c\n\x05\x04\x02\x02\x05\x05\x12\x03\x11\ - \x04\t\n\x0c\n\x05\x04\x02\x02\x05\x01\x12\x03\x11\n\x15\n\x0c\n\x05\x04\ - \x02\x02\x05\x03\x12\x03\x11\x18\x19\n\n\n\x02\x04\x03\x12\x04\x13\0\x15\ - \x01\n\n\n\x03\x04\x03\x01\x12\x03\x13\x08\x19\n\x0b\n\x04\x04\x03\x02\0\ - \x12\x03\x14\x04!\n\x0c\n\x05\x04\x03\x02\0\x04\x12\x03\x14\x04\x0c\n\ - \x0c\n\x05\x04\x03\x02\0\x06\x12\x03\x14\r\x16\n\x0c\n\x05\x04\x03\x02\0\ - \x01\x12\x03\x14\x17\x1c\n\x0c\n\x05\x04\x03\x02\0\x03\x12\x03\x14\x1f\ - \x20b\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-core-data-model/src/protobuf/model/workspace_query.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/workspace_query.rs deleted file mode 100644 index 160f7b0a6b..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/model/workspace_query.rs +++ /dev/null @@ -1,450 +0,0 @@ -// This file is generated by rust-protobuf 2.22.1. 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 `workspace_query.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; - -#[derive(PartialEq,Clone,Default)] -pub struct QueryWorkspaceRequest { - // message oneof groups - pub one_of_workspace_id: ::std::option::Option, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a QueryWorkspaceRequest { - fn default() -> &'a QueryWorkspaceRequest { - ::default_instance() - } -} - -#[derive(Clone,PartialEq,Debug)] -pub enum QueryWorkspaceRequest_oneof_one_of_workspace_id { - workspace_id(::std::string::String), -} - -impl QueryWorkspaceRequest { - pub fn new() -> QueryWorkspaceRequest { - ::std::default::Default::default() - } - - // string workspace_id = 1; - - - pub fn get_workspace_id(&self) -> &str { - match self.one_of_workspace_id { - ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(ref v)) => v, - _ => "", - } - } - pub fn clear_workspace_id(&mut self) { - self.one_of_workspace_id = ::std::option::Option::None; - } - - pub fn has_workspace_id(&self) -> bool { - match self.one_of_workspace_id { - ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_workspace_id(&mut self, v: ::std::string::String) { - self.one_of_workspace_id = ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(v)) - } - - // Mutable pointer to the field. - pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(_)) = self.one_of_workspace_id { - } else { - self.one_of_workspace_id = ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(::std::string::String::new())); - } - match self.one_of_workspace_id { - ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_workspace_id(&mut self) -> ::std::string::String { - if self.has_workspace_id() { - match self.one_of_workspace_id.take() { - ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } -} - -impl ::protobuf::Message for QueryWorkspaceRequest { - 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 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_workspace_id = ::std::option::Option::Some(QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_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 let ::std::option::Option::Some(ref v) = self.one_of_workspace_id { - match v { - &QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(ref v) => { - my_size += ::protobuf::rt::string_size(1, &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 let ::std::option::Option::Some(ref v) = self.one_of_workspace_id { - match v { - &QueryWorkspaceRequest_oneof_one_of_workspace_id::workspace_id(ref v) => { - 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> QueryWorkspaceRequest { - QueryWorkspaceRequest::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_string_accessor::<_>( - "workspace_id", - QueryWorkspaceRequest::has_workspace_id, - QueryWorkspaceRequest::get_workspace_id, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "QueryWorkspaceRequest", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static QueryWorkspaceRequest { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(QueryWorkspaceRequest::new) - } -} - -impl ::protobuf::Clear for QueryWorkspaceRequest { - fn clear(&mut self) { - self.one_of_workspace_id = ::std::option::Option::None; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for QueryWorkspaceRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for QueryWorkspaceRequest { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct WorkspaceId { - // message oneof groups - pub one_of_workspace_id: ::std::option::Option, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a WorkspaceId { - fn default() -> &'a WorkspaceId { - ::default_instance() - } -} - -#[derive(Clone,PartialEq,Debug)] -pub enum WorkspaceId_oneof_one_of_workspace_id { - workspace_id(::std::string::String), -} - -impl WorkspaceId { - pub fn new() -> WorkspaceId { - ::std::default::Default::default() - } - - // string workspace_id = 1; - - - pub fn get_workspace_id(&self) -> &str { - match self.one_of_workspace_id { - ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(ref v)) => v, - _ => "", - } - } - pub fn clear_workspace_id(&mut self) { - self.one_of_workspace_id = ::std::option::Option::None; - } - - pub fn has_workspace_id(&self) -> bool { - match self.one_of_workspace_id { - ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_workspace_id(&mut self, v: ::std::string::String) { - self.one_of_workspace_id = ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(v)) - } - - // Mutable pointer to the field. - pub fn mut_workspace_id(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(_)) = self.one_of_workspace_id { - } else { - self.one_of_workspace_id = ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(::std::string::String::new())); - } - match self.one_of_workspace_id { - ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_workspace_id(&mut self) -> ::std::string::String { - if self.has_workspace_id() { - match self.one_of_workspace_id.take() { - ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } -} - -impl ::protobuf::Message for WorkspaceId { - 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 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_workspace_id = ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_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 let ::std::option::Option::Some(ref v) = self.one_of_workspace_id { - match v { - &WorkspaceId_oneof_one_of_workspace_id::workspace_id(ref v) => { - my_size += ::protobuf::rt::string_size(1, &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 let ::std::option::Option::Some(ref v) = self.one_of_workspace_id { - match v { - &WorkspaceId_oneof_one_of_workspace_id::workspace_id(ref v) => { - 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> WorkspaceId { - WorkspaceId::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_string_accessor::<_>( - "workspace_id", - WorkspaceId::has_workspace_id, - WorkspaceId::get_workspace_id, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "WorkspaceId", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static WorkspaceId { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(WorkspaceId::new) - } -} - -impl ::protobuf::Clear for WorkspaceId { - fn clear(&mut self) { - self.one_of_workspace_id = ::std::option::Option::None; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for WorkspaceId { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for WorkspaceId { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x15workspace_query.proto\"S\n\x15QueryWorkspaceRequest\x12#\n\x0cwork\ - space_id\x18\x01\x20\x01(\tH\0R\x0bworkspaceIdB\x15\n\x13one_of_workspac\ - e_id\"I\n\x0bWorkspaceId\x12#\n\x0cworkspace_id\x18\x01\x20\x01(\tH\0R\ - \x0bworkspaceIdB\x15\n\x13one_of_workspace_idJ\xe6\x01\n\x06\x12\x04\0\0\ - \x07\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\ - \x04\x01\n\n\n\x03\x04\0\x01\x12\x03\x02\x08\x1d\n\x0b\n\x04\x04\0\x08\0\ - \x12\x03\x03\x04:\n\x0c\n\x05\x04\0\x08\0\x01\x12\x03\x03\n\x1d\n\x0b\n\ - \x04\x04\0\x02\0\x12\x03\x03\x208\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\ - \x03\x20&\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x03'3\n\x0c\n\x05\x04\0\ - \x02\0\x03\x12\x03\x0367\n\n\n\x02\x04\x01\x12\x04\x05\0\x07\x01\n\n\n\ - \x03\x04\x01\x01\x12\x03\x05\x08\x13\n\x0b\n\x04\x04\x01\x08\0\x12\x03\ - \x06\x04:\n\x0c\n\x05\x04\x01\x08\0\x01\x12\x03\x06\n\x1d\n\x0b\n\x04\ - \x04\x01\x02\0\x12\x03\x06\x208\n\x0c\n\x05\x04\x01\x02\0\x05\x12\x03\ - \x06\x20&\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x06'3\n\x0c\n\x05\x04\ - \x01\x02\0\x03\x12\x03\x0667b\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-core-data-model/src/protobuf/model/workspace_setting.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/workspace_setting.rs deleted file mode 100644 index a293589188..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/model/workspace_setting.rs +++ /dev/null @@ -1,317 +0,0 @@ -// This file is generated by rust-protobuf 2.22.1. 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 `workspace_setting.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; - -#[derive(PartialEq,Clone,Default)] -pub struct CurrentWorkspaceSetting { - // message fields - pub workspace: ::protobuf::SingularPtrField, - // message oneof groups - pub one_of_latest_view: ::std::option::Option, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a CurrentWorkspaceSetting { - fn default() -> &'a CurrentWorkspaceSetting { - ::default_instance() - } -} - -#[derive(Clone,PartialEq,Debug)] -pub enum CurrentWorkspaceSetting_oneof_one_of_latest_view { - latest_view(super::view_create::View), -} - -impl CurrentWorkspaceSetting { - pub fn new() -> CurrentWorkspaceSetting { - ::std::default::Default::default() - } - - // .Workspace workspace = 1; - - - pub fn get_workspace(&self) -> &super::workspace_create::Workspace { - self.workspace.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_workspace(&mut self) { - self.workspace.clear(); - } - - pub fn has_workspace(&self) -> bool { - self.workspace.is_some() - } - - // Param is passed by value, moved - pub fn set_workspace(&mut self, v: super::workspace_create::Workspace) { - self.workspace = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_workspace(&mut self) -> &mut super::workspace_create::Workspace { - if self.workspace.is_none() { - self.workspace.set_default(); - } - self.workspace.as_mut().unwrap() - } - - // Take field - pub fn take_workspace(&mut self) -> super::workspace_create::Workspace { - self.workspace.take().unwrap_or_else(|| super::workspace_create::Workspace::new()) - } - - // .View latest_view = 2; - - - pub fn get_latest_view(&self) -> &super::view_create::View { - match self.one_of_latest_view { - ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(ref v)) => v, - _ => ::default_instance(), - } - } - pub fn clear_latest_view(&mut self) { - self.one_of_latest_view = ::std::option::Option::None; - } - - pub fn has_latest_view(&self) -> bool { - match self.one_of_latest_view { - ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_latest_view(&mut self, v: super::view_create::View) { - self.one_of_latest_view = ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(v)) - } - - // Mutable pointer to the field. - pub fn mut_latest_view(&mut self) -> &mut super::view_create::View { - if let ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(_)) = self.one_of_latest_view { - } else { - self.one_of_latest_view = ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(super::view_create::View::new())); - } - match self.one_of_latest_view { - ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_latest_view(&mut self) -> super::view_create::View { - if self.has_latest_view() { - match self.one_of_latest_view.take() { - ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(v)) => v, - _ => panic!(), - } - } else { - super::view_create::View::new() - } - } -} - -impl ::protobuf::Message for CurrentWorkspaceSetting { - fn is_initialized(&self) -> bool { - for v in &self.workspace { - if !v.is_initialized() { - return false; - } - }; - if let Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(ref v)) = self.one_of_latest_view { - 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.workspace)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_latest_view = ::std::option::Option::Some(CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(is.read_message()?)); - }, - _ => { - ::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.workspace.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let ::std::option::Option::Some(ref v) = self.one_of_latest_view { - match v { - &CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(ref v) => { - 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.workspace.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 ::std::option::Option::Some(ref v) = self.one_of_latest_view { - match v { - &CurrentWorkspaceSetting_oneof_one_of_latest_view::latest_view(ref v) => { - os.write_tag(2, ::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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> CurrentWorkspaceSetting { - CurrentWorkspaceSetting::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>( - "workspace", - |m: &CurrentWorkspaceSetting| { &m.workspace }, - |m: &mut CurrentWorkspaceSetting| { &mut m.workspace }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, super::view_create::View>( - "latest_view", - CurrentWorkspaceSetting::has_latest_view, - CurrentWorkspaceSetting::get_latest_view, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "CurrentWorkspaceSetting", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static CurrentWorkspaceSetting { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(CurrentWorkspaceSetting::new) - } -} - -impl ::protobuf::Clear for CurrentWorkspaceSetting { - fn clear(&mut self) { - self.workspace.clear(); - self.one_of_latest_view = ::std::option::Option::None; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for CurrentWorkspaceSetting { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CurrentWorkspaceSetting { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x17workspace_setting.proto\x1a\x11view_create.proto\x1a\x16workspace_\ - create.proto\"\x83\x01\n\x17CurrentWorkspaceSetting\x12(\n\tworkspace\ - \x18\x01\x20\x01(\x0b2\n.WorkspaceR\tworkspace\x12(\n\x0blatest_view\x18\ - \x02\x20\x01(\x0b2\x05.ViewH\0R\nlatestViewB\x14\n\x12one_of_latest_view\ - J\xc9\x01\n\x06\x12\x04\0\0\x07\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\t\ - \n\x02\x03\0\x12\x03\x01\0\x1b\n\t\n\x02\x03\x01\x12\x03\x02\0\x20\n\n\n\ - \x02\x04\0\x12\x04\x04\0\x07\x01\n\n\n\x03\x04\0\x01\x12\x03\x04\x08\x1f\ - \n\x0b\n\x04\x04\0\x02\0\x12\x03\x05\x04\x1c\n\x0c\n\x05\x04\0\x02\0\x06\ - \x12\x03\x05\x04\r\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x05\x0e\x17\n\x0c\ - \n\x05\x04\0\x02\0\x03\x12\x03\x05\x1a\x1b\n\x0b\n\x04\x04\0\x08\0\x12\ - \x03\x06\x046\n\x0c\n\x05\x04\0\x08\0\x01\x12\x03\x06\n\x1c\n\x0b\n\x04\ - \x04\0\x02\x01\x12\x03\x06\x1f4\n\x0c\n\x05\x04\0\x02\x01\x06\x12\x03\ - \x06\x1f#\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x06$/\n\x0c\n\x05\x04\0\ - \x02\x01\x03\x12\x03\x0623b\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-core-data-model/src/protobuf/model/workspace_update.rs b/shared-lib/flowy-core-data-model/src/protobuf/model/workspace_update.rs deleted file mode 100644 index ace4e584cc..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/model/workspace_update.rs +++ /dev/null @@ -1,714 +0,0 @@ -// This file is generated by rust-protobuf 2.22.1. 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 `workspace_update.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_22_1; - -#[derive(PartialEq,Clone,Default)] -pub struct UpdateWorkspaceRequest { - // message fields - pub id: ::std::string::String, - // message oneof groups - pub one_of_name: ::std::option::Option, - pub one_of_desc: ::std::option::Option, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a UpdateWorkspaceRequest { - fn default() -> &'a UpdateWorkspaceRequest { - ::default_instance() - } -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateWorkspaceRequest_oneof_one_of_name { - name(::std::string::String), -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateWorkspaceRequest_oneof_one_of_desc { - desc(::std::string::String), -} - -impl UpdateWorkspaceRequest { - pub fn new() -> UpdateWorkspaceRequest { - ::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 name = 2; - - - pub fn get_name(&self) -> &str { - match self.one_of_name { - ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(ref v)) => v, - _ => "", - } - } - pub fn clear_name(&mut self) { - self.one_of_name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - match self.one_of_name { - ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(v)) - } - - // Mutable pointer to the field. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(_)) = self.one_of_name { - } else { - self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(::std::string::String::new())); - } - match self.one_of_name { - ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - if self.has_name() { - match self.one_of_name.take() { - ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } - - // string desc = 3; - - - pub fn get_desc(&self) -> &str { - match self.one_of_desc { - ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(ref v)) => v, - _ => "", - } - } - pub fn clear_desc(&mut self) { - self.one_of_desc = ::std::option::Option::None; - } - - pub fn has_desc(&self) -> bool { - match self.one_of_desc { - ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_desc(&mut self, v: ::std::string::String) { - self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(v)) - } - - // Mutable pointer to the field. - pub fn mut_desc(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(_)) = self.one_of_desc { - } else { - self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(::std::string::String::new())); - } - match self.one_of_desc { - ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_desc(&mut self) -> ::std::string::String { - if self.has_desc() { - match self.one_of_desc.take() { - ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } -} - -impl ::protobuf::Message for UpdateWorkspaceRequest { - 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.id)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_name::name(is.read_string()?)); - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceRequest_oneof_one_of_desc::desc(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.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if let ::std::option::Option::Some(ref v) = self.one_of_name { - match v { - &UpdateWorkspaceRequest_oneof_one_of_name::name(ref v) => { - my_size += ::protobuf::rt::string_size(2, &v); - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_desc { - match v { - &UpdateWorkspaceRequest_oneof_one_of_desc::desc(ref v) => { - my_size += ::protobuf::rt::string_size(3, &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.id.is_empty() { - os.write_string(1, &self.id)?; - } - if let ::std::option::Option::Some(ref v) = self.one_of_name { - match v { - &UpdateWorkspaceRequest_oneof_one_of_name::name(ref v) => { - os.write_string(2, v)?; - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_desc { - match v { - &UpdateWorkspaceRequest_oneof_one_of_desc::desc(ref v) => { - os.write_string(3, 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> UpdateWorkspaceRequest { - UpdateWorkspaceRequest::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: &UpdateWorkspaceRequest| { &m.id }, - |m: &mut UpdateWorkspaceRequest| { &mut m.id }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "name", - UpdateWorkspaceRequest::has_name, - UpdateWorkspaceRequest::get_name, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "desc", - UpdateWorkspaceRequest::has_desc, - UpdateWorkspaceRequest::get_desc, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "UpdateWorkspaceRequest", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static UpdateWorkspaceRequest { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(UpdateWorkspaceRequest::new) - } -} - -impl ::protobuf::Clear for UpdateWorkspaceRequest { - fn clear(&mut self) { - self.id.clear(); - self.one_of_name = ::std::option::Option::None; - self.one_of_desc = ::std::option::Option::None; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for UpdateWorkspaceRequest { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UpdateWorkspaceRequest { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct UpdateWorkspaceParams { - // message fields - pub id: ::std::string::String, - // message oneof groups - pub one_of_name: ::std::option::Option, - pub one_of_desc: ::std::option::Option, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a UpdateWorkspaceParams { - fn default() -> &'a UpdateWorkspaceParams { - ::default_instance() - } -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateWorkspaceParams_oneof_one_of_name { - name(::std::string::String), -} - -#[derive(Clone,PartialEq,Debug)] -pub enum UpdateWorkspaceParams_oneof_one_of_desc { - desc(::std::string::String), -} - -impl UpdateWorkspaceParams { - pub fn new() -> UpdateWorkspaceParams { - ::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 name = 2; - - - pub fn get_name(&self) -> &str { - match self.one_of_name { - ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(ref v)) => v, - _ => "", - } - } - pub fn clear_name(&mut self) { - self.one_of_name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - match self.one_of_name { - ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(v)) - } - - // Mutable pointer to the field. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(_)) = self.one_of_name { - } else { - self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(::std::string::String::new())); - } - match self.one_of_name { - ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - if self.has_name() { - match self.one_of_name.take() { - ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } - - // string desc = 3; - - - pub fn get_desc(&self) -> &str { - match self.one_of_desc { - ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(ref v)) => v, - _ => "", - } - } - pub fn clear_desc(&mut self) { - self.one_of_desc = ::std::option::Option::None; - } - - pub fn has_desc(&self) -> bool { - match self.one_of_desc { - ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_desc(&mut self, v: ::std::string::String) { - self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(v)) - } - - // Mutable pointer to the field. - pub fn mut_desc(&mut self) -> &mut ::std::string::String { - if let ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(_)) = self.one_of_desc { - } else { - self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(::std::string::String::new())); - } - match self.one_of_desc { - ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_desc(&mut self) -> ::std::string::String { - if self.has_desc() { - match self.one_of_desc.take() { - ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(v)) => v, - _ => panic!(), - } - } else { - ::std::string::String::new() - } - } -} - -impl ::protobuf::Message for UpdateWorkspaceParams { - 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.id)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_name = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_name::name(is.read_string()?)); - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - self.one_of_desc = ::std::option::Option::Some(UpdateWorkspaceParams_oneof_one_of_desc::desc(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.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if let ::std::option::Option::Some(ref v) = self.one_of_name { - match v { - &UpdateWorkspaceParams_oneof_one_of_name::name(ref v) => { - my_size += ::protobuf::rt::string_size(2, &v); - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_desc { - match v { - &UpdateWorkspaceParams_oneof_one_of_desc::desc(ref v) => { - my_size += ::protobuf::rt::string_size(3, &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.id.is_empty() { - os.write_string(1, &self.id)?; - } - if let ::std::option::Option::Some(ref v) = self.one_of_name { - match v { - &UpdateWorkspaceParams_oneof_one_of_name::name(ref v) => { - os.write_string(2, v)?; - }, - }; - } - if let ::std::option::Option::Some(ref v) = self.one_of_desc { - match v { - &UpdateWorkspaceParams_oneof_one_of_desc::desc(ref v) => { - os.write_string(3, 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) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> UpdateWorkspaceParams { - UpdateWorkspaceParams::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: &UpdateWorkspaceParams| { &m.id }, - |m: &mut UpdateWorkspaceParams| { &mut m.id }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "name", - UpdateWorkspaceParams::has_name, - UpdateWorkspaceParams::get_name, - )); - fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>( - "desc", - UpdateWorkspaceParams::has_desc, - UpdateWorkspaceParams::get_desc, - )); - ::protobuf::reflect::MessageDescriptor::new_pb_name::( - "UpdateWorkspaceParams", - fields, - file_descriptor_proto() - ) - }) - } - - fn default_instance() -> &'static UpdateWorkspaceParams { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(UpdateWorkspaceParams::new) - } -} - -impl ::protobuf::Clear for UpdateWorkspaceParams { - fn clear(&mut self) { - self.id.clear(); - self.one_of_name = ::std::option::Option::None; - self.one_of_desc = ::std::option::Option::None; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for UpdateWorkspaceParams { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for UpdateWorkspaceParams { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x16workspace_update.proto\"r\n\x16UpdateWorkspaceRequest\x12\x0e\n\ - \x02id\x18\x01\x20\x01(\tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0\ - R\x04name\x12\x14\n\x04desc\x18\x03\x20\x01(\tH\x01R\x04descB\r\n\x0bone\ - _of_nameB\r\n\x0bone_of_desc\"q\n\x15UpdateWorkspaceParams\x12\x0e\n\x02\ - id\x18\x01\x20\x01(\tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\ - \x04name\x12\x14\n\x04desc\x18\x03\x20\x01(\tH\x01R\x04descB\r\n\x0bone_\ - of_nameB\r\n\x0bone_of_descJ\xf8\x03\n\x06\x12\x04\0\0\x0b\x01\n\x08\n\ - \x01\x0c\x12\x03\0\0\x12\n\n\n\x02\x04\0\x12\x04\x02\0\x06\x01\n\n\n\x03\ - \x04\0\x01\x12\x03\x02\x08\x1e\n\x0b\n\x04\x04\0\x02\0\x12\x03\x03\x04\ - \x12\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x03\x04\n\n\x0c\n\x05\x04\0\x02\ - \0\x01\x12\x03\x03\x0b\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03\x03\x10\x11\ - \n\x0b\n\x04\x04\0\x08\0\x12\x03\x04\x04*\n\x0c\n\x05\x04\0\x08\0\x01\ - \x12\x03\x04\n\x15\n\x0b\n\x04\x04\0\x02\x01\x12\x03\x04\x18(\n\x0c\n\ - \x05\x04\0\x02\x01\x05\x12\x03\x04\x18\x1e\n\x0c\n\x05\x04\0\x02\x01\x01\ - \x12\x03\x04\x1f#\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03\x04&'\n\x0b\n\ - \x04\x04\0\x08\x01\x12\x03\x05\x04*\n\x0c\n\x05\x04\0\x08\x01\x01\x12\ - \x03\x05\n\x15\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x05\x18(\n\x0c\n\x05\ - \x04\0\x02\x02\x05\x12\x03\x05\x18\x1e\n\x0c\n\x05\x04\0\x02\x02\x01\x12\ - \x03\x05\x1f#\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x05&'\n\n\n\x02\x04\ - \x01\x12\x04\x07\0\x0b\x01\n\n\n\x03\x04\x01\x01\x12\x03\x07\x08\x1d\n\ - \x0b\n\x04\x04\x01\x02\0\x12\x03\x08\x04\x12\n\x0c\n\x05\x04\x01\x02\0\ - \x05\x12\x03\x08\x04\n\n\x0c\n\x05\x04\x01\x02\0\x01\x12\x03\x08\x0b\r\n\ - \x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x08\x10\x11\n\x0b\n\x04\x04\x01\x08\ - \0\x12\x03\t\x04*\n\x0c\n\x05\x04\x01\x08\0\x01\x12\x03\t\n\x15\n\x0b\n\ - \x04\x04\x01\x02\x01\x12\x03\t\x18(\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\ - \x03\t\x18\x1e\n\x0c\n\x05\x04\x01\x02\x01\x01\x12\x03\t\x1f#\n\x0c\n\ - \x05\x04\x01\x02\x01\x03\x12\x03\t&'\n\x0b\n\x04\x04\x01\x08\x01\x12\x03\ - \n\x04*\n\x0c\n\x05\x04\x01\x08\x01\x01\x12\x03\n\n\x15\n\x0b\n\x04\x04\ - \x01\x02\x02\x12\x03\n\x18(\n\x0c\n\x05\x04\x01\x02\x02\x05\x12\x03\n\ - \x18\x1e\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x03\n\x1f#\n\x0c\n\x05\x04\ - \x01\x02\x02\x03\x12\x03\n&'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-core-data-model/src/protobuf/proto/app.proto b/shared-lib/flowy-core-data-model/src/protobuf/proto/app.proto new file mode 100644 index 0000000000..2a47f32c64 --- /dev/null +++ b/shared-lib/flowy-core-data-model/src/protobuf/proto/app.proto @@ -0,0 +1,51 @@ +syntax = "proto3"; +import "view.proto"; + +message App { + string id = 1; + string workspace_id = 2; + string name = 3; + string desc = 4; + RepeatedView belongings = 5; + int64 version = 6; + int64 modified_time = 7; + int64 create_time = 8; +} +message RepeatedApp { + repeated App items = 1; +} +message CreateAppRequest { + string workspace_id = 1; + string name = 2; + string desc = 3; + ColorStyle color_style = 4; +} +message ColorStyle { + string theme_color = 1; +} +message CreateAppParams { + string workspace_id = 1; + string name = 2; + string desc = 3; + ColorStyle color_style = 4; +} +message QueryAppRequest { + repeated string app_ids = 1; +} +message AppId { + string app_id = 1; +} +message UpdateAppRequest { + string app_id = 1; + oneof one_of_name { string name = 2; }; + oneof one_of_desc { string desc = 3; }; + oneof one_of_color_style { ColorStyle color_style = 4; }; + oneof one_of_is_trash { bool is_trash = 5; }; +} +message UpdateAppParams { + string app_id = 1; + oneof one_of_name { string name = 2; }; + oneof one_of_desc { string desc = 3; }; + oneof one_of_color_style { ColorStyle color_style = 4; }; + oneof one_of_is_trash { bool is_trash = 5; }; +} diff --git a/shared-lib/flowy-core-data-model/src/protobuf/proto/app_create.proto b/shared-lib/flowy-core-data-model/src/protobuf/proto/app_create.proto deleted file mode 100644 index bb15c6897b..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/proto/app_create.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; -import "view_create.proto"; - -message CreateAppRequest { - string workspace_id = 1; - string name = 2; - string desc = 3; - ColorStyle color_style = 4; -} -message ColorStyle { - string theme_color = 1; -} -message CreateAppParams { - string workspace_id = 1; - string name = 2; - string desc = 3; - ColorStyle color_style = 4; -} -message App { - string id = 1; - string workspace_id = 2; - string name = 3; - string desc = 4; - RepeatedView belongings = 5; - int64 version = 6; - int64 modified_time = 7; - int64 create_time = 8; -} -message RepeatedApp { - repeated App items = 1; -} diff --git a/shared-lib/flowy-core-data-model/src/protobuf/proto/app_query.proto b/shared-lib/flowy-core-data-model/src/protobuf/proto/app_query.proto deleted file mode 100644 index a702ad8037..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/proto/app_query.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -message QueryAppRequest { - repeated string app_ids = 1; -} -message AppId { - string app_id = 1; -} diff --git a/shared-lib/flowy-core-data-model/src/protobuf/proto/app_update.proto b/shared-lib/flowy-core-data-model/src/protobuf/proto/app_update.proto deleted file mode 100644 index e02dc1f6da..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/proto/app_update.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -import "app_create.proto"; - -message UpdateAppRequest { - string app_id = 1; - oneof one_of_name { string name = 2; }; - oneof one_of_desc { string desc = 3; }; - oneof one_of_color_style { ColorStyle color_style = 4; }; - oneof one_of_is_trash { bool is_trash = 5; }; -} -message UpdateAppParams { - string app_id = 1; - oneof one_of_name { string name = 2; }; - oneof one_of_desc { string desc = 3; }; - oneof one_of_color_style { ColorStyle color_style = 4; }; - oneof one_of_is_trash { bool is_trash = 5; }; -} diff --git a/shared-lib/flowy-core-data-model/src/protobuf/proto/export.proto b/shared-lib/flowy-core-data-model/src/protobuf/proto/share.proto similarity index 100% rename from shared-lib/flowy-core-data-model/src/protobuf/proto/export.proto rename to shared-lib/flowy-core-data-model/src/protobuf/proto/share.proto diff --git a/shared-lib/flowy-core-data-model/src/protobuf/proto/trash_create.proto b/shared-lib/flowy-core-data-model/src/protobuf/proto/trash.proto similarity index 100% rename from shared-lib/flowy-core-data-model/src/protobuf/proto/trash_create.proto rename to shared-lib/flowy-core-data-model/src/protobuf/proto/trash.proto diff --git a/shared-lib/flowy-core-data-model/src/protobuf/proto/view_create.proto b/shared-lib/flowy-core-data-model/src/protobuf/proto/view.proto similarity index 57% rename from shared-lib/flowy-core-data-model/src/protobuf/proto/view_create.proto rename to shared-lib/flowy-core-data-model/src/protobuf/proto/view.proto index 1534ca0e81..ba4aa0d7f3 100644 --- a/shared-lib/flowy-core-data-model/src/protobuf/proto/view_create.proto +++ b/shared-lib/flowy-core-data-model/src/protobuf/proto/view.proto @@ -1,5 +1,19 @@ syntax = "proto3"; +message View { + string id = 1; + string belong_to_id = 2; + string name = 3; + string desc = 4; + ViewType view_type = 5; + int64 version = 6; + RepeatedView belongings = 7; + int64 modified_time = 8; + int64 create_time = 9; +} +message RepeatedView { + repeated View items = 1; +} message CreateViewRequest { string belong_to_id = 1; string name = 2; @@ -16,19 +30,26 @@ message CreateViewParams { string view_data = 6; string view_id = 7; } -message View { - string id = 1; - string belong_to_id = 2; - string name = 3; - string desc = 4; - ViewType view_type = 5; - int64 version = 6; - RepeatedView belongings = 7; - int64 modified_time = 8; - int64 create_time = 9; +message QueryViewRequest { + repeated string view_ids = 1; } -message RepeatedView { - repeated View items = 1; +message ViewId { + string view_id = 1; +} +message RepeatedViewId { + repeated string items = 1; +} +message UpdateViewRequest { + string view_id = 1; + oneof one_of_name { string name = 2; }; + oneof one_of_desc { string desc = 3; }; + oneof one_of_thumbnail { string thumbnail = 4; }; +} +message UpdateViewParams { + string view_id = 1; + oneof one_of_name { string name = 2; }; + oneof one_of_desc { string desc = 3; }; + oneof one_of_thumbnail { string thumbnail = 4; }; } enum ViewType { Blank = 0; diff --git a/shared-lib/flowy-core-data-model/src/protobuf/proto/view_query.proto b/shared-lib/flowy-core-data-model/src/protobuf/proto/view_query.proto deleted file mode 100644 index c6993ffee7..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/proto/view_query.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -message QueryViewRequest { - repeated string view_ids = 1; -} -message ViewId { - string view_id = 1; -} -message RepeatedViewId { - repeated string items = 1; -} diff --git a/shared-lib/flowy-core-data-model/src/protobuf/proto/view_update.proto b/shared-lib/flowy-core-data-model/src/protobuf/proto/view_update.proto deleted file mode 100644 index ecbbda91c3..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/proto/view_update.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; - -message UpdateViewRequest { - string view_id = 1; - oneof one_of_name { string name = 2; }; - oneof one_of_desc { string desc = 3; }; - oneof one_of_thumbnail { string thumbnail = 4; }; -} -message UpdateViewParams { - string view_id = 1; - oneof one_of_name { string name = 2; }; - oneof one_of_desc { string desc = 3; }; - oneof one_of_thumbnail { string thumbnail = 4; }; -} diff --git a/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace.proto b/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace.proto new file mode 100644 index 0000000000..ed6803436d --- /dev/null +++ b/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace.proto @@ -0,0 +1,43 @@ +syntax = "proto3"; +import "app.proto"; +import "view.proto"; + +message Workspace { + string id = 1; + string name = 2; + string desc = 3; + RepeatedApp apps = 4; + int64 modified_time = 5; + int64 create_time = 6; +} +message RepeatedWorkspace { + repeated Workspace items = 1; +} +message CreateWorkspaceRequest { + string name = 1; + string desc = 2; +} +message CreateWorkspaceParams { + string name = 1; + string desc = 2; +} +message QueryWorkspaceRequest { + oneof one_of_workspace_id { string workspace_id = 1; }; +} +message WorkspaceId { + oneof one_of_workspace_id { string workspace_id = 1; }; +} +message CurrentWorkspaceSetting { + Workspace workspace = 1; + oneof one_of_latest_view { View latest_view = 2; }; +} +message UpdateWorkspaceRequest { + string id = 1; + oneof one_of_name { string name = 2; }; + oneof one_of_desc { string desc = 3; }; +} +message UpdateWorkspaceParams { + string id = 1; + oneof one_of_name { string name = 2; }; + oneof one_of_desc { string desc = 3; }; +} diff --git a/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_create.proto b/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_create.proto deleted file mode 100644 index 3d012ac959..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_create.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -import "app_create.proto"; - -message CreateWorkspaceRequest { - string name = 1; - string desc = 2; -} -message CreateWorkspaceParams { - string name = 1; - string desc = 2; -} -message Workspace { - string id = 1; - string name = 2; - string desc = 3; - RepeatedApp apps = 4; - int64 modified_time = 5; - int64 create_time = 6; -} -message RepeatedWorkspace { - repeated Workspace items = 1; -} diff --git a/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_query.proto b/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_query.proto deleted file mode 100644 index 9188249390..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_query.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -message QueryWorkspaceRequest { - oneof one_of_workspace_id { string workspace_id = 1; }; -} -message WorkspaceId { - oneof one_of_workspace_id { string workspace_id = 1; }; -} diff --git a/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_setting.proto b/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_setting.proto deleted file mode 100644 index 97e824d5d6..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_setting.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; -import "view_create.proto"; -import "workspace_create.proto"; - -message CurrentWorkspaceSetting { - Workspace workspace = 1; - oneof one_of_latest_view { View latest_view = 2; }; -} diff --git a/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_update.proto b/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_update.proto deleted file mode 100644 index d29db954e8..0000000000 --- a/shared-lib/flowy-core-data-model/src/protobuf/proto/workspace_update.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -message UpdateWorkspaceRequest { - string id = 1; - oneof one_of_name { string name = 2; }; - oneof one_of_desc { string desc = 3; }; -} -message UpdateWorkspaceParams { - string id = 1; - oneof one_of_name { string name = 2; }; - oneof one_of_desc { string desc = 3; }; -} diff --git a/shared-lib/flowy-derive/src/derive_cache/derive_cache.rs b/shared-lib/flowy-derive/src/derive_cache/derive_cache.rs index 9612eb975f..977c9054c9 100644 --- a/shared-lib/flowy-derive/src/derive_cache/derive_cache.rs +++ b/shared-lib/flowy-derive/src/derive_cache/derive_cache.rs @@ -44,45 +44,44 @@ pub fn category_from_str(type_str: &str) -> TypeCategory { | "DocumentClientWSData" | "DocumentServerWSData" | "NewDocumentUser" - | "QueryAppRequest" - | "AppId" + | "Workspace" + | "RepeatedWorkspace" + | "CreateWorkspaceRequest" + | "CreateWorkspaceParams" + | "QueryWorkspaceRequest" + | "WorkspaceId" + | "CurrentWorkspaceSetting" + | "UpdateWorkspaceRequest" + | "UpdateWorkspaceParams" + | "ExportRequest" + | "ExportData" + | "App" + | "RepeatedApp" | "CreateAppRequest" | "ColorStyle" | "CreateAppParams" - | "App" - | "RepeatedApp" + | "QueryAppRequest" + | "AppId" | "UpdateAppRequest" | "UpdateAppParams" - | "UpdateWorkspaceRequest" - | "UpdateWorkspaceParams" - | "CurrentWorkspaceSetting" - | "CreateWorkspaceRequest" - | "CreateWorkspaceParams" - | "Workspace" - | "RepeatedWorkspace" - | "QueryWorkspaceRequest" - | "WorkspaceId" | "RepeatedTrashId" | "TrashId" | "Trash" | "RepeatedTrash" - | "UpdateViewRequest" - | "UpdateViewParams" + | "View" + | "RepeatedView" + | "CreateViewRequest" + | "CreateViewParams" | "QueryViewRequest" | "ViewId" | "RepeatedViewId" - | "CreateViewRequest" - | "CreateViewParams" - | "View" - | "RepeatedView" - | "ExportRequest" - | "ExportData" + | "UpdateViewRequest" + | "UpdateViewParams" | "WSError" | "WebSocketRawMessage" => TypeCategory::Protobuf, "WorkspaceEvent" | "WorkspaceNotification" - | "DocObservable" | "FFIStatusCode" | "NetworkEvent" | "NetworkType" @@ -92,9 +91,9 @@ pub fn category_from_str(type_str: &str) -> TypeCategory { | "RevType" | "DocumentClientWSDataType" | "DocumentServerWSDataType" + | "ExportType" | "TrashType" | "ViewType" - | "ExportType" | "ErrorCode" | "WSModule" => TypeCategory::Enum,