mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: rename struct property
This commit is contained in:
parent
93695dc4be
commit
ed9a48fc1c
@ -1,12 +1,12 @@
|
||||
import 'package:dartz/dartz.dart';
|
||||
import 'package:flowy_sdk/dispatch/dispatch.dart';
|
||||
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show SignInRequest, SignUpRequest, UserProfile;
|
||||
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show SignInPayload, SignUpPayload, UserProfile;
|
||||
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
|
||||
|
||||
class AuthRepository {
|
||||
Future<Either<UserProfile, FlowyError>> signIn({required String? email, required String? password}) {
|
||||
//
|
||||
final request = SignInRequest.create()
|
||||
final request = SignInPayload.create()
|
||||
..email = email ?? ''
|
||||
..password = password ?? '';
|
||||
|
||||
@ -15,7 +15,7 @@ class AuthRepository {
|
||||
|
||||
Future<Either<UserProfile, FlowyError>> signUp(
|
||||
{required String? name, required String? password, required String? email}) {
|
||||
final request = SignUpRequest.create()
|
||||
final request = SignUpPayload.create()
|
||||
..email = email ?? ''
|
||||
..name = name ?? ''
|
||||
..password = password ?? '';
|
||||
|
@ -18,7 +18,7 @@ class AppRepository {
|
||||
});
|
||||
|
||||
Future<Either<App, FlowyError>> getAppDesc() {
|
||||
final request = QueryAppRequest.create()..appIds.add(appId);
|
||||
final request = AppId.create()..value = appId;
|
||||
|
||||
return FolderEventReadApp(request).send();
|
||||
}
|
||||
@ -28,7 +28,7 @@ class AppRepository {
|
||||
required String desc,
|
||||
required ViewType viewType,
|
||||
}) {
|
||||
final request = CreateViewRequest.create()
|
||||
final request = CreateViewPayload.create()
|
||||
..belongToId = appId
|
||||
..name = name
|
||||
..desc = desc
|
||||
@ -38,7 +38,7 @@ class AppRepository {
|
||||
}
|
||||
|
||||
Future<Either<List<View>, FlowyError>> getViews() {
|
||||
final request = QueryAppRequest.create()..appIds.add(appId);
|
||||
final request = AppId.create()..value = appId;
|
||||
|
||||
return FolderEventReadApp(request).send().then((result) {
|
||||
return result.fold(
|
||||
@ -49,12 +49,12 @@ class AppRepository {
|
||||
}
|
||||
|
||||
Future<Either<Unit, FlowyError>> delete() {
|
||||
final request = QueryAppRequest.create()..appIds.add(appId);
|
||||
final request = AppId.create()..value = appId;
|
||||
return FolderEventDeleteApp(request).send();
|
||||
}
|
||||
|
||||
Future<Either<Unit, FlowyError>> updateApp({String? name}) {
|
||||
UpdateAppRequest request = UpdateAppRequest.create()..appId = appId;
|
||||
UpdateAppPayload request = UpdateAppPayload.create()..appId = appId;
|
||||
|
||||
if (name != null) {
|
||||
request.name = name;
|
||||
|
@ -11,7 +11,7 @@ class DocumentRepository {
|
||||
});
|
||||
|
||||
Future<Either<DocumentDelta, FlowyError>> openDocument() {
|
||||
final request = ViewId(viewId: docId);
|
||||
final request = ViewId(value: docId);
|
||||
return FolderEventOpenView(request).send();
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ class DocumentRepository {
|
||||
}
|
||||
|
||||
Future<Either<Unit, FlowyError>> closeDocument() {
|
||||
final request = ViewId(viewId: docId);
|
||||
final request = ViewId(value: docId);
|
||||
return FolderEventCloseView(request).send();
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
|
||||
|
||||
class ShareRepo {
|
||||
Future<Either<ExportData, FlowyError>> export(String docId, ExportType type) {
|
||||
final request = ExportRequest.create()
|
||||
final request = ExportPayload.create()
|
||||
..docId = docId
|
||||
..exportType = type;
|
||||
|
||||
|
@ -37,7 +37,7 @@ class UserRepo {
|
||||
}
|
||||
|
||||
Future<Either<List<Workspace>, FlowyError>> getWorkspaces() {
|
||||
final request = QueryWorkspaceRequest.create();
|
||||
final request = WorkspaceId.create();
|
||||
|
||||
return FolderEventReadWorkspaces(request).send().then((result) {
|
||||
return result.fold(
|
||||
@ -48,7 +48,7 @@ class UserRepo {
|
||||
}
|
||||
|
||||
Future<Either<Workspace, FlowyError>> openWorkspace(String workspaceId) {
|
||||
final request = QueryWorkspaceRequest.create()..workspaceId = workspaceId;
|
||||
final request = WorkspaceId.create()..value = workspaceId;
|
||||
return FolderEventOpenWorkspace(request).send().then((result) {
|
||||
return result.fold(
|
||||
(workspace) => left(workspace),
|
||||
@ -58,7 +58,7 @@ class UserRepo {
|
||||
}
|
||||
|
||||
Future<Either<Workspace, FlowyError>> createWorkspace(String name, String desc) {
|
||||
final request = CreateWorkspaceRequest.create()
|
||||
final request = CreateWorkspacePayload.create()
|
||||
..name = name
|
||||
..desc = desc;
|
||||
return FolderEventCreateWorkspace(request).send().then((result) {
|
||||
|
@ -18,12 +18,12 @@ class ViewRepository {
|
||||
});
|
||||
|
||||
Future<Either<View, FlowyError>> readView() {
|
||||
final request = ViewId(viewId: view.id);
|
||||
final request = ViewId(value: view.id);
|
||||
return FolderEventReadView(request).send();
|
||||
}
|
||||
|
||||
Future<Either<View, FlowyError>> updateView({String? name, String? desc}) {
|
||||
final request = UpdateViewRequest.create()..viewId = view.id;
|
||||
final request = UpdateViewPayload.create()..viewId = view.id;
|
||||
|
||||
if (name != null) {
|
||||
request.name = name;
|
||||
@ -42,7 +42,7 @@ class ViewRepository {
|
||||
}
|
||||
|
||||
Future<Either<Unit, FlowyError>> duplicate() {
|
||||
final request = ViewId(viewId: view.id);
|
||||
final request = ViewId(value: view.id);
|
||||
return FolderEventDuplicateView(request).send();
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class WorkspaceRepo {
|
||||
});
|
||||
|
||||
Future<Either<App, FlowyError>> createApp(String name, String desc) {
|
||||
final request = CreateAppRequest.create()
|
||||
final request = CreateAppPayload.create()
|
||||
..name = name
|
||||
..workspaceId = workspaceId
|
||||
..desc = desc;
|
||||
@ -33,7 +33,7 @@ class WorkspaceRepo {
|
||||
}
|
||||
|
||||
Future<Either<Workspace, FlowyError>> getWorkspace() {
|
||||
final request = QueryWorkspaceRequest.create()..workspaceId = workspaceId;
|
||||
final request = WorkspaceId.create()..value = workspaceId;
|
||||
return FolderEventReadWorkspaces(request).send().then((result) {
|
||||
return result.fold(
|
||||
(workspaces) {
|
||||
@ -51,7 +51,7 @@ class WorkspaceRepo {
|
||||
}
|
||||
|
||||
Future<Either<List<App>, FlowyError>> getApps() {
|
||||
final request = QueryWorkspaceRequest.create()..workspaceId = workspaceId;
|
||||
final request = WorkspaceId.create()..value = workspaceId;
|
||||
return FolderEventReadWorkspaceApps(request).send().then((result) {
|
||||
return result.fold(
|
||||
(apps) => left(apps.items),
|
||||
|
@ -2,7 +2,7 @@
|
||||
/// Auto generate. Do not edit
|
||||
part of '../../dispatch.dart';
|
||||
class FolderEventCreateWorkspace {
|
||||
CreateWorkspaceRequest request;
|
||||
CreateWorkspacePayload request;
|
||||
FolderEventCreateWorkspace(this.request);
|
||||
|
||||
Future<Either<Workspace, FlowyError>> send() {
|
||||
@ -33,7 +33,7 @@ class FolderEventReadCurWorkspace {
|
||||
}
|
||||
|
||||
class FolderEventReadWorkspaces {
|
||||
QueryWorkspaceRequest request;
|
||||
WorkspaceId request;
|
||||
FolderEventReadWorkspaces(this.request);
|
||||
|
||||
Future<Either<RepeatedWorkspace, FlowyError>> send() {
|
||||
@ -50,7 +50,7 @@ class FolderEventReadWorkspaces {
|
||||
}
|
||||
|
||||
class FolderEventDeleteWorkspace {
|
||||
QueryWorkspaceRequest request;
|
||||
WorkspaceId request;
|
||||
FolderEventDeleteWorkspace(this.request);
|
||||
|
||||
Future<Either<Unit, FlowyError>> send() {
|
||||
@ -67,7 +67,7 @@ class FolderEventDeleteWorkspace {
|
||||
}
|
||||
|
||||
class FolderEventOpenWorkspace {
|
||||
QueryWorkspaceRequest request;
|
||||
WorkspaceId request;
|
||||
FolderEventOpenWorkspace(this.request);
|
||||
|
||||
Future<Either<Workspace, FlowyError>> send() {
|
||||
@ -84,7 +84,7 @@ class FolderEventOpenWorkspace {
|
||||
}
|
||||
|
||||
class FolderEventReadWorkspaceApps {
|
||||
QueryWorkspaceRequest request;
|
||||
WorkspaceId request;
|
||||
FolderEventReadWorkspaceApps(this.request);
|
||||
|
||||
Future<Either<RepeatedApp, FlowyError>> send() {
|
||||
@ -101,7 +101,7 @@ class FolderEventReadWorkspaceApps {
|
||||
}
|
||||
|
||||
class FolderEventCreateApp {
|
||||
CreateAppRequest request;
|
||||
CreateAppPayload request;
|
||||
FolderEventCreateApp(this.request);
|
||||
|
||||
Future<Either<App, FlowyError>> send() {
|
||||
@ -118,7 +118,7 @@ class FolderEventCreateApp {
|
||||
}
|
||||
|
||||
class FolderEventDeleteApp {
|
||||
QueryAppRequest request;
|
||||
AppId request;
|
||||
FolderEventDeleteApp(this.request);
|
||||
|
||||
Future<Either<Unit, FlowyError>> send() {
|
||||
@ -135,7 +135,7 @@ class FolderEventDeleteApp {
|
||||
}
|
||||
|
||||
class FolderEventReadApp {
|
||||
QueryAppRequest request;
|
||||
AppId request;
|
||||
FolderEventReadApp(this.request);
|
||||
|
||||
Future<Either<App, FlowyError>> send() {
|
||||
@ -152,7 +152,7 @@ class FolderEventReadApp {
|
||||
}
|
||||
|
||||
class FolderEventUpdateApp {
|
||||
UpdateAppRequest request;
|
||||
UpdateAppPayload request;
|
||||
FolderEventUpdateApp(this.request);
|
||||
|
||||
Future<Either<Unit, FlowyError>> send() {
|
||||
@ -169,7 +169,7 @@ class FolderEventUpdateApp {
|
||||
}
|
||||
|
||||
class FolderEventCreateView {
|
||||
CreateViewRequest request;
|
||||
CreateViewPayload request;
|
||||
FolderEventCreateView(this.request);
|
||||
|
||||
Future<Either<View, FlowyError>> send() {
|
||||
@ -203,7 +203,7 @@ class FolderEventReadView {
|
||||
}
|
||||
|
||||
class FolderEventUpdateView {
|
||||
UpdateViewRequest request;
|
||||
UpdateViewPayload request;
|
||||
FolderEventUpdateView(this.request);
|
||||
|
||||
Future<Either<View, FlowyError>> send() {
|
||||
@ -395,7 +395,7 @@ class FolderEventApplyDocDelta {
|
||||
}
|
||||
|
||||
class FolderEventExportDocument {
|
||||
ExportRequest request;
|
||||
ExportPayload request;
|
||||
FolderEventExportDocument(this.request);
|
||||
|
||||
Future<Either<ExportData, FlowyError>> send() {
|
||||
|
@ -16,7 +16,7 @@ class UserEventInitUser {
|
||||
}
|
||||
|
||||
class UserEventSignIn {
|
||||
SignInRequest request;
|
||||
SignInPayload request;
|
||||
UserEventSignIn(this.request);
|
||||
|
||||
Future<Either<UserProfile, FlowyError>> send() {
|
||||
@ -33,7 +33,7 @@ class UserEventSignIn {
|
||||
}
|
||||
|
||||
class UserEventSignUp {
|
||||
SignUpRequest request;
|
||||
SignUpPayload request;
|
||||
UserEventSignUp(this.request);
|
||||
|
||||
Future<Either<UserProfile, FlowyError>> send() {
|
||||
@ -64,7 +64,7 @@ class UserEventSignOut {
|
||||
}
|
||||
|
||||
class UserEventUpdateUser {
|
||||
UpdateUserRequest request;
|
||||
UpdateUserPayload request;
|
||||
UserEventUpdateUser(this.request);
|
||||
|
||||
Future<Either<Unit, FlowyError>> send() {
|
||||
|
@ -365,17 +365,17 @@ class NewDocUser extends $pb.GeneratedMessage {
|
||||
|
||||
class DocumentId extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'DocumentId', createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'docId')
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
DocumentId._() : super();
|
||||
factory DocumentId({
|
||||
$core.String? docId,
|
||||
$core.String? value,
|
||||
}) {
|
||||
final _result = create();
|
||||
if (docId != null) {
|
||||
_result.docId = docId;
|
||||
if (value != null) {
|
||||
_result.value = value;
|
||||
}
|
||||
return _result;
|
||||
}
|
||||
@ -401,12 +401,12 @@ class DocumentId extends $pb.GeneratedMessage {
|
||||
static DocumentId? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
$core.String get docId => $_getSZ(0);
|
||||
$core.String get value => $_getSZ(0);
|
||||
@$pb.TagNumber(1)
|
||||
set docId($core.String v) { $_setString(0, v); }
|
||||
set value($core.String v) { $_setString(0, v); }
|
||||
@$pb.TagNumber(1)
|
||||
$core.bool hasDocId() => $_has(0);
|
||||
$core.bool hasValue() => $_has(0);
|
||||
@$pb.TagNumber(1)
|
||||
void clearDocId() => clearField(1);
|
||||
void clearValue() => clearField(1);
|
||||
}
|
||||
|
||||
|
@ -70,9 +70,9 @@ final $typed_data.Uint8List newDocUserDescriptor = $convert.base64Decode('CgpOZX
|
||||
const DocumentId$json = const {
|
||||
'1': 'DocumentId',
|
||||
'2': const [
|
||||
const {'1': 'doc_id', '3': 1, '4': 1, '5': 9, '10': 'docId'},
|
||||
const {'1': 'value', '3': 1, '4': 1, '5': 9, '10': 'value'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `DocumentId`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List documentIdDescriptor = $convert.base64Decode('CgpEb2N1bWVudElkEhUKBmRvY19pZBgBIAEoCVIFZG9jSWQ=');
|
||||
final $typed_data.Uint8List documentIdDescriptor = $convert.base64Decode('CgpEb2N1bWVudElkEhQKBXZhbHVlGAEgASgJUgV2YWx1ZQ==');
|
||||
|
@ -200,8 +200,8 @@ class RepeatedApp extends $pb.GeneratedMessage {
|
||||
$core.List<App> 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)
|
||||
class CreateAppPayload extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateAppPayload', createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'workspaceId')
|
||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
||||
..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'desc')
|
||||
@ -209,8 +209,8 @@ class CreateAppRequest extends $pb.GeneratedMessage {
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
CreateAppRequest._() : super();
|
||||
factory CreateAppRequest({
|
||||
CreateAppPayload._() : super();
|
||||
factory CreateAppPayload({
|
||||
$core.String? workspaceId,
|
||||
$core.String? name,
|
||||
$core.String? desc,
|
||||
@ -231,26 +231,26 @@ class CreateAppRequest extends $pb.GeneratedMessage {
|
||||
}
|
||||
return _result;
|
||||
}
|
||||
factory CreateAppRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory CreateAppRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
factory CreateAppPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory CreateAppPayload.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')
|
||||
CreateAppRequest clone() => CreateAppRequest()..mergeFromMessage(this);
|
||||
CreateAppPayload clone() => CreateAppPayload()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
CreateAppRequest copyWith(void Function(CreateAppRequest) updates) => super.copyWith((message) => updates(message as CreateAppRequest)) as CreateAppRequest; // ignore: deprecated_member_use
|
||||
CreateAppPayload copyWith(void Function(CreateAppPayload) updates) => super.copyWith((message) => updates(message as CreateAppPayload)) as CreateAppPayload; // ignore: deprecated_member_use
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static CreateAppRequest create() => CreateAppRequest._();
|
||||
CreateAppRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<CreateAppRequest> createRepeated() => $pb.PbList<CreateAppRequest>();
|
||||
static CreateAppPayload create() => CreateAppPayload._();
|
||||
CreateAppPayload createEmptyInstance() => create();
|
||||
static $pb.PbList<CreateAppPayload> createRepeated() => $pb.PbList<CreateAppPayload>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static CreateAppRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<CreateAppRequest>(create);
|
||||
static CreateAppRequest? _defaultInstance;
|
||||
static CreateAppPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<CreateAppPayload>(create);
|
||||
static CreateAppPayload? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
$core.String get workspaceId => $_getSZ(0);
|
||||
@ -429,60 +429,19 @@ class CreateAppParams extends $pb.GeneratedMessage {
|
||||
ColorStyle ensureColorStyle() => $_ensure(3);
|
||||
}
|
||||
|
||||
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<QueryAppRequest> createRepeated() => $pb.PbList<QueryAppRequest>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static QueryAppRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<QueryAppRequest>(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')
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
AppId._() : super();
|
||||
factory AppId({
|
||||
$core.String? appId,
|
||||
$core.String? value,
|
||||
}) {
|
||||
final _result = create();
|
||||
if (appId != null) {
|
||||
_result.appId = appId;
|
||||
if (value != null) {
|
||||
_result.value = value;
|
||||
}
|
||||
return _result;
|
||||
}
|
||||
@ -508,53 +467,53 @@ class AppId extends $pb.GeneratedMessage {
|
||||
static AppId? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
$core.String get appId => $_getSZ(0);
|
||||
$core.String get value => $_getSZ(0);
|
||||
@$pb.TagNumber(1)
|
||||
set appId($core.String v) { $_setString(0, v); }
|
||||
set value($core.String v) { $_setString(0, v); }
|
||||
@$pb.TagNumber(1)
|
||||
$core.bool hasAppId() => $_has(0);
|
||||
$core.bool hasValue() => $_has(0);
|
||||
@$pb.TagNumber(1)
|
||||
void clearAppId() => clearField(1);
|
||||
void clearValue() => clearField(1);
|
||||
}
|
||||
|
||||
enum UpdateAppRequest_OneOfName {
|
||||
enum UpdateAppPayload_OneOfName {
|
||||
name,
|
||||
notSet
|
||||
}
|
||||
|
||||
enum UpdateAppRequest_OneOfDesc {
|
||||
enum UpdateAppPayload_OneOfDesc {
|
||||
desc,
|
||||
notSet
|
||||
}
|
||||
|
||||
enum UpdateAppRequest_OneOfColorStyle {
|
||||
enum UpdateAppPayload_OneOfColorStyle {
|
||||
colorStyle,
|
||||
notSet
|
||||
}
|
||||
|
||||
enum UpdateAppRequest_OneOfIsTrash {
|
||||
enum UpdateAppPayload_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
|
||||
class UpdateAppPayload extends $pb.GeneratedMessage {
|
||||
static const $core.Map<$core.int, UpdateAppPayload_OneOfName> _UpdateAppPayload_OneOfNameByTag = {
|
||||
2 : UpdateAppPayload_OneOfName.name,
|
||||
0 : UpdateAppPayload_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, UpdateAppPayload_OneOfDesc> _UpdateAppPayload_OneOfDescByTag = {
|
||||
3 : UpdateAppPayload_OneOfDesc.desc,
|
||||
0 : UpdateAppPayload_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, UpdateAppPayload_OneOfColorStyle> _UpdateAppPayload_OneOfColorStyleByTag = {
|
||||
4 : UpdateAppPayload_OneOfColorStyle.colorStyle,
|
||||
0 : UpdateAppPayload_OneOfColorStyle.notSet
|
||||
};
|
||||
static const $core.Map<$core.int, UpdateAppRequest_OneOfIsTrash> _UpdateAppRequest_OneOfIsTrashByTag = {
|
||||
5 : UpdateAppRequest_OneOfIsTrash.isTrash,
|
||||
0 : UpdateAppRequest_OneOfIsTrash.notSet
|
||||
static const $core.Map<$core.int, UpdateAppPayload_OneOfIsTrash> _UpdateAppPayload_OneOfIsTrashByTag = {
|
||||
5 : UpdateAppPayload_OneOfIsTrash.isTrash,
|
||||
0 : UpdateAppPayload_OneOfIsTrash.notSet
|
||||
};
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateAppRequest', createEmptyInstance: create)
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateAppPayload', createEmptyInstance: create)
|
||||
..oo(0, [2])
|
||||
..oo(1, [3])
|
||||
..oo(2, [4])
|
||||
@ -567,8 +526,8 @@ class UpdateAppRequest extends $pb.GeneratedMessage {
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
UpdateAppRequest._() : super();
|
||||
factory UpdateAppRequest({
|
||||
UpdateAppPayload._() : super();
|
||||
factory UpdateAppPayload({
|
||||
$core.String? appId,
|
||||
$core.String? name,
|
||||
$core.String? desc,
|
||||
@ -593,37 +552,37 @@ class UpdateAppRequest extends $pb.GeneratedMessage {
|
||||
}
|
||||
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);
|
||||
factory UpdateAppPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory UpdateAppPayload.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);
|
||||
UpdateAppPayload clone() => UpdateAppPayload()..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
|
||||
UpdateAppPayload copyWith(void Function(UpdateAppPayload) updates) => super.copyWith((message) => updates(message as UpdateAppPayload)) as UpdateAppPayload; // ignore: deprecated_member_use
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static UpdateAppRequest create() => UpdateAppRequest._();
|
||||
UpdateAppRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<UpdateAppRequest> createRepeated() => $pb.PbList<UpdateAppRequest>();
|
||||
static UpdateAppPayload create() => UpdateAppPayload._();
|
||||
UpdateAppPayload createEmptyInstance() => create();
|
||||
static $pb.PbList<UpdateAppPayload> createRepeated() => $pb.PbList<UpdateAppPayload>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static UpdateAppRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UpdateAppRequest>(create);
|
||||
static UpdateAppRequest? _defaultInstance;
|
||||
static UpdateAppPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UpdateAppPayload>(create);
|
||||
static UpdateAppPayload? _defaultInstance;
|
||||
|
||||
UpdateAppRequest_OneOfName whichOneOfName() => _UpdateAppRequest_OneOfNameByTag[$_whichOneof(0)]!;
|
||||
UpdateAppPayload_OneOfName whichOneOfName() => _UpdateAppPayload_OneOfNameByTag[$_whichOneof(0)]!;
|
||||
void clearOneOfName() => clearField($_whichOneof(0));
|
||||
|
||||
UpdateAppRequest_OneOfDesc whichOneOfDesc() => _UpdateAppRequest_OneOfDescByTag[$_whichOneof(1)]!;
|
||||
UpdateAppPayload_OneOfDesc whichOneOfDesc() => _UpdateAppPayload_OneOfDescByTag[$_whichOneof(1)]!;
|
||||
void clearOneOfDesc() => clearField($_whichOneof(1));
|
||||
|
||||
UpdateAppRequest_OneOfColorStyle whichOneOfColorStyle() => _UpdateAppRequest_OneOfColorStyleByTag[$_whichOneof(2)]!;
|
||||
UpdateAppPayload_OneOfColorStyle whichOneOfColorStyle() => _UpdateAppPayload_OneOfColorStyleByTag[$_whichOneof(2)]!;
|
||||
void clearOneOfColorStyle() => clearField($_whichOneof(2));
|
||||
|
||||
UpdateAppRequest_OneOfIsTrash whichOneOfIsTrash() => _UpdateAppRequest_OneOfIsTrashByTag[$_whichOneof(3)]!;
|
||||
UpdateAppPayload_OneOfIsTrash whichOneOfIsTrash() => _UpdateAppPayload_OneOfIsTrashByTag[$_whichOneof(3)]!;
|
||||
void clearOneOfIsTrash() => clearField($_whichOneof(3));
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
|
@ -35,9 +35,9 @@ const RepeatedApp$json = const {
|
||||
|
||||
/// 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',
|
||||
@$core.Deprecated('Use createAppPayloadDescriptor instead')
|
||||
const CreateAppPayload$json = const {
|
||||
'1': 'CreateAppPayload',
|
||||
'2': const [
|
||||
const {'1': 'workspace_id', '3': 1, '4': 1, '5': 9, '10': 'workspaceId'},
|
||||
const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},
|
||||
@ -46,8 +46,8 @@ const CreateAppRequest$json = const {
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `CreateAppRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List createAppRequestDescriptor = $convert.base64Decode('ChBDcmVhdGVBcHBSZXF1ZXN0EiEKDHdvcmtzcGFjZV9pZBgBIAEoCVILd29ya3NwYWNlSWQSEgoEbmFtZRgCIAEoCVIEbmFtZRISCgRkZXNjGAMgASgJUgRkZXNjEiwKC2NvbG9yX3N0eWxlGAQgASgLMgsuQ29sb3JTdHlsZVIKY29sb3JTdHlsZQ==');
|
||||
/// Descriptor for `CreateAppPayload`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List createAppPayloadDescriptor = $convert.base64Decode('ChBDcmVhdGVBcHBQYXlsb2FkEiEKDHdvcmtzcGFjZV9pZBgBIAEoCVILd29ya3NwYWNlSWQSEgoEbmFtZRgCIAEoCVIEbmFtZRISCgRkZXNjGAMgASgJUgRkZXNjEiwKC2NvbG9yX3N0eWxlGAQgASgLMgsuQ29sb3JTdHlsZVIKY29sb3JTdHlsZQ==');
|
||||
@$core.Deprecated('Use colorStyleDescriptor instead')
|
||||
const ColorStyle$json = const {
|
||||
'1': 'ColorStyle',
|
||||
@ -71,29 +71,19 @@ const CreateAppParams$json = const {
|
||||
|
||||
/// Descriptor for `CreateAppParams`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List createAppParamsDescriptor = $convert.base64Decode('Cg9DcmVhdGVBcHBQYXJhbXMSIQoMd29ya3NwYWNlX2lkGAEgASgJUgt3b3Jrc3BhY2VJZBISCgRuYW1lGAIgASgJUgRuYW1lEhIKBGRlc2MYAyABKAlSBGRlc2MSLAoLY29sb3Jfc3R5bGUYBCABKAsyCy5Db2xvclN0eWxlUgpjb2xvclN0eWxl');
|
||||
@$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'},
|
||||
const {'1': 'value', '3': 1, '4': 1, '5': 9, '10': 'value'},
|
||||
],
|
||||
};
|
||||
|
||||
/// 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',
|
||||
final $typed_data.Uint8List appIdDescriptor = $convert.base64Decode('CgVBcHBJZBIUCgV2YWx1ZRgBIAEoCVIFdmFsdWU=');
|
||||
@$core.Deprecated('Use updateAppPayloadDescriptor instead')
|
||||
const UpdateAppPayload$json = const {
|
||||
'1': 'UpdateAppPayload',
|
||||
'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'},
|
||||
@ -109,8 +99,8 @@ const UpdateAppRequest$json = const {
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `UpdateAppRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List updateAppRequestDescriptor = $convert.base64Decode('ChBVcGRhdGVBcHBSZXF1ZXN0EhUKBmFwcF9pZBgBIAEoCVIFYXBwSWQSFAoEbmFtZRgCIAEoCUgAUgRuYW1lEhQKBGRlc2MYAyABKAlIAVIEZGVzYxIuCgtjb2xvcl9zdHlsZRgEIAEoCzILLkNvbG9yU3R5bGVIAlIKY29sb3JTdHlsZRIbCghpc190cmFzaBgFIAEoCEgDUgdpc1RyYXNoQg0KC29uZV9vZl9uYW1lQg0KC29uZV9vZl9kZXNjQhQKEm9uZV9vZl9jb2xvcl9zdHlsZUIRCg9vbmVfb2ZfaXNfdHJhc2g=');
|
||||
/// Descriptor for `UpdateAppPayload`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List updateAppPayloadDescriptor = $convert.base64Decode('ChBVcGRhdGVBcHBQYXlsb2FkEhUKBmFwcF9pZBgBIAEoCVIFYXBwSWQSFAoEbmFtZRgCIAEoCUgAUgRuYW1lEhQKBGRlc2MYAyABKAlIAVIEZGVzYxIuCgtjb2xvcl9zdHlsZRgEIAEoCzILLkNvbG9yU3R5bGVIAlIKY29sb3JTdHlsZRIbCghpc190cmFzaBgFIAEoCEgDUgdpc1RyYXNoQg0KC29uZV9vZl9uYW1lQg0KC29uZV9vZl9kZXNjQhQKEm9uZV9vZl9jb2xvcl9zdHlsZUIRCg9vbmVfb2ZfaXNfdHJhc2g=');
|
||||
@$core.Deprecated('Use updateAppParamsDescriptor instead')
|
||||
const UpdateAppParams$json = const {
|
||||
'1': 'UpdateAppParams',
|
||||
|
@ -13,15 +13,15 @@ import 'share.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)
|
||||
class ExportPayload extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ExportPayload', createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'docId')
|
||||
..e<ExportType>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'exportType', $pb.PbFieldType.OE, defaultOrMaker: ExportType.Text, valueOf: ExportType.valueOf, enumValues: ExportType.values)
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
ExportRequest._() : super();
|
||||
factory ExportRequest({
|
||||
ExportPayload._() : super();
|
||||
factory ExportPayload({
|
||||
$core.String? docId,
|
||||
ExportType? exportType,
|
||||
}) {
|
||||
@ -34,26 +34,26 @@ class ExportRequest extends $pb.GeneratedMessage {
|
||||
}
|
||||
return _result;
|
||||
}
|
||||
factory ExportRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory ExportRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
factory ExportPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory ExportPayload.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')
|
||||
ExportRequest clone() => ExportRequest()..mergeFromMessage(this);
|
||||
ExportPayload clone() => ExportPayload()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
ExportRequest copyWith(void Function(ExportRequest) updates) => super.copyWith((message) => updates(message as ExportRequest)) as ExportRequest; // ignore: deprecated_member_use
|
||||
ExportPayload copyWith(void Function(ExportPayload) updates) => super.copyWith((message) => updates(message as ExportPayload)) as ExportPayload; // ignore: deprecated_member_use
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static ExportRequest create() => ExportRequest._();
|
||||
ExportRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<ExportRequest> createRepeated() => $pb.PbList<ExportRequest>();
|
||||
static ExportPayload create() => ExportPayload._();
|
||||
ExportPayload createEmptyInstance() => create();
|
||||
static $pb.PbList<ExportPayload> createRepeated() => $pb.PbList<ExportPayload>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static ExportRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ExportRequest>(create);
|
||||
static ExportRequest? _defaultInstance;
|
||||
static ExportPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ExportPayload>(create);
|
||||
static ExportPayload? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
$core.String get docId => $_getSZ(0);
|
||||
|
@ -20,17 +20,17 @@ const ExportType$json = const {
|
||||
|
||||
/// Descriptor for `ExportType`. Decode as a `google.protobuf.EnumDescriptorProto`.
|
||||
final $typed_data.Uint8List exportTypeDescriptor = $convert.base64Decode('CgpFeHBvcnRUeXBlEggKBFRleHQQABIMCghNYXJrZG93bhABEggKBExpbmsQAg==');
|
||||
@$core.Deprecated('Use exportRequestDescriptor instead')
|
||||
const ExportRequest$json = const {
|
||||
'1': 'ExportRequest',
|
||||
@$core.Deprecated('Use exportPayloadDescriptor instead')
|
||||
const ExportPayload$json = const {
|
||||
'1': 'ExportPayload',
|
||||
'2': const [
|
||||
const {'1': 'doc_id', '3': 1, '4': 1, '5': 9, '10': 'docId'},
|
||||
const {'1': 'export_type', '3': 2, '4': 1, '5': 14, '6': '.ExportType', '10': 'exportType'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `ExportRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List exportRequestDescriptor = $convert.base64Decode('Cg1FeHBvcnRSZXF1ZXN0EhUKBmRvY19pZBgBIAEoCVIFZG9jSWQSLAoLZXhwb3J0X3R5cGUYAiABKA4yCy5FeHBvcnRUeXBlUgpleHBvcnRUeXBl');
|
||||
/// Descriptor for `ExportPayload`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List exportPayloadDescriptor = $convert.base64Decode('Cg1FeHBvcnRQYXlsb2FkEhUKBmRvY19pZBgBIAEoCVIFZG9jSWQSLAoLZXhwb3J0X3R5cGUYAiABKA4yCy5FeHBvcnRUeXBlUgpleHBvcnRUeXBl');
|
||||
@$core.Deprecated('Use exportDataDescriptor instead')
|
||||
const ExportData$json = const {
|
||||
'1': 'ExportData',
|
||||
|
@ -216,17 +216,17 @@ class RepeatedView extends $pb.GeneratedMessage {
|
||||
$core.List<View> get items => $_getList(0);
|
||||
}
|
||||
|
||||
enum CreateViewRequest_OneOfThumbnail {
|
||||
enum CreateViewPayload_OneOfThumbnail {
|
||||
thumbnail,
|
||||
notSet
|
||||
}
|
||||
|
||||
class CreateViewRequest extends $pb.GeneratedMessage {
|
||||
static const $core.Map<$core.int, CreateViewRequest_OneOfThumbnail> _CreateViewRequest_OneOfThumbnailByTag = {
|
||||
4 : CreateViewRequest_OneOfThumbnail.thumbnail,
|
||||
0 : CreateViewRequest_OneOfThumbnail.notSet
|
||||
class CreateViewPayload extends $pb.GeneratedMessage {
|
||||
static const $core.Map<$core.int, CreateViewPayload_OneOfThumbnail> _CreateViewPayload_OneOfThumbnailByTag = {
|
||||
4 : CreateViewPayload_OneOfThumbnail.thumbnail,
|
||||
0 : CreateViewPayload_OneOfThumbnail.notSet
|
||||
};
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateViewRequest', createEmptyInstance: create)
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateViewPayload', createEmptyInstance: create)
|
||||
..oo(0, [4])
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'belongToId')
|
||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
||||
@ -236,8 +236,8 @@ class CreateViewRequest extends $pb.GeneratedMessage {
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
CreateViewRequest._() : super();
|
||||
factory CreateViewRequest({
|
||||
CreateViewPayload._() : super();
|
||||
factory CreateViewPayload({
|
||||
$core.String? belongToId,
|
||||
$core.String? name,
|
||||
$core.String? desc,
|
||||
@ -262,28 +262,28 @@ class CreateViewRequest extends $pb.GeneratedMessage {
|
||||
}
|
||||
return _result;
|
||||
}
|
||||
factory CreateViewRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory CreateViewRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
factory CreateViewPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory CreateViewPayload.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')
|
||||
CreateViewRequest clone() => CreateViewRequest()..mergeFromMessage(this);
|
||||
CreateViewPayload clone() => CreateViewPayload()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
CreateViewRequest copyWith(void Function(CreateViewRequest) updates) => super.copyWith((message) => updates(message as CreateViewRequest)) as CreateViewRequest; // ignore: deprecated_member_use
|
||||
CreateViewPayload copyWith(void Function(CreateViewPayload) updates) => super.copyWith((message) => updates(message as CreateViewPayload)) as CreateViewPayload; // ignore: deprecated_member_use
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static CreateViewRequest create() => CreateViewRequest._();
|
||||
CreateViewRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<CreateViewRequest> createRepeated() => $pb.PbList<CreateViewRequest>();
|
||||
static CreateViewPayload create() => CreateViewPayload._();
|
||||
CreateViewPayload createEmptyInstance() => create();
|
||||
static $pb.PbList<CreateViewPayload> createRepeated() => $pb.PbList<CreateViewPayload>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static CreateViewRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<CreateViewRequest>(create);
|
||||
static CreateViewRequest? _defaultInstance;
|
||||
static CreateViewPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<CreateViewPayload>(create);
|
||||
static CreateViewPayload? _defaultInstance;
|
||||
|
||||
CreateViewRequest_OneOfThumbnail whichOneOfThumbnail() => _CreateViewRequest_OneOfThumbnailByTag[$_whichOneof(0)]!;
|
||||
CreateViewPayload_OneOfThumbnail whichOneOfThumbnail() => _CreateViewPayload_OneOfThumbnailByTag[$_whichOneof(0)]!;
|
||||
void clearOneOfThumbnail() => clearField($_whichOneof(0));
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
@ -465,17 +465,17 @@ class CreateViewParams extends $pb.GeneratedMessage {
|
||||
|
||||
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')
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
ViewId._() : super();
|
||||
factory ViewId({
|
||||
$core.String? viewId,
|
||||
$core.String? value,
|
||||
}) {
|
||||
final _result = create();
|
||||
if (viewId != null) {
|
||||
_result.viewId = viewId;
|
||||
if (value != null) {
|
||||
_result.value = value;
|
||||
}
|
||||
return _result;
|
||||
}
|
||||
@ -501,13 +501,13 @@ class ViewId extends $pb.GeneratedMessage {
|
||||
static ViewId? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
$core.String get viewId => $_getSZ(0);
|
||||
$core.String get value => $_getSZ(0);
|
||||
@$pb.TagNumber(1)
|
||||
set viewId($core.String v) { $_setString(0, v); }
|
||||
set value($core.String v) { $_setString(0, v); }
|
||||
@$pb.TagNumber(1)
|
||||
$core.bool hasViewId() => $_has(0);
|
||||
$core.bool hasValue() => $_has(0);
|
||||
@$pb.TagNumber(1)
|
||||
void clearViewId() => clearField(1);
|
||||
void clearValue() => clearField(1);
|
||||
}
|
||||
|
||||
class RepeatedViewId extends $pb.GeneratedMessage {
|
||||
@ -551,35 +551,35 @@ class RepeatedViewId extends $pb.GeneratedMessage {
|
||||
$core.List<$core.String> get items => $_getList(0);
|
||||
}
|
||||
|
||||
enum UpdateViewRequest_OneOfName {
|
||||
enum UpdateViewPayload_OneOfName {
|
||||
name,
|
||||
notSet
|
||||
}
|
||||
|
||||
enum UpdateViewRequest_OneOfDesc {
|
||||
enum UpdateViewPayload_OneOfDesc {
|
||||
desc,
|
||||
notSet
|
||||
}
|
||||
|
||||
enum UpdateViewRequest_OneOfThumbnail {
|
||||
enum UpdateViewPayload_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
|
||||
class UpdateViewPayload extends $pb.GeneratedMessage {
|
||||
static const $core.Map<$core.int, UpdateViewPayload_OneOfName> _UpdateViewPayload_OneOfNameByTag = {
|
||||
2 : UpdateViewPayload_OneOfName.name,
|
||||
0 : UpdateViewPayload_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, UpdateViewPayload_OneOfDesc> _UpdateViewPayload_OneOfDescByTag = {
|
||||
3 : UpdateViewPayload_OneOfDesc.desc,
|
||||
0 : UpdateViewPayload_OneOfDesc.notSet
|
||||
};
|
||||
static const $core.Map<$core.int, UpdateViewRequest_OneOfThumbnail> _UpdateViewRequest_OneOfThumbnailByTag = {
|
||||
4 : UpdateViewRequest_OneOfThumbnail.thumbnail,
|
||||
0 : UpdateViewRequest_OneOfThumbnail.notSet
|
||||
static const $core.Map<$core.int, UpdateViewPayload_OneOfThumbnail> _UpdateViewPayload_OneOfThumbnailByTag = {
|
||||
4 : UpdateViewPayload_OneOfThumbnail.thumbnail,
|
||||
0 : UpdateViewPayload_OneOfThumbnail.notSet
|
||||
};
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateViewRequest', createEmptyInstance: create)
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateViewPayload', createEmptyInstance: create)
|
||||
..oo(0, [2])
|
||||
..oo(1, [3])
|
||||
..oo(2, [4])
|
||||
@ -590,8 +590,8 @@ class UpdateViewRequest extends $pb.GeneratedMessage {
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
UpdateViewRequest._() : super();
|
||||
factory UpdateViewRequest({
|
||||
UpdateViewPayload._() : super();
|
||||
factory UpdateViewPayload({
|
||||
$core.String? viewId,
|
||||
$core.String? name,
|
||||
$core.String? desc,
|
||||
@ -612,34 +612,34 @@ class UpdateViewRequest extends $pb.GeneratedMessage {
|
||||
}
|
||||
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);
|
||||
factory UpdateViewPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory UpdateViewPayload.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);
|
||||
UpdateViewPayload clone() => UpdateViewPayload()..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
|
||||
UpdateViewPayload copyWith(void Function(UpdateViewPayload) updates) => super.copyWith((message) => updates(message as UpdateViewPayload)) as UpdateViewPayload; // ignore: deprecated_member_use
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static UpdateViewRequest create() => UpdateViewRequest._();
|
||||
UpdateViewRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<UpdateViewRequest> createRepeated() => $pb.PbList<UpdateViewRequest>();
|
||||
static UpdateViewPayload create() => UpdateViewPayload._();
|
||||
UpdateViewPayload createEmptyInstance() => create();
|
||||
static $pb.PbList<UpdateViewPayload> createRepeated() => $pb.PbList<UpdateViewPayload>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static UpdateViewRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UpdateViewRequest>(create);
|
||||
static UpdateViewRequest? _defaultInstance;
|
||||
static UpdateViewPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UpdateViewPayload>(create);
|
||||
static UpdateViewPayload? _defaultInstance;
|
||||
|
||||
UpdateViewRequest_OneOfName whichOneOfName() => _UpdateViewRequest_OneOfNameByTag[$_whichOneof(0)]!;
|
||||
UpdateViewPayload_OneOfName whichOneOfName() => _UpdateViewPayload_OneOfNameByTag[$_whichOneof(0)]!;
|
||||
void clearOneOfName() => clearField($_whichOneof(0));
|
||||
|
||||
UpdateViewRequest_OneOfDesc whichOneOfDesc() => _UpdateViewRequest_OneOfDescByTag[$_whichOneof(1)]!;
|
||||
UpdateViewPayload_OneOfDesc whichOneOfDesc() => _UpdateViewPayload_OneOfDescByTag[$_whichOneof(1)]!;
|
||||
void clearOneOfDesc() => clearField($_whichOneof(1));
|
||||
|
||||
UpdateViewRequest_OneOfThumbnail whichOneOfThumbnail() => _UpdateViewRequest_OneOfThumbnailByTag[$_whichOneof(2)]!;
|
||||
UpdateViewPayload_OneOfThumbnail whichOneOfThumbnail() => _UpdateViewPayload_OneOfThumbnailByTag[$_whichOneof(2)]!;
|
||||
void clearOneOfThumbnail() => clearField($_whichOneof(2));
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
|
@ -47,9 +47,9 @@ const RepeatedView$json = const {
|
||||
|
||||
/// 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',
|
||||
@$core.Deprecated('Use createViewPayloadDescriptor instead')
|
||||
const CreateViewPayload$json = const {
|
||||
'1': 'CreateViewPayload',
|
||||
'2': const [
|
||||
const {'1': 'belong_to_id', '3': 1, '4': 1, '5': 9, '10': 'belongToId'},
|
||||
const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},
|
||||
@ -62,8 +62,8 @@ const CreateViewRequest$json = const {
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `CreateViewRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List createViewRequestDescriptor = $convert.base64Decode('ChFDcmVhdGVWaWV3UmVxdWVzdBIgCgxiZWxvbmdfdG9faWQYASABKAlSCmJlbG9uZ1RvSWQSEgoEbmFtZRgCIAEoCVIEbmFtZRISCgRkZXNjGAMgASgJUgRkZXNjEh4KCXRodW1ibmFpbBgEIAEoCUgAUgl0aHVtYm5haWwSJgoJdmlld190eXBlGAUgASgOMgkuVmlld1R5cGVSCHZpZXdUeXBlQhIKEG9uZV9vZl90aHVtYm5haWw=');
|
||||
/// Descriptor for `CreateViewPayload`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List createViewPayloadDescriptor = $convert.base64Decode('ChFDcmVhdGVWaWV3UGF5bG9hZBIgCgxiZWxvbmdfdG9faWQYASABKAlSCmJlbG9uZ1RvSWQSEgoEbmFtZRgCIAEoCVIEbmFtZRISCgRkZXNjGAMgASgJUgRkZXNjEh4KCXRodW1ibmFpbBgEIAEoCUgAUgl0aHVtYm5haWwSJgoJdmlld190eXBlGAUgASgOMgkuVmlld1R5cGVSCHZpZXdUeXBlQhIKEG9uZV9vZl90aHVtYm5haWw=');
|
||||
@$core.Deprecated('Use createViewParamsDescriptor instead')
|
||||
const CreateViewParams$json = const {
|
||||
'1': 'CreateViewParams',
|
||||
@ -84,12 +84,12 @@ final $typed_data.Uint8List createViewParamsDescriptor = $convert.base64Decode('
|
||||
const ViewId$json = const {
|
||||
'1': 'ViewId',
|
||||
'2': const [
|
||||
const {'1': 'view_id', '3': 1, '4': 1, '5': 9, '10': 'viewId'},
|
||||
const {'1': 'value', '3': 1, '4': 1, '5': 9, '10': 'value'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `ViewId`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List viewIdDescriptor = $convert.base64Decode('CgZWaWV3SWQSFwoHdmlld19pZBgBIAEoCVIGdmlld0lk');
|
||||
final $typed_data.Uint8List viewIdDescriptor = $convert.base64Decode('CgZWaWV3SWQSFAoFdmFsdWUYASABKAlSBXZhbHVl');
|
||||
@$core.Deprecated('Use repeatedViewIdDescriptor instead')
|
||||
const RepeatedViewId$json = const {
|
||||
'1': 'RepeatedViewId',
|
||||
@ -100,9 +100,9 @@ const RepeatedViewId$json = const {
|
||||
|
||||
/// 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',
|
||||
@$core.Deprecated('Use updateViewPayloadDescriptor instead')
|
||||
const UpdateViewPayload$json = const {
|
||||
'1': 'UpdateViewPayload',
|
||||
'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'},
|
||||
@ -116,8 +116,8 @@ const UpdateViewRequest$json = const {
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `UpdateViewRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List updateViewRequestDescriptor = $convert.base64Decode('ChFVcGRhdGVWaWV3UmVxdWVzdBIXCgd2aWV3X2lkGAEgASgJUgZ2aWV3SWQSFAoEbmFtZRgCIAEoCUgAUgRuYW1lEhQKBGRlc2MYAyABKAlIAVIEZGVzYxIeCgl0aHVtYm5haWwYBCABKAlIAlIJdGh1bWJuYWlsQg0KC29uZV9vZl9uYW1lQg0KC29uZV9vZl9kZXNjQhIKEG9uZV9vZl90aHVtYm5haWw=');
|
||||
/// Descriptor for `UpdateViewPayload`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List updateViewPayloadDescriptor = $convert.base64Decode('ChFVcGRhdGVWaWV3UGF5bG9hZBIXCgd2aWV3X2lkGAEgASgJUgZ2aWV3SWQSFAoEbmFtZRgCIAEoCUgAUgRuYW1lEhQKBGRlc2MYAyABKAlIAVIEZGVzYxIeCgl0aHVtYm5haWwYBCABKAlIAlIJdGh1bWJuYWlsQg0KC29uZV9vZl9uYW1lQg0KC29uZV9vZl9kZXNjQhIKEG9uZV9vZl90aHVtYm5haWw=');
|
||||
@$core.Deprecated('Use updateViewParamsDescriptor instead')
|
||||
const UpdateViewParams$json = const {
|
||||
'1': 'UpdateViewParams',
|
||||
|
@ -173,15 +173,15 @@ class RepeatedWorkspace extends $pb.GeneratedMessage {
|
||||
$core.List<Workspace> 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)
|
||||
class CreateWorkspacePayload extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateWorkspacePayload', 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({
|
||||
CreateWorkspacePayload._() : super();
|
||||
factory CreateWorkspacePayload({
|
||||
$core.String? name,
|
||||
$core.String? desc,
|
||||
}) {
|
||||
@ -194,26 +194,26 @@ class CreateWorkspaceRequest extends $pb.GeneratedMessage {
|
||||
}
|
||||
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);
|
||||
factory CreateWorkspacePayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory CreateWorkspacePayload.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);
|
||||
CreateWorkspacePayload clone() => CreateWorkspacePayload()..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
|
||||
CreateWorkspacePayload copyWith(void Function(CreateWorkspacePayload) updates) => super.copyWith((message) => updates(message as CreateWorkspacePayload)) as CreateWorkspacePayload; // ignore: deprecated_member_use
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static CreateWorkspaceRequest create() => CreateWorkspaceRequest._();
|
||||
CreateWorkspaceRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<CreateWorkspaceRequest> createRepeated() => $pb.PbList<CreateWorkspaceRequest>();
|
||||
static CreateWorkspacePayload create() => CreateWorkspacePayload._();
|
||||
CreateWorkspacePayload createEmptyInstance() => create();
|
||||
static $pb.PbList<CreateWorkspacePayload> createRepeated() => $pb.PbList<CreateWorkspacePayload>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static CreateWorkspaceRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<CreateWorkspaceRequest>(create);
|
||||
static CreateWorkspaceRequest? _defaultInstance;
|
||||
static CreateWorkspacePayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<CreateWorkspacePayload>(create);
|
||||
static CreateWorkspacePayload? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
$core.String get name => $_getSZ(0);
|
||||
@ -295,89 +295,29 @@ class CreateWorkspaceParams extends $pb.GeneratedMessage {
|
||||
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<QueryWorkspaceRequest> createRepeated() => $pb.PbList<QueryWorkspaceRequest>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static QueryWorkspaceRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<QueryWorkspaceRequest>(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,
|
||||
enum WorkspaceId_OneOfValue {
|
||||
value,
|
||||
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 const $core.Map<$core.int, WorkspaceId_OneOfValue> _WorkspaceId_OneOfValueByTag = {
|
||||
1 : WorkspaceId_OneOfValue.value,
|
||||
0 : WorkspaceId_OneOfValue.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')
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
WorkspaceId._() : super();
|
||||
factory WorkspaceId({
|
||||
$core.String? workspaceId,
|
||||
$core.String? value,
|
||||
}) {
|
||||
final _result = create();
|
||||
if (workspaceId != null) {
|
||||
_result.workspaceId = workspaceId;
|
||||
if (value != null) {
|
||||
_result.value = value;
|
||||
}
|
||||
return _result;
|
||||
}
|
||||
@ -402,17 +342,17 @@ class WorkspaceId extends $pb.GeneratedMessage {
|
||||
static WorkspaceId getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<WorkspaceId>(create);
|
||||
static WorkspaceId? _defaultInstance;
|
||||
|
||||
WorkspaceId_OneOfWorkspaceId whichOneOfWorkspaceId() => _WorkspaceId_OneOfWorkspaceIdByTag[$_whichOneof(0)]!;
|
||||
void clearOneOfWorkspaceId() => clearField($_whichOneof(0));
|
||||
WorkspaceId_OneOfValue whichOneOfValue() => _WorkspaceId_OneOfValueByTag[$_whichOneof(0)]!;
|
||||
void clearOneOfValue() => clearField($_whichOneof(0));
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
$core.String get workspaceId => $_getSZ(0);
|
||||
$core.String get value => $_getSZ(0);
|
||||
@$pb.TagNumber(1)
|
||||
set workspaceId($core.String v) { $_setString(0, v); }
|
||||
set value($core.String v) { $_setString(0, v); }
|
||||
@$pb.TagNumber(1)
|
||||
$core.bool hasWorkspaceId() => $_has(0);
|
||||
$core.bool hasValue() => $_has(0);
|
||||
@$pb.TagNumber(1)
|
||||
void clearWorkspaceId() => clearField(1);
|
||||
void clearValue() => clearField(1);
|
||||
}
|
||||
|
||||
enum CurrentWorkspaceSetting_OneOfLatestView {
|
||||
|
@ -33,17 +33,17 @@ const RepeatedWorkspace$json = const {
|
||||
|
||||
/// 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',
|
||||
@$core.Deprecated('Use createWorkspacePayloadDescriptor instead')
|
||||
const CreateWorkspacePayload$json = const {
|
||||
'1': 'CreateWorkspacePayload',
|
||||
'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==');
|
||||
/// Descriptor for `CreateWorkspacePayload`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List createWorkspacePayloadDescriptor = $convert.base64Decode('ChZDcmVhdGVXb3Jrc3BhY2VQYXlsb2FkEhIKBG5hbWUYASABKAlSBG5hbWUSEgoEZGVzYxgCIAEoCVIEZGVzYw==');
|
||||
@$core.Deprecated('Use createWorkspaceParamsDescriptor instead')
|
||||
const CreateWorkspaceParams$json = const {
|
||||
'1': 'CreateWorkspaceParams',
|
||||
@ -55,32 +55,19 @@ const CreateWorkspaceParams$json = const {
|
||||
|
||||
/// 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'},
|
||||
const {'1': 'value', '3': 1, '4': 1, '5': 9, '9': 0, '10': 'value'},
|
||||
],
|
||||
'8': const [
|
||||
const {'1': 'one_of_workspace_id'},
|
||||
const {'1': 'one_of_value'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `WorkspaceId`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List workspaceIdDescriptor = $convert.base64Decode('CgtXb3Jrc3BhY2VJZBIjCgx3b3Jrc3BhY2VfaWQYASABKAlIAFILd29ya3NwYWNlSWRCFQoTb25lX29mX3dvcmtzcGFjZV9pZA==');
|
||||
final $typed_data.Uint8List workspaceIdDescriptor = $convert.base64Decode('CgtXb3Jrc3BhY2VJZBIWCgV2YWx1ZRgBIAEoCUgAUgV2YWx1ZUIOCgxvbmVfb2ZfdmFsdWU=');
|
||||
@$core.Deprecated('Use currentWorkspaceSettingDescriptor instead')
|
||||
const CurrentWorkspaceSetting$json = const {
|
||||
'1': 'CurrentWorkspaceSetting',
|
||||
|
@ -9,16 +9,16 @@ import 'dart:core' as $core;
|
||||
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
class SignInRequest extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignInRequest', createEmptyInstance: create)
|
||||
class SignInPayload extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignInPayload', createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'email')
|
||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password')
|
||||
..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
SignInRequest._() : super();
|
||||
factory SignInRequest({
|
||||
SignInPayload._() : super();
|
||||
factory SignInPayload({
|
||||
$core.String? email,
|
||||
$core.String? password,
|
||||
$core.String? name,
|
||||
@ -35,26 +35,26 @@ class SignInRequest extends $pb.GeneratedMessage {
|
||||
}
|
||||
return _result;
|
||||
}
|
||||
factory SignInRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory SignInRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
factory SignInPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory SignInPayload.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')
|
||||
SignInRequest clone() => SignInRequest()..mergeFromMessage(this);
|
||||
SignInPayload clone() => SignInPayload()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
SignInRequest copyWith(void Function(SignInRequest) updates) => super.copyWith((message) => updates(message as SignInRequest)) as SignInRequest; // ignore: deprecated_member_use
|
||||
SignInPayload copyWith(void Function(SignInPayload) updates) => super.copyWith((message) => updates(message as SignInPayload)) as SignInPayload; // ignore: deprecated_member_use
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SignInRequest create() => SignInRequest._();
|
||||
SignInRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<SignInRequest> createRepeated() => $pb.PbList<SignInRequest>();
|
||||
static SignInPayload create() => SignInPayload._();
|
||||
SignInPayload createEmptyInstance() => create();
|
||||
static $pb.PbList<SignInPayload> createRepeated() => $pb.PbList<SignInPayload>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SignInRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignInRequest>(create);
|
||||
static SignInRequest? _defaultInstance;
|
||||
static SignInPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignInPayload>(create);
|
||||
static SignInPayload? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
$core.String get email => $_getSZ(0);
|
||||
@ -248,16 +248,16 @@ class SignInResponse extends $pb.GeneratedMessage {
|
||||
void clearToken() => clearField(4);
|
||||
}
|
||||
|
||||
class SignUpRequest extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignUpRequest', createEmptyInstance: create)
|
||||
class SignUpPayload extends $pb.GeneratedMessage {
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignUpPayload', createEmptyInstance: create)
|
||||
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'email')
|
||||
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
|
||||
..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
SignUpRequest._() : super();
|
||||
factory SignUpRequest({
|
||||
SignUpPayload._() : super();
|
||||
factory SignUpPayload({
|
||||
$core.String? email,
|
||||
$core.String? name,
|
||||
$core.String? password,
|
||||
@ -274,26 +274,26 @@ class SignUpRequest extends $pb.GeneratedMessage {
|
||||
}
|
||||
return _result;
|
||||
}
|
||||
factory SignUpRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory SignUpRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
factory SignUpPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory SignUpPayload.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')
|
||||
SignUpRequest clone() => SignUpRequest()..mergeFromMessage(this);
|
||||
SignUpPayload clone() => SignUpPayload()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
SignUpRequest copyWith(void Function(SignUpRequest) updates) => super.copyWith((message) => updates(message as SignUpRequest)) as SignUpRequest; // ignore: deprecated_member_use
|
||||
SignUpPayload copyWith(void Function(SignUpPayload) updates) => super.copyWith((message) => updates(message as SignUpPayload)) as SignUpPayload; // ignore: deprecated_member_use
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SignUpRequest create() => SignUpRequest._();
|
||||
SignUpRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<SignUpRequest> createRepeated() => $pb.PbList<SignUpRequest>();
|
||||
static SignUpPayload create() => SignUpPayload._();
|
||||
SignUpPayload createEmptyInstance() => create();
|
||||
static $pb.PbList<SignUpPayload> createRepeated() => $pb.PbList<SignUpPayload>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static SignUpRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignUpRequest>(create);
|
||||
static SignUpRequest? _defaultInstance;
|
||||
static SignUpPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<SignUpPayload>(create);
|
||||
static SignUpPayload? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
$core.String get email => $_getSZ(0);
|
||||
|
@ -8,9 +8,9 @@
|
||||
import 'dart:core' as $core;
|
||||
import 'dart:convert' as $convert;
|
||||
import 'dart:typed_data' as $typed_data;
|
||||
@$core.Deprecated('Use signInRequestDescriptor instead')
|
||||
const SignInRequest$json = const {
|
||||
'1': 'SignInRequest',
|
||||
@$core.Deprecated('Use signInPayloadDescriptor instead')
|
||||
const SignInPayload$json = const {
|
||||
'1': 'SignInPayload',
|
||||
'2': const [
|
||||
const {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'},
|
||||
const {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'},
|
||||
@ -18,8 +18,8 @@ const SignInRequest$json = const {
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `SignInRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List signInRequestDescriptor = $convert.base64Decode('Cg1TaWduSW5SZXF1ZXN0EhQKBWVtYWlsGAEgASgJUgVlbWFpbBIaCghwYXNzd29yZBgCIAEoCVIIcGFzc3dvcmQSEgoEbmFtZRgDIAEoCVIEbmFtZQ==');
|
||||
/// Descriptor for `SignInPayload`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List signInPayloadDescriptor = $convert.base64Decode('Cg1TaWduSW5QYXlsb2FkEhQKBWVtYWlsGAEgASgJUgVlbWFpbBIaCghwYXNzd29yZBgCIAEoCVIIcGFzc3dvcmQSEgoEbmFtZRgDIAEoCVIEbmFtZQ==');
|
||||
@$core.Deprecated('Use signInParamsDescriptor instead')
|
||||
const SignInParams$json = const {
|
||||
'1': 'SignInParams',
|
||||
@ -45,9 +45,9 @@ const SignInResponse$json = const {
|
||||
|
||||
/// Descriptor for `SignInResponse`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List signInResponseDescriptor = $convert.base64Decode('Cg5TaWduSW5SZXNwb25zZRIXCgd1c2VyX2lkGAEgASgJUgZ1c2VySWQSEgoEbmFtZRgCIAEoCVIEbmFtZRIUCgVlbWFpbBgDIAEoCVIFZW1haWwSFAoFdG9rZW4YBCABKAlSBXRva2Vu');
|
||||
@$core.Deprecated('Use signUpRequestDescriptor instead')
|
||||
const SignUpRequest$json = const {
|
||||
'1': 'SignUpRequest',
|
||||
@$core.Deprecated('Use signUpPayloadDescriptor instead')
|
||||
const SignUpPayload$json = const {
|
||||
'1': 'SignUpPayload',
|
||||
'2': const [
|
||||
const {'1': 'email', '3': 1, '4': 1, '5': 9, '10': 'email'},
|
||||
const {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'},
|
||||
@ -55,8 +55,8 @@ const SignUpRequest$json = const {
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `SignUpRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List signUpRequestDescriptor = $convert.base64Decode('Cg1TaWduVXBSZXF1ZXN0EhQKBWVtYWlsGAEgASgJUgVlbWFpbBISCgRuYW1lGAIgASgJUgRuYW1lEhoKCHBhc3N3b3JkGAMgASgJUghwYXNzd29yZA==');
|
||||
/// Descriptor for `SignUpPayload`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List signUpPayloadDescriptor = $convert.base64Decode('Cg1TaWduVXBQYXlsb2FkEhQKBWVtYWlsGAEgASgJUgVlbWFpbBISCgRuYW1lGAIgASgJUgRuYW1lEhoKCHBhc3N3b3JkGAMgASgJUghwYXNzd29yZA==');
|
||||
@$core.Deprecated('Use signUpParamsDescriptor instead')
|
||||
const SignUpParams$json = const {
|
||||
'1': 'SignUpParams',
|
||||
|
@ -145,35 +145,35 @@ class UserProfile extends $pb.GeneratedMessage {
|
||||
void clearToken() => clearField(4);
|
||||
}
|
||||
|
||||
enum UpdateUserRequest_OneOfName {
|
||||
enum UpdateUserPayload_OneOfName {
|
||||
name,
|
||||
notSet
|
||||
}
|
||||
|
||||
enum UpdateUserRequest_OneOfEmail {
|
||||
enum UpdateUserPayload_OneOfEmail {
|
||||
email,
|
||||
notSet
|
||||
}
|
||||
|
||||
enum UpdateUserRequest_OneOfPassword {
|
||||
enum UpdateUserPayload_OneOfPassword {
|
||||
password,
|
||||
notSet
|
||||
}
|
||||
|
||||
class UpdateUserRequest extends $pb.GeneratedMessage {
|
||||
static const $core.Map<$core.int, UpdateUserRequest_OneOfName> _UpdateUserRequest_OneOfNameByTag = {
|
||||
2 : UpdateUserRequest_OneOfName.name,
|
||||
0 : UpdateUserRequest_OneOfName.notSet
|
||||
class UpdateUserPayload extends $pb.GeneratedMessage {
|
||||
static const $core.Map<$core.int, UpdateUserPayload_OneOfName> _UpdateUserPayload_OneOfNameByTag = {
|
||||
2 : UpdateUserPayload_OneOfName.name,
|
||||
0 : UpdateUserPayload_OneOfName.notSet
|
||||
};
|
||||
static const $core.Map<$core.int, UpdateUserRequest_OneOfEmail> _UpdateUserRequest_OneOfEmailByTag = {
|
||||
3 : UpdateUserRequest_OneOfEmail.email,
|
||||
0 : UpdateUserRequest_OneOfEmail.notSet
|
||||
static const $core.Map<$core.int, UpdateUserPayload_OneOfEmail> _UpdateUserPayload_OneOfEmailByTag = {
|
||||
3 : UpdateUserPayload_OneOfEmail.email,
|
||||
0 : UpdateUserPayload_OneOfEmail.notSet
|
||||
};
|
||||
static const $core.Map<$core.int, UpdateUserRequest_OneOfPassword> _UpdateUserRequest_OneOfPasswordByTag = {
|
||||
4 : UpdateUserRequest_OneOfPassword.password,
|
||||
0 : UpdateUserRequest_OneOfPassword.notSet
|
||||
static const $core.Map<$core.int, UpdateUserPayload_OneOfPassword> _UpdateUserPayload_OneOfPasswordByTag = {
|
||||
4 : UpdateUserPayload_OneOfPassword.password,
|
||||
0 : UpdateUserPayload_OneOfPassword.notSet
|
||||
};
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateUserRequest', createEmptyInstance: create)
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UpdateUserPayload', createEmptyInstance: create)
|
||||
..oo(0, [2])
|
||||
..oo(1, [3])
|
||||
..oo(2, [4])
|
||||
@ -184,8 +184,8 @@ class UpdateUserRequest extends $pb.GeneratedMessage {
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
UpdateUserRequest._() : super();
|
||||
factory UpdateUserRequest({
|
||||
UpdateUserPayload._() : super();
|
||||
factory UpdateUserPayload({
|
||||
$core.String? id,
|
||||
$core.String? name,
|
||||
$core.String? email,
|
||||
@ -206,34 +206,34 @@ class UpdateUserRequest extends $pb.GeneratedMessage {
|
||||
}
|
||||
return _result;
|
||||
}
|
||||
factory UpdateUserRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory UpdateUserRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
factory UpdateUserPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory UpdateUserPayload.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')
|
||||
UpdateUserRequest clone() => UpdateUserRequest()..mergeFromMessage(this);
|
||||
UpdateUserPayload clone() => UpdateUserPayload()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
UpdateUserRequest copyWith(void Function(UpdateUserRequest) updates) => super.copyWith((message) => updates(message as UpdateUserRequest)) as UpdateUserRequest; // ignore: deprecated_member_use
|
||||
UpdateUserPayload copyWith(void Function(UpdateUserPayload) updates) => super.copyWith((message) => updates(message as UpdateUserPayload)) as UpdateUserPayload; // ignore: deprecated_member_use
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static UpdateUserRequest create() => UpdateUserRequest._();
|
||||
UpdateUserRequest createEmptyInstance() => create();
|
||||
static $pb.PbList<UpdateUserRequest> createRepeated() => $pb.PbList<UpdateUserRequest>();
|
||||
static UpdateUserPayload create() => UpdateUserPayload._();
|
||||
UpdateUserPayload createEmptyInstance() => create();
|
||||
static $pb.PbList<UpdateUserPayload> createRepeated() => $pb.PbList<UpdateUserPayload>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static UpdateUserRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UpdateUserRequest>(create);
|
||||
static UpdateUserRequest? _defaultInstance;
|
||||
static UpdateUserPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UpdateUserPayload>(create);
|
||||
static UpdateUserPayload? _defaultInstance;
|
||||
|
||||
UpdateUserRequest_OneOfName whichOneOfName() => _UpdateUserRequest_OneOfNameByTag[$_whichOneof(0)]!;
|
||||
UpdateUserPayload_OneOfName whichOneOfName() => _UpdateUserPayload_OneOfNameByTag[$_whichOneof(0)]!;
|
||||
void clearOneOfName() => clearField($_whichOneof(0));
|
||||
|
||||
UpdateUserRequest_OneOfEmail whichOneOfEmail() => _UpdateUserRequest_OneOfEmailByTag[$_whichOneof(1)]!;
|
||||
UpdateUserPayload_OneOfEmail whichOneOfEmail() => _UpdateUserPayload_OneOfEmailByTag[$_whichOneof(1)]!;
|
||||
void clearOneOfEmail() => clearField($_whichOneof(1));
|
||||
|
||||
UpdateUserRequest_OneOfPassword whichOneOfPassword() => _UpdateUserRequest_OneOfPasswordByTag[$_whichOneof(2)]!;
|
||||
UpdateUserPayload_OneOfPassword whichOneOfPassword() => _UpdateUserPayload_OneOfPasswordByTag[$_whichOneof(2)]!;
|
||||
void clearOneOfPassword() => clearField($_whichOneof(2));
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
|
@ -31,9 +31,9 @@ const UserProfile$json = const {
|
||||
|
||||
/// Descriptor for `UserProfile`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List userProfileDescriptor = $convert.base64Decode('CgtVc2VyUHJvZmlsZRIOCgJpZBgBIAEoCVICaWQSFAoFZW1haWwYAiABKAlSBWVtYWlsEhIKBG5hbWUYAyABKAlSBG5hbWUSFAoFdG9rZW4YBCABKAlSBXRva2Vu');
|
||||
@$core.Deprecated('Use updateUserRequestDescriptor instead')
|
||||
const UpdateUserRequest$json = const {
|
||||
'1': 'UpdateUserRequest',
|
||||
@$core.Deprecated('Use updateUserPayloadDescriptor instead')
|
||||
const UpdateUserPayload$json = const {
|
||||
'1': 'UpdateUserPayload',
|
||||
'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'},
|
||||
@ -47,8 +47,8 @@ const UpdateUserRequest$json = const {
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `UpdateUserRequest`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List updateUserRequestDescriptor = $convert.base64Decode('ChFVcGRhdGVVc2VyUmVxdWVzdBIOCgJpZBgBIAEoCVICaWQSFAoEbmFtZRgCIAEoCUgAUgRuYW1lEhYKBWVtYWlsGAMgASgJSAFSBWVtYWlsEhwKCHBhc3N3b3JkGAQgASgJSAJSCHBhc3N3b3JkQg0KC29uZV9vZl9uYW1lQg4KDG9uZV9vZl9lbWFpbEIRCg9vbmVfb2ZfcGFzc3dvcmQ=');
|
||||
/// Descriptor for `UpdateUserPayload`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List updateUserPayloadDescriptor = $convert.base64Decode('ChFVcGRhdGVVc2VyUGF5bG9hZBIOCgJpZBgBIAEoCVICaWQSFAoEbmFtZRgCIAEoCUgAUgRuYW1lEhYKBWVtYWlsGAMgASgJSAFSBWVtYWlsEhwKCHBhc3N3b3JkGAQgASgJSAJSCHBhc3N3b3JkQg0KC29uZV9vZl9uYW1lQg4KDG9uZV9vZl9lbWFpbEIRCg9vbmVfb2ZfcGFzc3dvcmQ=');
|
||||
@$core.Deprecated('Use updateUserParamsDescriptor instead')
|
||||
const UpdateUserParams$json = const {
|
||||
'1': 'UpdateUserParams',
|
||||
|
@ -7,8 +7,8 @@ edition = "2018"
|
||||
[lib]
|
||||
name = "dart_ffi"
|
||||
# this value will change depending on the target os
|
||||
# default cdylib
|
||||
crate-type = ["cdylib"]
|
||||
# default staticlib
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
|
@ -82,43 +82,43 @@ pub fn create(folder: Arc<FolderManager>) -> Module {
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Display, Hash, ProtoBuf_Enum, Flowy_Event)]
|
||||
#[event_err = "FlowyError"]
|
||||
pub enum FolderEvent {
|
||||
#[event(input = "CreateWorkspaceRequest", output = "Workspace")]
|
||||
#[event(input = "CreateWorkspacePayload", output = "Workspace")]
|
||||
CreateWorkspace = 0,
|
||||
|
||||
#[event(output = "CurrentWorkspaceSetting")]
|
||||
ReadCurWorkspace = 1,
|
||||
|
||||
#[event(input = "QueryWorkspaceRequest", output = "RepeatedWorkspace")]
|
||||
#[event(input = "WorkspaceId", output = "RepeatedWorkspace")]
|
||||
ReadWorkspaces = 2,
|
||||
|
||||
#[event(input = "QueryWorkspaceRequest")]
|
||||
#[event(input = "WorkspaceId")]
|
||||
DeleteWorkspace = 3,
|
||||
|
||||
#[event(input = "QueryWorkspaceRequest", output = "Workspace")]
|
||||
#[event(input = "WorkspaceId", output = "Workspace")]
|
||||
OpenWorkspace = 4,
|
||||
|
||||
#[event(input = "QueryWorkspaceRequest", output = "RepeatedApp")]
|
||||
#[event(input = "WorkspaceId", output = "RepeatedApp")]
|
||||
ReadWorkspaceApps = 5,
|
||||
|
||||
#[event(input = "CreateAppRequest", output = "App")]
|
||||
#[event(input = "CreateAppPayload", output = "App")]
|
||||
CreateApp = 101,
|
||||
|
||||
#[event(input = "QueryAppRequest")]
|
||||
#[event(input = "AppId")]
|
||||
DeleteApp = 102,
|
||||
|
||||
#[event(input = "QueryAppRequest", output = "App")]
|
||||
#[event(input = "AppId", output = "App")]
|
||||
ReadApp = 103,
|
||||
|
||||
#[event(input = "UpdateAppRequest")]
|
||||
#[event(input = "UpdateAppPayload")]
|
||||
UpdateApp = 104,
|
||||
|
||||
#[event(input = "CreateViewRequest", output = "View")]
|
||||
#[event(input = "CreateViewPayload", output = "View")]
|
||||
CreateView = 201,
|
||||
|
||||
#[event(input = "ViewId", output = "View")]
|
||||
ReadView = 202,
|
||||
|
||||
#[event(input = "UpdateViewRequest", output = "View")]
|
||||
#[event(input = "UpdateViewPayload", output = "View")]
|
||||
UpdateView = 203,
|
||||
|
||||
#[event(input = "RepeatedViewId")]
|
||||
@ -154,7 +154,7 @@ pub enum FolderEvent {
|
||||
#[event(input = "DocumentDelta", output = "DocumentDelta")]
|
||||
ApplyDocDelta = 400,
|
||||
|
||||
#[event(input = "ExportRequest", output = "ExportData")]
|
||||
#[event(input = "ExportPayload", output = "ExportData")]
|
||||
ExportDocument = 500,
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ impl AppController {
|
||||
let app = self
|
||||
.persistence
|
||||
.begin_transaction(|transaction| {
|
||||
let app = transaction.read_app(¶ms.app_id)?;
|
||||
let app = transaction.read_app(¶ms.value)?;
|
||||
let trash_ids = self.trash_controller.read_trash_ids(&transaction)?;
|
||||
if trash_ids.contains(&app.id) {
|
||||
return Err(FlowyError::record_not_found());
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::{
|
||||
entities::{
|
||||
app::{App, AppId, CreateAppParams, CreateAppRequest, QueryAppRequest, UpdateAppParams, UpdateAppRequest},
|
||||
app::{App, AppId, CreateAppParams, CreateAppPayload, UpdateAppParams, UpdateAppPayload},
|
||||
trash::Trash,
|
||||
},
|
||||
errors::FlowyError,
|
||||
@ -10,7 +10,7 @@ use lib_dispatch::prelude::{data_result, Data, DataResult, Unit};
|
||||
use std::{convert::TryInto, sync::Arc};
|
||||
|
||||
pub(crate) async fn create_app_handler(
|
||||
data: Data<CreateAppRequest>,
|
||||
data: Data<CreateAppPayload>,
|
||||
controller: Unit<Arc<AppController>>,
|
||||
) -> DataResult<App, FlowyError> {
|
||||
let params: CreateAppParams = data.into_inner().try_into()?;
|
||||
@ -20,13 +20,13 @@ pub(crate) async fn create_app_handler(
|
||||
}
|
||||
|
||||
pub(crate) async fn delete_app_handler(
|
||||
data: Data<QueryAppRequest>,
|
||||
data: Data<AppId>,
|
||||
app_controller: Unit<Arc<AppController>>,
|
||||
trash_controller: Unit<Arc<TrashController>>,
|
||||
) -> Result<(), FlowyError> {
|
||||
let params: AppId = data.into_inner().try_into()?;
|
||||
let params: AppId = data.into_inner();
|
||||
let trash = app_controller
|
||||
.read_local_apps(vec![params.app_id])
|
||||
.read_local_apps(vec![params.value])
|
||||
.await?
|
||||
.into_iter()
|
||||
.map(|app| app.into())
|
||||
@ -38,7 +38,7 @@ pub(crate) async fn delete_app_handler(
|
||||
|
||||
#[tracing::instrument(skip(data, controller))]
|
||||
pub(crate) async fn update_app_handler(
|
||||
data: Data<UpdateAppRequest>,
|
||||
data: Data<UpdateAppPayload>,
|
||||
controller: Unit<Arc<AppController>>,
|
||||
) -> Result<(), FlowyError> {
|
||||
let params: UpdateAppParams = data.into_inner().try_into()?;
|
||||
@ -48,13 +48,13 @@ pub(crate) async fn update_app_handler(
|
||||
|
||||
#[tracing::instrument(skip(data, app_controller, view_controller))]
|
||||
pub(crate) async fn read_app_handler(
|
||||
data: Data<QueryAppRequest>,
|
||||
data: Data<AppId>,
|
||||
app_controller: Unit<Arc<AppController>>,
|
||||
view_controller: Unit<Arc<ViewController>>,
|
||||
) -> DataResult<App, FlowyError> {
|
||||
let params: AppId = data.into_inner().try_into()?;
|
||||
let params: AppId = data.into_inner();
|
||||
let mut app = app_controller.read_app(params.clone()).await?;
|
||||
app.belongings = view_controller.read_views_belong_to(¶ms.app_id).await?;
|
||||
app.belongings = view_controller.read_views_belong_to(¶ms.value).await?;
|
||||
|
||||
data_result(app)
|
||||
}
|
||||
|
@ -113,12 +113,12 @@ impl ViewController {
|
||||
.await
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self, params), fields(view_id = %params.view_id), err)]
|
||||
pub(crate) async fn read_view(&self, params: ViewId) -> Result<View, FlowyError> {
|
||||
#[tracing::instrument(skip(self, view_id), fields(view_id = %view_id.value), err)]
|
||||
pub(crate) async fn read_view(&self, view_id: ViewId) -> Result<View, FlowyError> {
|
||||
let view = self
|
||||
.persistence
|
||||
.begin_transaction(|transaction| {
|
||||
let view = transaction.read_view(¶ms.view_id)?;
|
||||
let view = transaction.read_view(&view_id.value)?;
|
||||
let trash_ids = self.trash_controller.read_trash_ids(&transaction)?;
|
||||
if trash_ids.contains(&view.id) {
|
||||
return Err(FlowyError::record_not_found());
|
||||
@ -126,7 +126,7 @@ impl ViewController {
|
||||
Ok(view)
|
||||
})
|
||||
.await?;
|
||||
let _ = self.read_view_on_server(params);
|
||||
let _ = self.read_view_on_server(view_id);
|
||||
Ok(view)
|
||||
}
|
||||
|
||||
@ -159,14 +159,14 @@ impl ViewController {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "debug", skip(self,params), fields(doc_id = %params.doc_id), err)]
|
||||
#[tracing::instrument(level = "debug", skip(self,params), fields(doc_id = %params.value), err)]
|
||||
pub(crate) async fn delete_view(&self, params: DocumentId) -> Result<(), FlowyError> {
|
||||
if let Some(view_id) = KV::get_str(LATEST_VIEW_ID) {
|
||||
if view_id == params.doc_id {
|
||||
if view_id == params.value {
|
||||
let _ = KV::remove(LATEST_VIEW_ID);
|
||||
}
|
||||
}
|
||||
let _ = self.document_manager.close_document(¶ms.doc_id)?;
|
||||
let _ = self.document_manager.close_document(¶ms.value)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -2,19 +2,19 @@ use crate::{
|
||||
entities::{
|
||||
trash::Trash,
|
||||
view::{
|
||||
CreateViewParams, CreateViewRequest, RepeatedViewId, UpdateViewParams, UpdateViewRequest, View, ViewId,
|
||||
CreateViewParams, CreateViewPayload, RepeatedViewId, UpdateViewParams, UpdateViewPayload, View, ViewId,
|
||||
},
|
||||
},
|
||||
errors::FlowyError,
|
||||
services::{TrashController, ViewController},
|
||||
};
|
||||
use flowy_collaboration::entities::document_info::DocumentDelta;
|
||||
use flowy_folder_data_model::entities::share::{ExportData, ExportParams, ExportRequest};
|
||||
use flowy_folder_data_model::entities::share::{ExportData, ExportParams, ExportPayload};
|
||||
use lib_dispatch::prelude::{data_result, Data, DataResult, Unit};
|
||||
use std::{convert::TryInto, sync::Arc};
|
||||
|
||||
pub(crate) async fn create_view_handler(
|
||||
data: Data<CreateViewRequest>,
|
||||
data: Data<CreateViewPayload>,
|
||||
controller: Unit<Arc<ViewController>>,
|
||||
) -> DataResult<View, FlowyError> {
|
||||
let params: CreateViewParams = data.into_inner().try_into()?;
|
||||
@ -26,18 +26,18 @@ pub(crate) async fn read_view_handler(
|
||||
data: Data<ViewId>,
|
||||
controller: Unit<Arc<ViewController>>,
|
||||
) -> DataResult<View, FlowyError> {
|
||||
let params: ViewId = data.into_inner();
|
||||
let mut view = controller.read_view(params.clone()).await?;
|
||||
let view_id: ViewId = data.into_inner();
|
||||
let mut view = controller.read_view(view_id.clone()).await?;
|
||||
// For the moment, app and view can contains lots of views. Reading the view
|
||||
// belongings using the view_id.
|
||||
view.belongings = controller.read_views_belong_to(¶ms.view_id).await?;
|
||||
view.belongings = controller.read_views_belong_to(&view_id.value).await?;
|
||||
|
||||
data_result(view)
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(data, controller), err)]
|
||||
pub(crate) async fn update_view_handler(
|
||||
data: Data<UpdateViewRequest>,
|
||||
data: Data<UpdateViewPayload>,
|
||||
controller: Unit<Arc<ViewController>>,
|
||||
) -> Result<(), FlowyError> {
|
||||
let params: UpdateViewParams = data.into_inner().try_into()?;
|
||||
@ -79,8 +79,8 @@ pub(crate) async fn open_document_handler(
|
||||
data: Data<ViewId>,
|
||||
controller: Unit<Arc<ViewController>>,
|
||||
) -> DataResult<DocumentDelta, FlowyError> {
|
||||
let params: ViewId = data.into_inner();
|
||||
let doc = controller.open_document(¶ms.view_id).await?;
|
||||
let view_id: ViewId = data.into_inner();
|
||||
let doc = controller.open_document(&view_id.value).await?;
|
||||
data_result(doc)
|
||||
}
|
||||
|
||||
@ -88,8 +88,8 @@ pub(crate) async fn close_view_handler(
|
||||
data: Data<ViewId>,
|
||||
controller: Unit<Arc<ViewController>>,
|
||||
) -> Result<(), FlowyError> {
|
||||
let params: ViewId = data.into_inner();
|
||||
let _ = controller.close_view(¶ms.view_id).await?;
|
||||
let view_id: ViewId = data.into_inner();
|
||||
let _ = controller.close_view(&view_id.value).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -98,14 +98,14 @@ pub(crate) async fn duplicate_view_handler(
|
||||
data: Data<ViewId>,
|
||||
controller: Unit<Arc<ViewController>>,
|
||||
) -> Result<(), FlowyError> {
|
||||
let params: ViewId = data.into_inner();
|
||||
let _ = controller.duplicate_view(¶ms.view_id).await?;
|
||||
let view_id: ViewId = data.into_inner();
|
||||
let _ = controller.duplicate_view(&view_id.value).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(data, controller), err)]
|
||||
pub(crate) async fn export_handler(
|
||||
data: Data<ExportRequest>,
|
||||
data: Data<ExportPayload>,
|
||||
controller: Unit<Arc<ViewController>>,
|
||||
) -> DataResult<ExportData, FlowyError> {
|
||||
let params: ExportParams = data.into_inner().try_into()?;
|
||||
|
@ -96,7 +96,7 @@ impl WorkspaceController {
|
||||
|
||||
pub(crate) async fn open_workspace(&self, params: WorkspaceId) -> Result<Workspace, FlowyError> {
|
||||
let user_id = self.user.user_id()?;
|
||||
if let Some(workspace_id) = params.workspace_id {
|
||||
if let Some(workspace_id) = params.value {
|
||||
let workspace = self
|
||||
.persistence
|
||||
.begin_transaction(|transaction| self.read_local_workspace(workspace_id, &user_id, &transaction))
|
||||
@ -174,7 +174,7 @@ impl WorkspaceController {
|
||||
#[tracing::instrument(level = "trace", skip(self), err)]
|
||||
fn delete_workspace_on_server(&self, workspace_id: &str) -> Result<(), FlowyError> {
|
||||
let params = WorkspaceId {
|
||||
workspace_id: Some(workspace_id.to_string()),
|
||||
value: Some(workspace_id.to_string()),
|
||||
};
|
||||
let (token, server) = (self.user.token()?, self.cloud_service.clone());
|
||||
tokio::spawn(async move {
|
||||
|
@ -7,7 +7,7 @@ use crate::{
|
||||
use flowy_folder_data_model::entities::{
|
||||
app::RepeatedApp,
|
||||
view::View,
|
||||
workspace::{CurrentWorkspaceSetting, QueryWorkspaceRequest, RepeatedWorkspace, WorkspaceId, *},
|
||||
workspace::{CurrentWorkspaceSetting, RepeatedWorkspace, WorkspaceId, *},
|
||||
};
|
||||
|
||||
use lib_dispatch::prelude::{data_result, Data, DataResult, Unit};
|
||||
@ -15,7 +15,7 @@ use std::{convert::TryInto, sync::Arc};
|
||||
|
||||
#[tracing::instrument(skip(data, controller), err)]
|
||||
pub(crate) async fn create_workspace_handler(
|
||||
data: Data<CreateWorkspaceRequest>,
|
||||
data: Data<CreateWorkspacePayload>,
|
||||
controller: Unit<Arc<WorkspaceController>>,
|
||||
) -> DataResult<Workspace, FlowyError> {
|
||||
let controller = controller.get_ref().clone();
|
||||
@ -34,20 +34,20 @@ pub(crate) async fn read_workspace_apps_handler(
|
||||
|
||||
#[tracing::instrument(skip(data, controller), err)]
|
||||
pub(crate) async fn open_workspace_handler(
|
||||
data: Data<QueryWorkspaceRequest>,
|
||||
data: Data<WorkspaceId>,
|
||||
controller: Unit<Arc<WorkspaceController>>,
|
||||
) -> DataResult<Workspace, FlowyError> {
|
||||
let params: WorkspaceId = data.into_inner().try_into()?;
|
||||
let params: WorkspaceId = data.into_inner();
|
||||
let workspaces = controller.open_workspace(params).await?;
|
||||
data_result(workspaces)
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(data, folder), err)]
|
||||
pub(crate) async fn read_workspaces_handler(
|
||||
data: Data<QueryWorkspaceRequest>,
|
||||
data: Data<WorkspaceId>,
|
||||
folder: Unit<Arc<FolderManager>>,
|
||||
) -> DataResult<RepeatedWorkspace, FlowyError> {
|
||||
let params: WorkspaceId = data.into_inner().try_into()?;
|
||||
let params: WorkspaceId = data.into_inner();
|
||||
let user_id = folder.user.user_id()?;
|
||||
let workspace_controller = folder.workspace_controller.clone();
|
||||
|
||||
@ -56,7 +56,7 @@ pub(crate) async fn read_workspaces_handler(
|
||||
.persistence
|
||||
.begin_transaction(|transaction| {
|
||||
let mut workspaces =
|
||||
workspace_controller.read_local_workspaces(params.workspace_id.clone(), &user_id, &transaction)?;
|
||||
workspace_controller.read_local_workspaces(params.value.clone(), &user_id, &transaction)?;
|
||||
for workspace in workspaces.iter_mut() {
|
||||
let apps =
|
||||
read_local_workspace_apps(&workspace.id, trash_controller.clone(), &transaction)?.into_inner();
|
||||
@ -76,7 +76,7 @@ pub async fn read_cur_workspace_handler(
|
||||
let workspace_id = get_current_workspace()?;
|
||||
let user_id = folder.user.user_id()?;
|
||||
let params = WorkspaceId {
|
||||
workspace_id: Some(workspace_id.clone()),
|
||||
value: Some(workspace_id.clone()),
|
||||
};
|
||||
|
||||
let workspace = folder
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::script::{invalid_workspace_name_test_case, FolderScript::*, FolderTest};
|
||||
use flowy_collaboration::{client_document::default::initial_delta_string, entities::revision::RevisionState};
|
||||
use flowy_folder::entities::workspace::CreateWorkspaceRequest;
|
||||
use flowy_folder::entities::workspace::CreateWorkspacePayload;
|
||||
use flowy_test::{event_builder::*, FlowySDKTest};
|
||||
|
||||
#[tokio::test]
|
||||
@ -64,14 +64,14 @@ async fn workspace_create_with_apps() {
|
||||
async fn workspace_create_with_invalid_name() {
|
||||
for (name, code) in invalid_workspace_name_test_case() {
|
||||
let sdk = FlowySDKTest::default();
|
||||
let request = CreateWorkspaceRequest {
|
||||
let request = CreateWorkspacePayload {
|
||||
name,
|
||||
desc: "".to_owned(),
|
||||
};
|
||||
assert_eq!(
|
||||
FolderEventBuilder::new(sdk)
|
||||
.event(flowy_folder::event_map::FolderEvent::CreateWorkspace)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await
|
||||
.error()
|
||||
|
@ -1,23 +1,24 @@
|
||||
use flowy_collaboration::entities::document_info::DocumentInfo;
|
||||
use flowy_folder::event_map::FolderEvent::*;
|
||||
use flowy_folder_data_model::entities::view::{RepeatedViewId, ViewId};
|
||||
use flowy_folder_data_model::entities::workspace::WorkspaceId;
|
||||
use flowy_folder_data_model::entities::{
|
||||
app::{App, AppId, CreateAppRequest, QueryAppRequest, UpdateAppRequest},
|
||||
app::{App, AppId, CreateAppPayload, UpdateAppPayload},
|
||||
trash::{RepeatedTrash, TrashId, TrashType},
|
||||
view::{CreateViewRequest, UpdateViewRequest, View, ViewType},
|
||||
workspace::{CreateWorkspaceRequest, QueryWorkspaceRequest, RepeatedWorkspace, Workspace},
|
||||
view::{CreateViewPayload, UpdateViewPayload, View, ViewType},
|
||||
workspace::{CreateWorkspacePayload, RepeatedWorkspace, Workspace},
|
||||
};
|
||||
use flowy_test::{event_builder::*, FlowySDKTest};
|
||||
|
||||
pub async fn create_workspace(sdk: &FlowySDKTest, name: &str, desc: &str) -> Workspace {
|
||||
let request = CreateWorkspaceRequest {
|
||||
let request = CreateWorkspacePayload {
|
||||
name: name.to_owned(),
|
||||
desc: desc.to_owned(),
|
||||
};
|
||||
|
||||
let workspace = FolderEventBuilder::new(sdk.clone())
|
||||
.event(CreateWorkspace)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await
|
||||
.parse::<Workspace>();
|
||||
@ -25,16 +26,16 @@ pub async fn create_workspace(sdk: &FlowySDKTest, name: &str, desc: &str) -> Wor
|
||||
}
|
||||
|
||||
pub async fn read_workspace(sdk: &FlowySDKTest, workspace_id: Option<String>) -> Vec<Workspace> {
|
||||
let request = QueryWorkspaceRequest { workspace_id };
|
||||
let request = WorkspaceId { value: workspace_id };
|
||||
let repeated_workspace = FolderEventBuilder::new(sdk.clone())
|
||||
.event(ReadWorkspaces)
|
||||
.request(request.clone())
|
||||
.payload(request.clone())
|
||||
.async_send()
|
||||
.await
|
||||
.parse::<RepeatedWorkspace>();
|
||||
|
||||
let workspaces;
|
||||
if let Some(workspace_id) = &request.workspace_id {
|
||||
if let Some(workspace_id) = &request.value {
|
||||
workspaces = repeated_workspace
|
||||
.into_inner()
|
||||
.into_iter()
|
||||
@ -49,7 +50,7 @@ pub async fn read_workspace(sdk: &FlowySDKTest, workspace_id: Option<String>) ->
|
||||
}
|
||||
|
||||
pub async fn create_app(sdk: &FlowySDKTest, workspace_id: &str, name: &str, desc: &str) -> App {
|
||||
let create_app_request = CreateAppRequest {
|
||||
let create_app_request = CreateAppPayload {
|
||||
workspace_id: workspace_id.to_owned(),
|
||||
name: name.to_string(),
|
||||
desc: desc.to_string(),
|
||||
@ -58,7 +59,7 @@ pub async fn create_app(sdk: &FlowySDKTest, workspace_id: &str, name: &str, desc
|
||||
|
||||
let app = FolderEventBuilder::new(sdk.clone())
|
||||
.event(CreateApp)
|
||||
.request(create_app_request)
|
||||
.payload(create_app_request)
|
||||
.async_send()
|
||||
.await
|
||||
.parse::<App>();
|
||||
@ -66,13 +67,13 @@ pub async fn create_app(sdk: &FlowySDKTest, workspace_id: &str, name: &str, desc
|
||||
}
|
||||
|
||||
pub async fn read_app(sdk: &FlowySDKTest, app_id: &str) -> App {
|
||||
let request = QueryAppRequest {
|
||||
app_ids: vec![app_id.to_owned()],
|
||||
let request = AppId {
|
||||
value: app_id.to_owned(),
|
||||
};
|
||||
|
||||
let app = FolderEventBuilder::new(sdk.clone())
|
||||
.event(ReadApp)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await
|
||||
.parse::<App>();
|
||||
@ -81,7 +82,7 @@ pub async fn read_app(sdk: &FlowySDKTest, app_id: &str) -> App {
|
||||
}
|
||||
|
||||
pub async fn update_app(sdk: &FlowySDKTest, app_id: &str, name: Option<String>, desc: Option<String>) {
|
||||
let request = UpdateAppRequest {
|
||||
let request = UpdateAppPayload {
|
||||
app_id: app_id.to_string(),
|
||||
name,
|
||||
desc,
|
||||
@ -91,25 +92,25 @@ pub async fn update_app(sdk: &FlowySDKTest, app_id: &str, name: Option<String>,
|
||||
|
||||
FolderEventBuilder::new(sdk.clone())
|
||||
.event(UpdateApp)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await;
|
||||
}
|
||||
|
||||
pub async fn delete_app(sdk: &FlowySDKTest, app_id: &str) {
|
||||
let request = AppId {
|
||||
app_id: app_id.to_string(),
|
||||
value: app_id.to_string(),
|
||||
};
|
||||
|
||||
FolderEventBuilder::new(sdk.clone())
|
||||
.event(DeleteApp)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await;
|
||||
}
|
||||
|
||||
pub async fn create_view(sdk: &FlowySDKTest, app_id: &str, name: &str, desc: &str, view_type: ViewType) -> View {
|
||||
let request = CreateViewRequest {
|
||||
let request = CreateViewPayload {
|
||||
belong_to_id: app_id.to_string(),
|
||||
name: name.to_string(),
|
||||
desc: desc.to_string(),
|
||||
@ -118,7 +119,7 @@ pub async fn create_view(sdk: &FlowySDKTest, app_id: &str, name: &str, desc: &st
|
||||
};
|
||||
let view = FolderEventBuilder::new(sdk.clone())
|
||||
.event(CreateView)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await
|
||||
.parse::<View>();
|
||||
@ -126,19 +127,17 @@ pub async fn create_view(sdk: &FlowySDKTest, app_id: &str, name: &str, desc: &st
|
||||
}
|
||||
|
||||
pub async fn read_view(sdk: &FlowySDKTest, view_id: &str) -> View {
|
||||
let request = ViewId {
|
||||
view_id: view_id.to_string(),
|
||||
};
|
||||
let view_id: ViewId = view_id.into();
|
||||
FolderEventBuilder::new(sdk.clone())
|
||||
.event(ReadView)
|
||||
.request(request)
|
||||
.payload(view_id)
|
||||
.async_send()
|
||||
.await
|
||||
.parse::<View>()
|
||||
}
|
||||
|
||||
pub async fn update_view(sdk: &FlowySDKTest, view_id: &str, name: Option<String>, desc: Option<String>) {
|
||||
let request = UpdateViewRequest {
|
||||
let request = UpdateViewPayload {
|
||||
view_id: view_id.to_string(),
|
||||
name,
|
||||
desc,
|
||||
@ -146,7 +145,7 @@ pub async fn update_view(sdk: &FlowySDKTest, view_id: &str, name: Option<String>
|
||||
};
|
||||
FolderEventBuilder::new(sdk.clone())
|
||||
.event(UpdateView)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await;
|
||||
}
|
||||
@ -155,18 +154,16 @@ pub async fn delete_view(sdk: &FlowySDKTest, view_ids: Vec<String>) {
|
||||
let request = RepeatedViewId { items: view_ids };
|
||||
FolderEventBuilder::new(sdk.clone())
|
||||
.event(DeleteView)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await;
|
||||
}
|
||||
|
||||
pub async fn open_document(sdk: &FlowySDKTest, view_id: &str) -> DocumentInfo {
|
||||
let request = ViewId {
|
||||
view_id: view_id.to_string(),
|
||||
};
|
||||
let view_id: ViewId = view_id.into();
|
||||
FolderEventBuilder::new(sdk.clone())
|
||||
.event(OpenView)
|
||||
.request(request)
|
||||
.payload(view_id)
|
||||
.async_send()
|
||||
.await
|
||||
.parse::<DocumentInfo>()
|
||||
@ -187,7 +184,7 @@ pub async fn restore_app_from_trash(sdk: &FlowySDKTest, app_id: &str) {
|
||||
};
|
||||
FolderEventBuilder::new(sdk.clone())
|
||||
.event(PutbackTrash)
|
||||
.request(id)
|
||||
.payload(id)
|
||||
.async_send()
|
||||
.await;
|
||||
}
|
||||
@ -199,7 +196,7 @@ pub async fn restore_view_from_trash(sdk: &FlowySDKTest, view_id: &str) {
|
||||
};
|
||||
FolderEventBuilder::new(sdk.clone())
|
||||
.event(PutbackTrash)
|
||||
.request(id)
|
||||
.payload(id)
|
||||
.async_send()
|
||||
.await;
|
||||
}
|
||||
|
@ -413,7 +413,7 @@ impl DocumentCloudService for LocalServer {
|
||||
|
||||
fn read_document(&self, _token: &str, params: DocumentId) -> FutureResult<Option<DocumentInfo>, FlowyError> {
|
||||
let doc = DocumentInfo {
|
||||
doc_id: params.doc_id,
|
||||
doc_id: params.value,
|
||||
text: initial_delta_string(),
|
||||
rev_id: 0,
|
||||
base_rev_id: 0,
|
||||
|
@ -40,7 +40,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub fn request<P>(mut self, payload: P) -> Self
|
||||
pub fn payload<P>(mut self, payload: P) -> Self
|
||||
where
|
||||
P: ToBytes,
|
||||
{
|
||||
|
@ -1,14 +1,15 @@
|
||||
use crate::prelude::*;
|
||||
use flowy_folder::prelude::WorkspaceId;
|
||||
use flowy_folder::{
|
||||
entities::{
|
||||
app::*,
|
||||
view::*,
|
||||
workspace::{CreateWorkspaceRequest, QueryWorkspaceRequest, Workspace},
|
||||
workspace::{CreateWorkspacePayload, Workspace},
|
||||
},
|
||||
event_map::FolderEvent::{CreateWorkspace, OpenWorkspace, *},
|
||||
};
|
||||
use flowy_user::{
|
||||
entities::{SignInRequest, SignUpRequest, UserProfile},
|
||||
entities::{SignInPayload, SignUpPayload, UserProfile},
|
||||
errors::FlowyError,
|
||||
event_map::UserEvent::{InitUser, SignIn, SignOut, SignUp},
|
||||
};
|
||||
@ -39,14 +40,14 @@ impl ViewTest {
|
||||
}
|
||||
|
||||
async fn create_workspace(sdk: &FlowySDKTest, name: &str, desc: &str) -> Workspace {
|
||||
let request = CreateWorkspaceRequest {
|
||||
let request = CreateWorkspacePayload {
|
||||
name: name.to_owned(),
|
||||
desc: desc.to_owned(),
|
||||
};
|
||||
|
||||
let workspace = FolderEventBuilder::new(sdk.clone())
|
||||
.event(CreateWorkspace)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await
|
||||
.parse::<Workspace>();
|
||||
@ -54,18 +55,18 @@ async fn create_workspace(sdk: &FlowySDKTest, name: &str, desc: &str) -> Workspa
|
||||
}
|
||||
|
||||
async fn open_workspace(sdk: &FlowySDKTest, workspace_id: &str) {
|
||||
let request = QueryWorkspaceRequest {
|
||||
workspace_id: Some(workspace_id.to_owned()),
|
||||
let payload = WorkspaceId {
|
||||
value: Some(workspace_id.to_owned()),
|
||||
};
|
||||
let _ = FolderEventBuilder::new(sdk.clone())
|
||||
.event(OpenWorkspace)
|
||||
.request(request)
|
||||
.payload(payload)
|
||||
.async_send()
|
||||
.await;
|
||||
}
|
||||
|
||||
async fn create_app(sdk: &FlowySDKTest, name: &str, desc: &str, workspace_id: &str) -> App {
|
||||
let create_app_request = CreateAppRequest {
|
||||
let create_app_request = CreateAppPayload {
|
||||
workspace_id: workspace_id.to_owned(),
|
||||
name: name.to_string(),
|
||||
desc: desc.to_string(),
|
||||
@ -74,7 +75,7 @@ async fn create_app(sdk: &FlowySDKTest, name: &str, desc: &str, workspace_id: &s
|
||||
|
||||
let app = FolderEventBuilder::new(sdk.clone())
|
||||
.event(CreateApp)
|
||||
.request(create_app_request)
|
||||
.payload(create_app_request)
|
||||
.async_send()
|
||||
.await
|
||||
.parse::<App>();
|
||||
@ -82,7 +83,7 @@ async fn create_app(sdk: &FlowySDKTest, name: &str, desc: &str, workspace_id: &s
|
||||
}
|
||||
|
||||
async fn create_view(sdk: &FlowySDKTest, app_id: &str) -> View {
|
||||
let request = CreateViewRequest {
|
||||
let request = CreateViewPayload {
|
||||
belong_to_id: app_id.to_string(),
|
||||
name: "View A".to_string(),
|
||||
desc: "".to_string(),
|
||||
@ -92,7 +93,7 @@ async fn create_view(sdk: &FlowySDKTest, app_id: &str) -> View {
|
||||
|
||||
let view = FolderEventBuilder::new(sdk.clone())
|
||||
.event(CreateView)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await
|
||||
.parse::<View>();
|
||||
@ -133,7 +134,7 @@ pub struct SignUpContext {
|
||||
|
||||
pub fn sign_up(dispatch: Arc<EventDispatcher>) -> SignUpContext {
|
||||
let password = login_password();
|
||||
let payload = SignUpRequest {
|
||||
let payload = SignUpPayload {
|
||||
email: random_email(),
|
||||
name: "app flowy".to_string(),
|
||||
password: password.clone(),
|
||||
@ -152,7 +153,7 @@ pub fn sign_up(dispatch: Arc<EventDispatcher>) -> SignUpContext {
|
||||
|
||||
pub async fn async_sign_up(dispatch: Arc<EventDispatcher>) -> SignUpContext {
|
||||
let password = login_password();
|
||||
let payload = SignUpRequest {
|
||||
let payload = SignUpPayload {
|
||||
email: random_email(),
|
||||
name: "app flowy".to_string(),
|
||||
password: password.clone(),
|
||||
@ -178,7 +179,7 @@ pub async fn init_user_setting(dispatch: Arc<EventDispatcher>) {
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn sign_in(dispatch: Arc<EventDispatcher>) -> UserProfile {
|
||||
let payload = SignInRequest {
|
||||
let payload = SignInPayload {
|
||||
email: login_email(),
|
||||
password: login_password(),
|
||||
name: "rust".to_owned(),
|
||||
|
@ -39,16 +39,16 @@ pub enum UserEvent {
|
||||
#[event()]
|
||||
InitUser = 0,
|
||||
|
||||
#[event(input = "SignInRequest", output = "UserProfile")]
|
||||
#[event(input = "SignInPayload", output = "UserProfile")]
|
||||
SignIn = 1,
|
||||
|
||||
#[event(input = "SignUpRequest", output = "UserProfile")]
|
||||
#[event(input = "SignUpPayload", output = "UserProfile")]
|
||||
SignUp = 2,
|
||||
|
||||
#[event(passthrough)]
|
||||
SignOut = 3,
|
||||
|
||||
#[event(input = "UpdateUserRequest")]
|
||||
#[event(input = "UpdateUserPayload")]
|
||||
UpdateUser = 4,
|
||||
|
||||
#[event(output = "UserProfile")]
|
||||
|
@ -7,7 +7,7 @@ use std::{convert::TryInto, sync::Arc};
|
||||
// tracing instrument 👉🏻 https://docs.rs/tracing/0.1.26/tracing/attr.instrument.html
|
||||
#[tracing::instrument(name = "sign_in", skip(data, session), fields(email = %data.email), err)]
|
||||
pub async fn sign_in(
|
||||
data: Data<SignInRequest>,
|
||||
data: Data<SignInPayload>,
|
||||
session: Unit<Arc<UserSession>>,
|
||||
) -> DataResult<UserProfile, FlowyError> {
|
||||
let params: SignInParams = data.into_inner().try_into()?;
|
||||
@ -25,7 +25,7 @@ pub async fn sign_in(
|
||||
err
|
||||
)]
|
||||
pub async fn sign_up(
|
||||
data: Data<SignUpRequest>,
|
||||
data: Data<SignUpPayload>,
|
||||
session: Unit<Arc<UserSession>>,
|
||||
) -> DataResult<UserProfile, FlowyError> {
|
||||
let params: SignUpParams = data.into_inner().try_into()?;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::{errors::FlowyError, services::UserSession};
|
||||
use flowy_database::kv::KV;
|
||||
use flowy_user_data_model::entities::{
|
||||
AppearanceSettings, UpdateUserParams, UpdateUserRequest, UserProfile, APPEARANCE_DEFAULT_THEME,
|
||||
AppearanceSettings, UpdateUserParams, UpdateUserPayload, UserProfile, APPEARANCE_DEFAULT_THEME,
|
||||
};
|
||||
use lib_dispatch::prelude::*;
|
||||
use std::{convert::TryInto, sync::Arc};
|
||||
@ -32,7 +32,7 @@ pub async fn sign_out(session: Unit<Arc<UserSession>>) -> Result<(), FlowyError>
|
||||
|
||||
#[tracing::instrument(name = "update_user", skip(data, session))]
|
||||
pub async fn update_user_handler(
|
||||
data: Data<UpdateUserRequest>,
|
||||
data: Data<UpdateUserPayload>,
|
||||
session: Unit<Arc<UserSession>>,
|
||||
) -> Result<(), FlowyError> {
|
||||
let params: UpdateUserParams = data.into_inner().try_into()?;
|
||||
|
@ -1,13 +1,13 @@
|
||||
use crate::helper::*;
|
||||
use flowy_test::{event_builder::UserModuleEventBuilder, FlowySDKTest};
|
||||
use flowy_user::{errors::ErrorCode, event_map::UserEvent::*};
|
||||
use flowy_user_data_model::entities::{SignInRequest, SignUpRequest, UserProfile};
|
||||
use flowy_user_data_model::entities::{SignInPayload, SignUpPayload, UserProfile};
|
||||
|
||||
#[tokio::test]
|
||||
async fn sign_up_with_invalid_email() {
|
||||
for email in invalid_email_test_case() {
|
||||
let sdk = FlowySDKTest::default();
|
||||
let request = SignUpRequest {
|
||||
let request = SignUpPayload {
|
||||
email: email.to_string(),
|
||||
name: valid_name(),
|
||||
password: login_password(),
|
||||
@ -16,7 +16,7 @@ async fn sign_up_with_invalid_email() {
|
||||
assert_eq!(
|
||||
UserModuleEventBuilder::new(sdk)
|
||||
.event(SignUp)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await
|
||||
.error()
|
||||
@ -29,7 +29,7 @@ async fn sign_up_with_invalid_email() {
|
||||
async fn sign_up_with_invalid_password() {
|
||||
for password in invalid_password_test_case() {
|
||||
let sdk = FlowySDKTest::default();
|
||||
let request = SignUpRequest {
|
||||
let request = SignUpPayload {
|
||||
email: random_email(),
|
||||
name: valid_name(),
|
||||
password,
|
||||
@ -37,7 +37,7 @@ async fn sign_up_with_invalid_password() {
|
||||
|
||||
UserModuleEventBuilder::new(sdk)
|
||||
.event(SignUp)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await
|
||||
.assert_error();
|
||||
@ -50,7 +50,7 @@ async fn sign_in_success() {
|
||||
let _ = UserModuleEventBuilder::new(test.clone()).event(SignOut).sync_send();
|
||||
let sign_up_context = test.sign_up().await;
|
||||
|
||||
let request = SignInRequest {
|
||||
let request = SignInPayload {
|
||||
email: sign_up_context.user_profile.email.clone(),
|
||||
password: sign_up_context.password.clone(),
|
||||
name: "".to_string(),
|
||||
@ -58,7 +58,7 @@ async fn sign_in_success() {
|
||||
|
||||
let response = UserModuleEventBuilder::new(test.clone())
|
||||
.event(SignIn)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await
|
||||
.parse::<UserProfile>();
|
||||
@ -69,7 +69,7 @@ async fn sign_in_success() {
|
||||
async fn sign_in_with_invalid_email() {
|
||||
for email in invalid_email_test_case() {
|
||||
let sdk = FlowySDKTest::default();
|
||||
let request = SignInRequest {
|
||||
let request = SignInPayload {
|
||||
email: email.to_string(),
|
||||
password: login_password(),
|
||||
name: "".to_string(),
|
||||
@ -78,7 +78,7 @@ async fn sign_in_with_invalid_email() {
|
||||
assert_eq!(
|
||||
UserModuleEventBuilder::new(sdk)
|
||||
.event(SignIn)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await
|
||||
.error()
|
||||
@ -93,7 +93,7 @@ async fn sign_in_with_invalid_password() {
|
||||
for password in invalid_password_test_case() {
|
||||
let sdk = FlowySDKTest::default();
|
||||
|
||||
let request = SignInRequest {
|
||||
let request = SignInPayload {
|
||||
email: random_email(),
|
||||
password,
|
||||
name: "".to_string(),
|
||||
@ -101,7 +101,7 @@ async fn sign_in_with_invalid_password() {
|
||||
|
||||
UserModuleEventBuilder::new(sdk)
|
||||
.event(SignIn)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.async_send()
|
||||
.await
|
||||
.assert_error();
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::helper::*;
|
||||
use flowy_test::{event_builder::UserModuleEventBuilder, FlowySDKTest};
|
||||
use flowy_user::{errors::ErrorCode, event_map::UserEvent::*};
|
||||
use flowy_user_data_model::entities::{UpdateUserRequest, UserProfile};
|
||||
use flowy_user_data_model::entities::{UpdateUserPayload, UserProfile};
|
||||
use lib_infra::uuid_string;
|
||||
use serial_test::*;
|
||||
|
||||
@ -34,10 +34,10 @@ async fn user_update_with_name() {
|
||||
let sdk = FlowySDKTest::default();
|
||||
let user = sdk.init_user().await;
|
||||
let new_name = "hello_world".to_owned();
|
||||
let request = UpdateUserRequest::new(&user.id).name(&new_name);
|
||||
let request = UpdateUserPayload::new(&user.id).name(&new_name);
|
||||
let _ = UserModuleEventBuilder::new(sdk.clone())
|
||||
.event(UpdateUser)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.sync_send();
|
||||
|
||||
let user_profile = UserModuleEventBuilder::new(sdk.clone())
|
||||
@ -55,10 +55,10 @@ async fn user_update_with_email() {
|
||||
let sdk = FlowySDKTest::default();
|
||||
let user = sdk.init_user().await;
|
||||
let new_email = format!("{}@gmail.com", uuid_string());
|
||||
let request = UpdateUserRequest::new(&user.id).email(&new_email);
|
||||
let request = UpdateUserPayload::new(&user.id).email(&new_email);
|
||||
let _ = UserModuleEventBuilder::new(sdk.clone())
|
||||
.event(UpdateUser)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.sync_send();
|
||||
let user_profile = UserModuleEventBuilder::new(sdk.clone())
|
||||
.event(GetUserProfile)
|
||||
@ -75,11 +75,11 @@ async fn user_update_with_password() {
|
||||
let sdk = FlowySDKTest::default();
|
||||
let user = sdk.init_user().await;
|
||||
let new_password = "H123world!".to_owned();
|
||||
let request = UpdateUserRequest::new(&user.id).password(&new_password);
|
||||
let request = UpdateUserPayload::new(&user.id).password(&new_password);
|
||||
|
||||
let _ = UserModuleEventBuilder::new(sdk.clone())
|
||||
.event(UpdateUser)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.sync_send()
|
||||
.assert_success();
|
||||
}
|
||||
@ -90,11 +90,11 @@ async fn user_update_with_invalid_email() {
|
||||
let test = FlowySDKTest::default();
|
||||
let user = test.init_user().await;
|
||||
for email in invalid_email_test_case() {
|
||||
let request = UpdateUserRequest::new(&user.id).email(&email);
|
||||
let request = UpdateUserPayload::new(&user.id).email(&email);
|
||||
assert_eq!(
|
||||
UserModuleEventBuilder::new(test.clone())
|
||||
.event(UpdateUser)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.sync_send()
|
||||
.error()
|
||||
.code,
|
||||
@ -109,11 +109,11 @@ async fn user_update_with_invalid_password() {
|
||||
let test = FlowySDKTest::default();
|
||||
let user = test.init_user().await;
|
||||
for password in invalid_password_test_case() {
|
||||
let request = UpdateUserRequest::new(&user.id).password(&password);
|
||||
let request = UpdateUserPayload::new(&user.id).password(&password);
|
||||
|
||||
UserModuleEventBuilder::new(test.clone())
|
||||
.event(UpdateUser)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.sync_send()
|
||||
.assert_error();
|
||||
}
|
||||
@ -124,10 +124,10 @@ async fn user_update_with_invalid_password() {
|
||||
async fn user_update_with_invalid_name() {
|
||||
let test = FlowySDKTest::default();
|
||||
let user = test.init_user().await;
|
||||
let request = UpdateUserRequest::new(&user.id).name("");
|
||||
let request = UpdateUserPayload::new(&user.id).name("");
|
||||
UserModuleEventBuilder::new(test.clone())
|
||||
.event(UpdateUser)
|
||||
.request(request)
|
||||
.payload(request)
|
||||
.sync_send()
|
||||
.assert_error();
|
||||
}
|
||||
|
@ -14,13 +14,7 @@ where
|
||||
fn into_bytes(self) -> Result<Bytes, DispatchError> {
|
||||
match self.try_into() {
|
||||
Ok(data) => Ok(data),
|
||||
Err(e) => {
|
||||
// let system_err: DispatchError = InternalError::new(format!("{:?}",
|
||||
// e)).into(); system_err.into()
|
||||
// Err(format!("{:?}", e))
|
||||
|
||||
Err(InternalError::ProtobufError(format!("{:?}", e)).into())
|
||||
}
|
||||
Err(e) => Err(InternalError::ProtobufError(format!("{:?}", e)).into()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -90,19 +90,19 @@ pub struct NewDocUser {
|
||||
#[derive(ProtoBuf, Default, Debug, Clone)]
|
||||
pub struct DocumentId {
|
||||
#[pb(index = 1)]
|
||||
pub doc_id: String,
|
||||
pub value: String,
|
||||
}
|
||||
|
||||
impl std::convert::From<String> for DocumentId {
|
||||
fn from(doc_id: String) -> Self {
|
||||
DocumentId { doc_id }
|
||||
DocumentId { value: doc_id }
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::From<&String> for DocumentId {
|
||||
fn from(doc_id: &String) -> Self {
|
||||
DocumentId {
|
||||
doc_id: doc_id.to_owned(),
|
||||
value: doc_id.to_owned(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1166,7 +1166,7 @@ impl ::protobuf::reflect::ProtobufValue for NewDocUser {
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct DocumentId {
|
||||
// message fields
|
||||
pub doc_id: ::std::string::String,
|
||||
pub value: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
@ -1183,30 +1183,30 @@ impl DocumentId {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string doc_id = 1;
|
||||
// string value = 1;
|
||||
|
||||
|
||||
pub fn get_doc_id(&self) -> &str {
|
||||
&self.doc_id
|
||||
pub fn get_value(&self) -> &str {
|
||||
&self.value
|
||||
}
|
||||
pub fn clear_doc_id(&mut self) {
|
||||
self.doc_id.clear();
|
||||
pub fn clear_value(&mut self) {
|
||||
self.value.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_doc_id(&mut self, v: ::std::string::String) {
|
||||
self.doc_id = v;
|
||||
pub fn set_value(&mut self, v: ::std::string::String) {
|
||||
self.value = v;
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
// If field is not initialized, it is initialized with default value first.
|
||||
pub fn mut_doc_id(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.doc_id
|
||||
pub fn mut_value(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.value
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_doc_id(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.doc_id, ::std::string::String::new())
|
||||
pub fn take_value(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.value, ::std::string::String::new())
|
||||
}
|
||||
}
|
||||
|
||||
@ -1220,7 +1220,7 @@ impl ::protobuf::Message for DocumentId {
|
||||
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.doc_id)?;
|
||||
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
@ -1234,8 +1234,8 @@ impl ::protobuf::Message for DocumentId {
|
||||
#[allow(unused_variables)]
|
||||
fn compute_size(&self) -> u32 {
|
||||
let mut my_size = 0;
|
||||
if !self.doc_id.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.doc_id);
|
||||
if !self.value.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.value);
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
@ -1243,8 +1243,8 @@ impl ::protobuf::Message for DocumentId {
|
||||
}
|
||||
|
||||
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
|
||||
if !self.doc_id.is_empty() {
|
||||
os.write_string(1, &self.doc_id)?;
|
||||
if !self.value.is_empty() {
|
||||
os.write_string(1, &self.value)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
@ -1285,9 +1285,9 @@ impl ::protobuf::Message for DocumentId {
|
||||
descriptor.get(|| {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"doc_id",
|
||||
|m: &DocumentId| { &m.doc_id },
|
||||
|m: &mut DocumentId| { &mut m.doc_id },
|
||||
"value",
|
||||
|m: &DocumentId| { &m.value },
|
||||
|m: &mut DocumentId| { &mut m.value },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<DocumentId>(
|
||||
"DocumentId",
|
||||
@ -1305,7 +1305,7 @@ impl ::protobuf::Message for DocumentId {
|
||||
|
||||
impl ::protobuf::Clear for DocumentId {
|
||||
fn clear(&mut self) {
|
||||
self.doc_id.clear();
|
||||
self.value.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
@ -1334,8 +1334,8 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
entDelta\x12\x15\n\x06doc_id\x18\x01\x20\x01(\tR\x05docId\x12\x1d\n\ndel\
|
||||
ta_json\x18\x02\x20\x01(\tR\tdeltaJson\"S\n\nNewDocUser\x12\x17\n\x07use\
|
||||
r_id\x18\x01\x20\x01(\tR\x06userId\x12\x15\n\x06rev_id\x18\x02\x20\x01(\
|
||||
\x03R\x05revId\x12\x15\n\x06doc_id\x18\x03\x20\x01(\tR\x05docId\"#\n\nDo\
|
||||
cumentId\x12\x15\n\x06doc_id\x18\x01\x20\x01(\tR\x05docIdb\x06proto3\
|
||||
\x03R\x05revId\x12\x15\n\x06doc_id\x18\x03\x20\x01(\tR\x05docId\"\"\n\nD\
|
||||
ocumentId\x12\x14\n\x05value\x18\x01\x20\x01(\tR\x05valueb\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
@ -25,5 +25,5 @@ message NewDocUser {
|
||||
string doc_id = 3;
|
||||
}
|
||||
message DocumentId {
|
||||
string doc_id = 1;
|
||||
string value = 1;
|
||||
}
|
||||
|
@ -112,9 +112,9 @@ pub fn repeated_revision_pb_from_revisions(revisions: Vec<RevisionPB>) -> Repeat
|
||||
}
|
||||
|
||||
pub fn repeated_revision_from_repeated_revision_pb(
|
||||
mut repeated_revision: RepeatedRevisionPB,
|
||||
repeated_revision: RepeatedRevisionPB,
|
||||
) -> CollaborateResult<RepeatedRevision> {
|
||||
(&mut repeated_revision)
|
||||
repeated_revision
|
||||
.try_into()
|
||||
.map_err(|e| CollaborateError::internal().context(format!("Cast repeated revision failed: {:?}", e)))
|
||||
}
|
||||
@ -156,10 +156,8 @@ pub fn make_folder_from_revisions_pb(
|
||||
) -> Result<Option<FolderInfo>, CollaborateError> {
|
||||
match make_folder_pb_from_revisions_pb(folder_id, revisions)? {
|
||||
None => Ok(None),
|
||||
Some(mut pb) => {
|
||||
let folder_info: FolderInfo = (&mut pb)
|
||||
.try_into()
|
||||
.map_err(|e| CollaborateError::internal().context(e))?;
|
||||
Some(pb) => {
|
||||
let folder_info: FolderInfo = pb.try_into().map_err(|e| CollaborateError::internal().context(e))?;
|
||||
Ok(Some(folder_info))
|
||||
}
|
||||
}
|
||||
@ -204,8 +202,8 @@ pub fn make_document_info_from_revisions_pb(
|
||||
) -> Result<Option<DocumentInfo>, CollaborateError> {
|
||||
match make_document_info_pb_from_revisions_pb(doc_id, revisions)? {
|
||||
None => Ok(None),
|
||||
Some(mut pb) => {
|
||||
let document_info: DocumentInfo = (&mut pb).try_into().map_err(|e| {
|
||||
Some(pb) => {
|
||||
let document_info: DocumentInfo = pb.try_into().map_err(|e| {
|
||||
CollaborateError::internal().context(format!("Deserialize document info from pb failed: {}", e))
|
||||
})?;
|
||||
Ok(Some(document_info))
|
||||
|
@ -25,14 +25,14 @@ pub fn make_de_token_steam(ctxt: &Ctxt, ast: &ASTContainer) -> Option<TokenStrea
|
||||
impl std::convert::TryFrom<bytes::Bytes> for #struct_ident {
|
||||
type Error = ::protobuf::ProtobufError;
|
||||
fn try_from(bytes: bytes::Bytes) -> Result<Self, Self::Error> {
|
||||
let mut pb: crate::protobuf::#pb_ty = ::protobuf::Message::parse_from_bytes(&bytes)?;
|
||||
#struct_ident::try_from(&mut pb)
|
||||
let pb: crate::protobuf::#pb_ty = ::protobuf::Message::parse_from_bytes(&bytes)?;
|
||||
#struct_ident::try_from(pb)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom<&mut crate::protobuf::#pb_ty> for #struct_ident {
|
||||
impl std::convert::TryFrom<crate::protobuf::#pb_ty> for #struct_ident {
|
||||
type Error = ::protobuf::ProtobufError;
|
||||
fn try_from(pb: &mut crate::protobuf::#pb_ty) -> Result<Self, Self::Error> {
|
||||
fn try_from(mut pb: crate::protobuf::#pb_ty) -> Result<Self, Self::Error> {
|
||||
let mut o = Self::default();
|
||||
#(#build_take_fields)*
|
||||
Ok(o)
|
||||
@ -99,7 +99,7 @@ fn token_stream_for_one_of(ctxt: &Ctxt, field: &ASTField) -> Option<TokenStream>
|
||||
let ty = bracketed_ty_info.unwrap().ty;
|
||||
Some(quote! {
|
||||
if pb.#has_func() {
|
||||
let val = #ty::try_from(&mut pb.#take_func()).unwrap();
|
||||
let val = #ty::try_from(pb.#take_func()).unwrap();
|
||||
o.#member=Some(val);
|
||||
}
|
||||
})
|
||||
@ -133,7 +133,7 @@ fn token_stream_for_field(ctxt: &Ctxt, member: &syn::Member, ty: &syn::Type, is_
|
||||
Some(quote! {
|
||||
let some_value = pb.#member.#take();
|
||||
if some_value.is_some() {
|
||||
let struct_de_from_pb = #ty::try_from(&mut some_value.unwrap()).unwrap();
|
||||
let struct_de_from_pb = #ty::try_from(some_value.unwrap()).unwrap();
|
||||
o.#member = struct_de_from_pb;
|
||||
}
|
||||
})
|
||||
@ -187,7 +187,7 @@ fn token_stream_for_vec(ctxt: &Ctxt, member: &syn::Member, bracketed_type: &TyIn
|
||||
Some(quote! {
|
||||
o.#member = pb.#take_ident()
|
||||
.into_iter()
|
||||
.map(|mut m| #ty::try_from(&mut m).unwrap())
|
||||
.map(|m| #ty::try_from(m).unwrap())
|
||||
.collect();
|
||||
})
|
||||
}
|
||||
@ -216,8 +216,8 @@ fn token_stream_for_map(ctxt: &Ctxt, member: &syn::Member, bracketed_type: &TyIn
|
||||
match ident_category(bracketed_type.ident) {
|
||||
TypeCategory::Protobuf => Some(quote! {
|
||||
let mut m: std::collections::HashMap<String, #ty> = std::collections::HashMap::new();
|
||||
pb.#take_ident().into_iter().for_each(|(k,mut v)| {
|
||||
m.insert(k.clone(), #ty::try_from(&mut v).unwrap());
|
||||
pb.#take_ident().into_iter().for_each(|(k,v)| {
|
||||
m.insert(k.clone(), #ty::try_from(v).unwrap());
|
||||
});
|
||||
o.#member = m;
|
||||
}),
|
||||
|
@ -48,7 +48,7 @@ pub struct RepeatedApp {
|
||||
impl_def_and_def_mut!(RepeatedApp, App);
|
||||
|
||||
#[derive(ProtoBuf, Default)]
|
||||
pub struct CreateAppRequest {
|
||||
pub struct CreateAppPayload {
|
||||
#[pb(index = 1)]
|
||||
pub workspace_id: String,
|
||||
|
||||
@ -83,7 +83,7 @@ pub struct CreateAppParams {
|
||||
pub color_style: ColorStyle,
|
||||
}
|
||||
|
||||
impl TryInto<CreateAppParams> for CreateAppRequest {
|
||||
impl TryInto<CreateAppParams> for CreateAppPayload {
|
||||
type Error = ErrorCode;
|
||||
|
||||
fn try_into(self) -> Result<CreateAppParams, Self::Error> {
|
||||
@ -108,44 +108,22 @@ impl std::convert::From<AppColorStyle> for ColorStyle {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, ProtoBuf, Clone)]
|
||||
pub struct QueryAppRequest {
|
||||
#[pb(index = 1)]
|
||||
pub app_ids: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(ProtoBuf, Default, Clone, Debug)]
|
||||
pub struct AppId {
|
||||
#[pb(index = 1)]
|
||||
pub app_id: String,
|
||||
pub value: String,
|
||||
}
|
||||
|
||||
impl AppId {
|
||||
pub fn new(app_id: &str) -> Self {
|
||||
Self {
|
||||
app_id: app_id.to_string(),
|
||||
value: app_id.to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl TryInto<AppId> for QueryAppRequest {
|
||||
type Error = ErrorCode;
|
||||
|
||||
fn try_into(self) -> Result<AppId, Self::Error> {
|
||||
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 {
|
||||
pub struct UpdateAppPayload {
|
||||
#[pb(index = 1)]
|
||||
pub app_id: String,
|
||||
|
||||
@ -204,7 +182,7 @@ impl UpdateAppParams {
|
||||
}
|
||||
}
|
||||
|
||||
impl TryInto<UpdateAppParams> for UpdateAppRequest {
|
||||
impl TryInto<UpdateAppParams> for UpdateAppPayload {
|
||||
type Error = ErrorCode;
|
||||
|
||||
fn try_into(self) -> Result<UpdateAppParams, Self::Error> {
|
||||
|
@ -30,7 +30,7 @@ impl std::convert::From<i32> for ExportType {
|
||||
}
|
||||
|
||||
#[derive(Default, ProtoBuf)]
|
||||
pub struct ExportRequest {
|
||||
pub struct ExportPayload {
|
||||
#[pb(index = 1)]
|
||||
pub doc_id: String,
|
||||
|
||||
@ -44,7 +44,7 @@ pub struct ExportParams {
|
||||
pub export_type: ExportType,
|
||||
}
|
||||
|
||||
impl TryInto<ExportParams> for ExportRequest {
|
||||
impl TryInto<ExportParams> for ExportPayload {
|
||||
type Error = ErrorCode;
|
||||
fn try_into(self) -> Result<ExportParams, Self::Error> {
|
||||
Ok(ExportParams {
|
||||
|
@ -88,7 +88,7 @@ impl std::convert::From<i32> for ViewType {
|
||||
}
|
||||
|
||||
#[derive(Default, ProtoBuf)]
|
||||
pub struct CreateViewRequest {
|
||||
pub struct CreateViewPayload {
|
||||
#[pb(index = 1)]
|
||||
pub belong_to_id: String,
|
||||
|
||||
@ -152,7 +152,7 @@ impl CreateViewParams {
|
||||
}
|
||||
}
|
||||
|
||||
impl TryInto<CreateViewParams> for CreateViewRequest {
|
||||
impl TryInto<CreateViewParams> for CreateViewPayload {
|
||||
type Error = ErrorCode;
|
||||
|
||||
fn try_into(self) -> Result<CreateViewParams, Self::Error> {
|
||||
@ -180,16 +180,16 @@ impl TryInto<CreateViewParams> for CreateViewRequest {
|
||||
#[derive(Default, ProtoBuf, Clone, Debug)]
|
||||
pub struct ViewId {
|
||||
#[pb(index = 1)]
|
||||
pub view_id: String,
|
||||
pub value: String,
|
||||
}
|
||||
|
||||
// impl<T: ToString> std::convert::From<T> for ViewId {
|
||||
// fn from(value: T) -> Self {
|
||||
// ViewId {
|
||||
// view_id: value.to_string(),
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
impl std::convert::From<&str> for ViewId {
|
||||
fn from(value: &str) -> Self {
|
||||
ViewId {
|
||||
value: value.to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, ProtoBuf)]
|
||||
pub struct RepeatedViewId {
|
||||
@ -198,7 +198,7 @@ pub struct RepeatedViewId {
|
||||
}
|
||||
|
||||
#[derive(Default, ProtoBuf)]
|
||||
pub struct UpdateViewRequest {
|
||||
pub struct UpdateViewPayload {
|
||||
#[pb(index = 1)]
|
||||
pub view_id: String,
|
||||
|
||||
@ -246,7 +246,7 @@ impl UpdateViewParams {
|
||||
}
|
||||
}
|
||||
|
||||
impl TryInto<UpdateViewParams> for UpdateViewRequest {
|
||||
impl TryInto<UpdateViewParams> for UpdateViewPayload {
|
||||
type Error = ErrorCode;
|
||||
|
||||
fn try_into(self) -> Result<UpdateViewParams, Self::Error> {
|
||||
|
@ -38,7 +38,7 @@ pub struct RepeatedWorkspace {
|
||||
impl_def_and_def_mut!(RepeatedWorkspace, Workspace);
|
||||
|
||||
#[derive(ProtoBuf, Default)]
|
||||
pub struct CreateWorkspaceRequest {
|
||||
pub struct CreateWorkspacePayload {
|
||||
#[pb(index = 1)]
|
||||
pub name: String,
|
||||
|
||||
@ -55,7 +55,7 @@ pub struct CreateWorkspaceParams {
|
||||
pub desc: String,
|
||||
}
|
||||
|
||||
impl TryInto<CreateWorkspaceParams> for CreateWorkspaceRequest {
|
||||
impl TryInto<CreateWorkspaceParams> for CreateWorkspacePayload {
|
||||
type Error = ErrorCode;
|
||||
|
||||
fn try_into(self) -> Result<CreateWorkspaceParams, Self::Error> {
|
||||
@ -69,42 +69,16 @@ impl TryInto<CreateWorkspaceParams> for CreateWorkspaceRequest {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, ProtoBuf, Clone)]
|
||||
pub struct QueryWorkspaceRequest {
|
||||
// return all workspace if workspace_id is None
|
||||
#[pb(index = 1, one_of)]
|
||||
pub workspace_id: Option<String>,
|
||||
}
|
||||
|
||||
impl QueryWorkspaceRequest {
|
||||
pub fn new(workspace_id: Option<String>) -> 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<String>,
|
||||
pub value: Option<String>,
|
||||
}
|
||||
|
||||
impl WorkspaceId {
|
||||
pub fn new(workspace_id: Option<String>) -> Self {
|
||||
Self { workspace_id }
|
||||
}
|
||||
}
|
||||
|
||||
impl TryInto<WorkspaceId> for QueryWorkspaceRequest {
|
||||
type Error = ErrorCode;
|
||||
|
||||
fn try_into(self) -> Result<WorkspaceId, Self::Error> {
|
||||
let workspace_id = match self.workspace_id {
|
||||
None => None,
|
||||
Some(workspace_id) => Some(WorkspaceIdentify::parse(workspace_id)?.0),
|
||||
};
|
||||
|
||||
Ok(WorkspaceId { workspace_id })
|
||||
Self { value: workspace_id }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -637,7 +637,7 @@ impl ::protobuf::reflect::ProtobufValue for RepeatedApp {
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct CreateAppRequest {
|
||||
pub struct CreateAppPayload {
|
||||
// message fields
|
||||
pub workspace_id: ::std::string::String,
|
||||
pub name: ::std::string::String,
|
||||
@ -648,14 +648,14 @@ pub struct CreateAppRequest {
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a CreateAppRequest {
|
||||
fn default() -> &'a CreateAppRequest {
|
||||
<CreateAppRequest as ::protobuf::Message>::default_instance()
|
||||
impl<'a> ::std::default::Default for &'a CreateAppPayload {
|
||||
fn default() -> &'a CreateAppPayload {
|
||||
<CreateAppPayload as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl CreateAppRequest {
|
||||
pub fn new() -> CreateAppRequest {
|
||||
impl CreateAppPayload {
|
||||
pub fn new() -> CreateAppPayload {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
@ -771,7 +771,7 @@ impl CreateAppRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for CreateAppRequest {
|
||||
impl ::protobuf::Message for CreateAppPayload {
|
||||
fn is_initialized(&self) -> bool {
|
||||
for v in &self.color_style {
|
||||
if !v.is_initialized() {
|
||||
@ -872,8 +872,8 @@ impl ::protobuf::Message for CreateAppRequest {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> CreateAppRequest {
|
||||
CreateAppRequest::new()
|
||||
fn new() -> CreateAppPayload {
|
||||
CreateAppPayload::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
@ -882,39 +882,39 @@ impl ::protobuf::Message for CreateAppRequest {
|
||||
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 },
|
||||
|m: &CreateAppPayload| { &m.workspace_id },
|
||||
|m: &mut CreateAppPayload| { &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 },
|
||||
|m: &CreateAppPayload| { &m.name },
|
||||
|m: &mut CreateAppPayload| { &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 },
|
||||
|m: &CreateAppPayload| { &m.desc },
|
||||
|m: &mut CreateAppPayload| { &mut m.desc },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<ColorStyle>>(
|
||||
"color_style",
|
||||
|m: &CreateAppRequest| { &m.color_style },
|
||||
|m: &mut CreateAppRequest| { &mut m.color_style },
|
||||
|m: &CreateAppPayload| { &m.color_style },
|
||||
|m: &mut CreateAppPayload| { &mut m.color_style },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateAppRequest>(
|
||||
"CreateAppRequest",
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateAppPayload>(
|
||||
"CreateAppPayload",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static CreateAppRequest {
|
||||
static instance: ::protobuf::rt::LazyV2<CreateAppRequest> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(CreateAppRequest::new)
|
||||
fn default_instance() -> &'static CreateAppPayload {
|
||||
static instance: ::protobuf::rt::LazyV2<CreateAppPayload> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(CreateAppPayload::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for CreateAppRequest {
|
||||
impl ::protobuf::Clear for CreateAppPayload {
|
||||
fn clear(&mut self) {
|
||||
self.workspace_id.clear();
|
||||
self.name.clear();
|
||||
@ -924,13 +924,13 @@ impl ::protobuf::Clear for CreateAppRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for CreateAppRequest {
|
||||
impl ::std::fmt::Debug for CreateAppPayload {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for CreateAppRequest {
|
||||
impl ::protobuf::reflect::ProtobufValue for CreateAppPayload {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
@ -1395,168 +1395,10 @@ impl ::protobuf::reflect::ProtobufValue for CreateAppParams {
|
||||
}
|
||||
}
|
||||
|
||||
#[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 {
|
||||
<QueryAppRequest as ::protobuf::Message>::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<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
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>(
|
||||
"QueryAppRequest",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static QueryAppRequest {
|
||||
static instance: ::protobuf::rt::LazyV2<QueryAppRequest> = ::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,
|
||||
pub value: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
@ -1573,30 +1415,30 @@ impl AppId {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string app_id = 1;
|
||||
// string value = 1;
|
||||
|
||||
|
||||
pub fn get_app_id(&self) -> &str {
|
||||
&self.app_id
|
||||
pub fn get_value(&self) -> &str {
|
||||
&self.value
|
||||
}
|
||||
pub fn clear_app_id(&mut self) {
|
||||
self.app_id.clear();
|
||||
pub fn clear_value(&mut self) {
|
||||
self.value.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_app_id(&mut self, v: ::std::string::String) {
|
||||
self.app_id = v;
|
||||
pub fn set_value(&mut self, v: ::std::string::String) {
|
||||
self.value = 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
|
||||
pub fn mut_value(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.value
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_app_id(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.app_id, ::std::string::String::new())
|
||||
pub fn take_value(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.value, ::std::string::String::new())
|
||||
}
|
||||
}
|
||||
|
||||
@ -1610,7 +1452,7 @@ impl ::protobuf::Message for AppId {
|
||||
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_singular_proto3_string_into(wire_type, is, &mut self.value)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
@ -1624,8 +1466,8 @@ impl ::protobuf::Message for AppId {
|
||||
#[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 !self.value.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.value);
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
@ -1633,8 +1475,8 @@ impl ::protobuf::Message for AppId {
|
||||
}
|
||||
|
||||
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 !self.value.is_empty() {
|
||||
os.write_string(1, &self.value)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
@ -1675,9 +1517,9 @@ impl ::protobuf::Message for AppId {
|
||||
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 },
|
||||
"value",
|
||||
|m: &AppId| { &m.value },
|
||||
|m: &mut AppId| { &mut m.value },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<AppId>(
|
||||
"AppId",
|
||||
@ -1695,7 +1537,7 @@ impl ::protobuf::Message for AppId {
|
||||
|
||||
impl ::protobuf::Clear for AppId {
|
||||
fn clear(&mut self) {
|
||||
self.app_id.clear();
|
||||
self.value.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
@ -1713,47 +1555,47 @@ impl ::protobuf::reflect::ProtobufValue for AppId {
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct UpdateAppRequest {
|
||||
pub struct UpdateAppPayload {
|
||||
// message fields
|
||||
pub app_id: ::std::string::String,
|
||||
// message oneof groups
|
||||
pub one_of_name: ::std::option::Option<UpdateAppRequest_oneof_one_of_name>,
|
||||
pub one_of_desc: ::std::option::Option<UpdateAppRequest_oneof_one_of_desc>,
|
||||
pub one_of_color_style: ::std::option::Option<UpdateAppRequest_oneof_one_of_color_style>,
|
||||
pub one_of_is_trash: ::std::option::Option<UpdateAppRequest_oneof_one_of_is_trash>,
|
||||
pub one_of_name: ::std::option::Option<UpdateAppPayload_oneof_one_of_name>,
|
||||
pub one_of_desc: ::std::option::Option<UpdateAppPayload_oneof_one_of_desc>,
|
||||
pub one_of_color_style: ::std::option::Option<UpdateAppPayload_oneof_one_of_color_style>,
|
||||
pub one_of_is_trash: ::std::option::Option<UpdateAppPayload_oneof_one_of_is_trash>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a UpdateAppRequest {
|
||||
fn default() -> &'a UpdateAppRequest {
|
||||
<UpdateAppRequest as ::protobuf::Message>::default_instance()
|
||||
impl<'a> ::std::default::Default for &'a UpdateAppPayload {
|
||||
fn default() -> &'a UpdateAppPayload {
|
||||
<UpdateAppPayload as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateAppRequest_oneof_one_of_name {
|
||||
pub enum UpdateAppPayload_oneof_one_of_name {
|
||||
name(::std::string::String),
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateAppRequest_oneof_one_of_desc {
|
||||
pub enum UpdateAppPayload_oneof_one_of_desc {
|
||||
desc(::std::string::String),
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateAppRequest_oneof_one_of_color_style {
|
||||
pub enum UpdateAppPayload_oneof_one_of_color_style {
|
||||
color_style(ColorStyle),
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateAppRequest_oneof_one_of_is_trash {
|
||||
pub enum UpdateAppPayload_oneof_one_of_is_trash {
|
||||
is_trash(bool),
|
||||
}
|
||||
|
||||
impl UpdateAppRequest {
|
||||
pub fn new() -> UpdateAppRequest {
|
||||
impl UpdateAppPayload {
|
||||
pub fn new() -> UpdateAppPayload {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
@ -1788,7 +1630,7 @@ impl UpdateAppRequest {
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
match self.one_of_name {
|
||||
::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(ref v)) => v,
|
||||
::std::option::Option::Some(UpdateAppPayload_oneof_one_of_name::name(ref v)) => v,
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
@ -1798,24 +1640,24 @@ impl UpdateAppRequest {
|
||||
|
||||
pub fn has_name(&self) -> bool {
|
||||
match self.one_of_name {
|
||||
::std::option::Option::Some(UpdateAppRequest_oneof_one_of_name::name(..)) => true,
|
||||
::std::option::Option::Some(UpdateAppPayload_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))
|
||||
self.one_of_name = ::std::option::Option::Some(UpdateAppPayload_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 {
|
||||
if let ::std::option::Option::Some(UpdateAppPayload_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()));
|
||||
self.one_of_name = ::std::option::Option::Some(UpdateAppPayload_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,
|
||||
::std::option::Option::Some(UpdateAppPayload_oneof_one_of_name::name(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
@ -1824,7 +1666,7 @@ impl UpdateAppRequest {
|
||||
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,
|
||||
::std::option::Option::Some(UpdateAppPayload_oneof_one_of_name::name(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
@ -1837,7 +1679,7 @@ impl UpdateAppRequest {
|
||||
|
||||
pub fn get_desc(&self) -> &str {
|
||||
match self.one_of_desc {
|
||||
::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(ref v)) => v,
|
||||
::std::option::Option::Some(UpdateAppPayload_oneof_one_of_desc::desc(ref v)) => v,
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
@ -1847,24 +1689,24 @@ impl UpdateAppRequest {
|
||||
|
||||
pub fn has_desc(&self) -> bool {
|
||||
match self.one_of_desc {
|
||||
::std::option::Option::Some(UpdateAppRequest_oneof_one_of_desc::desc(..)) => true,
|
||||
::std::option::Option::Some(UpdateAppPayload_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))
|
||||
self.one_of_desc = ::std::option::Option::Some(UpdateAppPayload_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 {
|
||||
if let ::std::option::Option::Some(UpdateAppPayload_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()));
|
||||
self.one_of_desc = ::std::option::Option::Some(UpdateAppPayload_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,
|
||||
::std::option::Option::Some(UpdateAppPayload_oneof_one_of_desc::desc(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
@ -1873,7 +1715,7 @@ impl UpdateAppRequest {
|
||||
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,
|
||||
::std::option::Option::Some(UpdateAppPayload_oneof_one_of_desc::desc(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
@ -1886,7 +1728,7 @@ impl UpdateAppRequest {
|
||||
|
||||
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,
|
||||
::std::option::Option::Some(UpdateAppPayload_oneof_one_of_color_style::color_style(ref v)) => v,
|
||||
_ => <ColorStyle as ::protobuf::Message>::default_instance(),
|
||||
}
|
||||
}
|
||||
@ -1896,24 +1738,24 @@ impl UpdateAppRequest {
|
||||
|
||||
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,
|
||||
::std::option::Option::Some(UpdateAppPayload_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))
|
||||
self.one_of_color_style = ::std::option::Option::Some(UpdateAppPayload_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 {
|
||||
if let ::std::option::Option::Some(UpdateAppPayload_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()));
|
||||
self.one_of_color_style = ::std::option::Option::Some(UpdateAppPayload_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,
|
||||
::std::option::Option::Some(UpdateAppPayload_oneof_one_of_color_style::color_style(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
@ -1922,7 +1764,7 @@ impl UpdateAppRequest {
|
||||
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,
|
||||
::std::option::Option::Some(UpdateAppPayload_oneof_one_of_color_style::color_style(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
@ -1935,7 +1777,7 @@ impl UpdateAppRequest {
|
||||
|
||||
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,
|
||||
::std::option::Option::Some(UpdateAppPayload_oneof_one_of_is_trash::is_trash(v)) => v,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
@ -1945,20 +1787,20 @@ impl UpdateAppRequest {
|
||||
|
||||
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,
|
||||
::std::option::Option::Some(UpdateAppPayload_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))
|
||||
self.one_of_is_trash = ::std::option::Option::Some(UpdateAppPayload_oneof_one_of_is_trash::is_trash(v))
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for UpdateAppRequest {
|
||||
impl ::protobuf::Message for UpdateAppPayload {
|
||||
fn is_initialized(&self) -> bool {
|
||||
if let Some(UpdateAppRequest_oneof_one_of_color_style::color_style(ref v)) = self.one_of_color_style {
|
||||
if let Some(UpdateAppPayload_oneof_one_of_color_style::color_style(ref v)) = self.one_of_color_style {
|
||||
if !v.is_initialized() {
|
||||
return false;
|
||||
}
|
||||
@ -1977,25 +1819,25 @@ impl ::protobuf::Message for UpdateAppRequest {
|
||||
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()?));
|
||||
self.one_of_name = ::std::option::Option::Some(UpdateAppPayload_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()?));
|
||||
self.one_of_desc = ::std::option::Option::Some(UpdateAppPayload_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()?));
|
||||
self.one_of_color_style = ::std::option::Option::Some(UpdateAppPayload_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()?));
|
||||
self.one_of_is_trash = ::std::option::Option::Some(UpdateAppPayload_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())?;
|
||||
@ -2014,21 +1856,21 @@ impl ::protobuf::Message for UpdateAppRequest {
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_name {
|
||||
match v {
|
||||
&UpdateAppRequest_oneof_one_of_name::name(ref v) => {
|
||||
&UpdateAppPayload_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) => {
|
||||
&UpdateAppPayload_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) => {
|
||||
&UpdateAppPayload_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;
|
||||
},
|
||||
@ -2036,7 +1878,7 @@ impl ::protobuf::Message for UpdateAppRequest {
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_is_trash {
|
||||
match v {
|
||||
&UpdateAppRequest_oneof_one_of_is_trash::is_trash(v) => {
|
||||
&UpdateAppPayload_oneof_one_of_is_trash::is_trash(v) => {
|
||||
my_size += 2;
|
||||
},
|
||||
};
|
||||
@ -2052,21 +1894,21 @@ impl ::protobuf::Message for UpdateAppRequest {
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_name {
|
||||
match v {
|
||||
&UpdateAppRequest_oneof_one_of_name::name(ref v) => {
|
||||
&UpdateAppPayload_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) => {
|
||||
&UpdateAppPayload_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) => {
|
||||
&UpdateAppPayload_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)?;
|
||||
@ -2075,7 +1917,7 @@ impl ::protobuf::Message for UpdateAppRequest {
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_is_trash {
|
||||
match v {
|
||||
&UpdateAppRequest_oneof_one_of_is_trash::is_trash(v) => {
|
||||
&UpdateAppPayload_oneof_one_of_is_trash::is_trash(v) => {
|
||||
os.write_bool(5, v)?;
|
||||
},
|
||||
};
|
||||
@ -2110,8 +1952,8 @@ impl ::protobuf::Message for UpdateAppRequest {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> UpdateAppRequest {
|
||||
UpdateAppRequest::new()
|
||||
fn new() -> UpdateAppPayload {
|
||||
UpdateAppPayload::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
@ -2120,44 +1962,44 @@ impl ::protobuf::Message for UpdateAppRequest {
|
||||
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 },
|
||||
|m: &UpdateAppPayload| { &m.app_id },
|
||||
|m: &mut UpdateAppPayload| { &mut m.app_id },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
|
||||
"name",
|
||||
UpdateAppRequest::has_name,
|
||||
UpdateAppRequest::get_name,
|
||||
UpdateAppPayload::has_name,
|
||||
UpdateAppPayload::get_name,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
|
||||
"desc",
|
||||
UpdateAppRequest::has_desc,
|
||||
UpdateAppRequest::get_desc,
|
||||
UpdateAppPayload::has_desc,
|
||||
UpdateAppPayload::get_desc,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, ColorStyle>(
|
||||
"color_style",
|
||||
UpdateAppRequest::has_color_style,
|
||||
UpdateAppRequest::get_color_style,
|
||||
UpdateAppPayload::has_color_style,
|
||||
UpdateAppPayload::get_color_style,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_bool_accessor::<_>(
|
||||
"is_trash",
|
||||
UpdateAppRequest::has_is_trash,
|
||||
UpdateAppRequest::get_is_trash,
|
||||
UpdateAppPayload::has_is_trash,
|
||||
UpdateAppPayload::get_is_trash,
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateAppRequest>(
|
||||
"UpdateAppRequest",
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateAppPayload>(
|
||||
"UpdateAppPayload",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static UpdateAppRequest {
|
||||
static instance: ::protobuf::rt::LazyV2<UpdateAppRequest> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(UpdateAppRequest::new)
|
||||
fn default_instance() -> &'static UpdateAppPayload {
|
||||
static instance: ::protobuf::rt::LazyV2<UpdateAppPayload> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(UpdateAppPayload::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for UpdateAppRequest {
|
||||
impl ::protobuf::Clear for UpdateAppPayload {
|
||||
fn clear(&mut self) {
|
||||
self.app_id.clear();
|
||||
self.one_of_name = ::std::option::Option::None;
|
||||
@ -2168,13 +2010,13 @@ impl ::protobuf::Clear for UpdateAppRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for UpdateAppRequest {
|
||||
impl ::std::fmt::Debug for UpdateAppPayload {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for UpdateAppRequest {
|
||||
impl ::protobuf::reflect::ProtobufValue for UpdateAppPayload {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
@ -2657,7 +2499,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
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\
|
||||
\x10CreateAppPayload\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\
|
||||
@ -2665,9 +2507,8 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\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\
|
||||
le\"\x1d\n\x05AppId\x12\x14\n\x05value\x18\x01\x20\x01(\tR\x05value\"\
|
||||
\xe9\x01\n\x10UpdateAppPayload\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\
|
||||
|
@ -24,7 +24,7 @@
|
||||
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct ExportRequest {
|
||||
pub struct ExportPayload {
|
||||
// message fields
|
||||
pub doc_id: ::std::string::String,
|
||||
pub export_type: ExportType,
|
||||
@ -33,14 +33,14 @@ pub struct ExportRequest {
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a ExportRequest {
|
||||
fn default() -> &'a ExportRequest {
|
||||
<ExportRequest as ::protobuf::Message>::default_instance()
|
||||
impl<'a> ::std::default::Default for &'a ExportPayload {
|
||||
fn default() -> &'a ExportPayload {
|
||||
<ExportPayload as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl ExportRequest {
|
||||
pub fn new() -> ExportRequest {
|
||||
impl ExportPayload {
|
||||
pub fn new() -> ExportPayload {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ impl ExportRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for ExportRequest {
|
||||
impl ::protobuf::Message for ExportPayload {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
@ -161,8 +161,8 @@ impl ::protobuf::Message for ExportRequest {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> ExportRequest {
|
||||
ExportRequest::new()
|
||||
fn new() -> ExportPayload {
|
||||
ExportPayload::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
@ -171,29 +171,29 @@ impl ::protobuf::Message for ExportRequest {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"doc_id",
|
||||
|m: &ExportRequest| { &m.doc_id },
|
||||
|m: &mut ExportRequest| { &mut m.doc_id },
|
||||
|m: &ExportPayload| { &m.doc_id },
|
||||
|m: &mut ExportPayload| { &mut m.doc_id },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ExportType>>(
|
||||
"export_type",
|
||||
|m: &ExportRequest| { &m.export_type },
|
||||
|m: &mut ExportRequest| { &mut m.export_type },
|
||||
|m: &ExportPayload| { &m.export_type },
|
||||
|m: &mut ExportPayload| { &mut m.export_type },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<ExportRequest>(
|
||||
"ExportRequest",
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<ExportPayload>(
|
||||
"ExportPayload",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static ExportRequest {
|
||||
static instance: ::protobuf::rt::LazyV2<ExportRequest> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ExportRequest::new)
|
||||
fn default_instance() -> &'static ExportPayload {
|
||||
static instance: ::protobuf::rt::LazyV2<ExportPayload> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(ExportPayload::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for ExportRequest {
|
||||
impl ::protobuf::Clear for ExportPayload {
|
||||
fn clear(&mut self) {
|
||||
self.doc_id.clear();
|
||||
self.export_type = ExportType::Text;
|
||||
@ -201,13 +201,13 @@ impl ::protobuf::Clear for ExportRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for ExportRequest {
|
||||
impl ::std::fmt::Debug for ExportPayload {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for ExportRequest {
|
||||
impl ::protobuf::reflect::ProtobufValue for ExportPayload {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
@ -457,7 +457,7 @@ impl ::protobuf::reflect::ProtobufValue for ExportType {
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\x0bshare.proto\"T\n\rExportRequest\x12\x15\n\x06doc_id\x18\x01\x20\
|
||||
\n\x0bshare.proto\"T\n\rExportPayload\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\
|
||||
|
@ -668,32 +668,32 @@ impl ::protobuf::reflect::ProtobufValue for RepeatedView {
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct CreateViewRequest {
|
||||
pub struct CreateViewPayload {
|
||||
// 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<CreateViewRequest_oneof_one_of_thumbnail>,
|
||||
pub one_of_thumbnail: ::std::option::Option<CreateViewPayload_oneof_one_of_thumbnail>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a CreateViewRequest {
|
||||
fn default() -> &'a CreateViewRequest {
|
||||
<CreateViewRequest as ::protobuf::Message>::default_instance()
|
||||
impl<'a> ::std::default::Default for &'a CreateViewPayload {
|
||||
fn default() -> &'a CreateViewPayload {
|
||||
<CreateViewPayload as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum CreateViewRequest_oneof_one_of_thumbnail {
|
||||
pub enum CreateViewPayload_oneof_one_of_thumbnail {
|
||||
thumbnail(::std::string::String),
|
||||
}
|
||||
|
||||
impl CreateViewRequest {
|
||||
pub fn new() -> CreateViewRequest {
|
||||
impl CreateViewPayload {
|
||||
pub fn new() -> CreateViewPayload {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
@ -780,7 +780,7 @@ impl CreateViewRequest {
|
||||
|
||||
pub fn get_thumbnail(&self) -> &str {
|
||||
match self.one_of_thumbnail {
|
||||
::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v)) => v,
|
||||
::std::option::Option::Some(CreateViewPayload_oneof_one_of_thumbnail::thumbnail(ref v)) => v,
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
@ -790,24 +790,24 @@ impl CreateViewRequest {
|
||||
|
||||
pub fn has_thumbnail(&self) -> bool {
|
||||
match self.one_of_thumbnail {
|
||||
::std::option::Option::Some(CreateViewRequest_oneof_one_of_thumbnail::thumbnail(..)) => true,
|
||||
::std::option::Option::Some(CreateViewPayload_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))
|
||||
self.one_of_thumbnail = ::std::option::Option::Some(CreateViewPayload_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 {
|
||||
if let ::std::option::Option::Some(CreateViewPayload_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()));
|
||||
self.one_of_thumbnail = ::std::option::Option::Some(CreateViewPayload_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,
|
||||
::std::option::Option::Some(CreateViewPayload_oneof_one_of_thumbnail::thumbnail(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
@ -816,7 +816,7 @@ impl CreateViewRequest {
|
||||
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,
|
||||
::std::option::Option::Some(CreateViewPayload_oneof_one_of_thumbnail::thumbnail(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
@ -840,7 +840,7 @@ impl CreateViewRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for CreateViewRequest {
|
||||
impl ::protobuf::Message for CreateViewPayload {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
@ -862,7 +862,7 @@ impl ::protobuf::Message for CreateViewRequest {
|
||||
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()?));
|
||||
self.one_of_thumbnail = ::std::option::Option::Some(CreateViewPayload_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)?
|
||||
@ -893,7 +893,7 @@ impl ::protobuf::Message for CreateViewRequest {
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail {
|
||||
match v {
|
||||
&CreateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v) => {
|
||||
&CreateViewPayload_oneof_one_of_thumbnail::thumbnail(ref v) => {
|
||||
my_size += ::protobuf::rt::string_size(4, &v);
|
||||
},
|
||||
};
|
||||
@ -918,7 +918,7 @@ impl ::protobuf::Message for CreateViewRequest {
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_thumbnail {
|
||||
match v {
|
||||
&CreateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v) => {
|
||||
&CreateViewPayload_oneof_one_of_thumbnail::thumbnail(ref v) => {
|
||||
os.write_string(4, v)?;
|
||||
},
|
||||
};
|
||||
@ -953,8 +953,8 @@ impl ::protobuf::Message for CreateViewRequest {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> CreateViewRequest {
|
||||
CreateViewRequest::new()
|
||||
fn new() -> CreateViewPayload {
|
||||
CreateViewPayload::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
@ -963,44 +963,44 @@ impl ::protobuf::Message for CreateViewRequest {
|
||||
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 },
|
||||
|m: &CreateViewPayload| { &m.belong_to_id },
|
||||
|m: &mut CreateViewPayload| { &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 },
|
||||
|m: &CreateViewPayload| { &m.name },
|
||||
|m: &mut CreateViewPayload| { &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 },
|
||||
|m: &CreateViewPayload| { &m.desc },
|
||||
|m: &mut CreateViewPayload| { &mut m.desc },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
|
||||
"thumbnail",
|
||||
CreateViewRequest::has_thumbnail,
|
||||
CreateViewRequest::get_thumbnail,
|
||||
CreateViewPayload::has_thumbnail,
|
||||
CreateViewPayload::get_thumbnail,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<ViewType>>(
|
||||
"view_type",
|
||||
|m: &CreateViewRequest| { &m.view_type },
|
||||
|m: &mut CreateViewRequest| { &mut m.view_type },
|
||||
|m: &CreateViewPayload| { &m.view_type },
|
||||
|m: &mut CreateViewPayload| { &mut m.view_type },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateViewRequest>(
|
||||
"CreateViewRequest",
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateViewPayload>(
|
||||
"CreateViewPayload",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static CreateViewRequest {
|
||||
static instance: ::protobuf::rt::LazyV2<CreateViewRequest> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(CreateViewRequest::new)
|
||||
fn default_instance() -> &'static CreateViewPayload {
|
||||
static instance: ::protobuf::rt::LazyV2<CreateViewPayload> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(CreateViewPayload::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for CreateViewRequest {
|
||||
impl ::protobuf::Clear for CreateViewPayload {
|
||||
fn clear(&mut self) {
|
||||
self.belong_to_id.clear();
|
||||
self.name.clear();
|
||||
@ -1011,13 +1011,13 @@ impl ::protobuf::Clear for CreateViewRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for CreateViewRequest {
|
||||
impl ::std::fmt::Debug for CreateViewPayload {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for CreateViewRequest {
|
||||
impl ::protobuf::reflect::ProtobufValue for CreateViewPayload {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
@ -1426,7 +1426,7 @@ impl ::protobuf::reflect::ProtobufValue for CreateViewParams {
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct ViewId {
|
||||
// message fields
|
||||
pub view_id: ::std::string::String,
|
||||
pub value: ::std::string::String,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
@ -1443,30 +1443,30 @@ impl ViewId {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string view_id = 1;
|
||||
// string value = 1;
|
||||
|
||||
|
||||
pub fn get_view_id(&self) -> &str {
|
||||
&self.view_id
|
||||
pub fn get_value(&self) -> &str {
|
||||
&self.value
|
||||
}
|
||||
pub fn clear_view_id(&mut self) {
|
||||
self.view_id.clear();
|
||||
pub fn clear_value(&mut self) {
|
||||
self.value.clear();
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_view_id(&mut self, v: ::std::string::String) {
|
||||
self.view_id = v;
|
||||
pub fn set_value(&mut self, v: ::std::string::String) {
|
||||
self.value = 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
|
||||
pub fn mut_value(&mut self) -> &mut ::std::string::String {
|
||||
&mut self.value
|
||||
}
|
||||
|
||||
// Take field
|
||||
pub fn take_view_id(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.view_id, ::std::string::String::new())
|
||||
pub fn take_value(&mut self) -> ::std::string::String {
|
||||
::std::mem::replace(&mut self.value, ::std::string::String::new())
|
||||
}
|
||||
}
|
||||
|
||||
@ -1480,7 +1480,7 @@ impl ::protobuf::Message for ViewId {
|
||||
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_singular_proto3_string_into(wire_type, is, &mut self.value)?;
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
@ -1494,8 +1494,8 @@ impl ::protobuf::Message for ViewId {
|
||||
#[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 !self.value.is_empty() {
|
||||
my_size += ::protobuf::rt::string_size(1, &self.value);
|
||||
}
|
||||
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
|
||||
self.cached_size.set(my_size);
|
||||
@ -1503,8 +1503,8 @@ impl ::protobuf::Message for ViewId {
|
||||
}
|
||||
|
||||
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 !self.value.is_empty() {
|
||||
os.write_string(1, &self.value)?;
|
||||
}
|
||||
os.write_unknown_fields(self.get_unknown_fields())?;
|
||||
::std::result::Result::Ok(())
|
||||
@ -1545,9 +1545,9 @@ impl ::protobuf::Message for ViewId {
|
||||
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 },
|
||||
"value",
|
||||
|m: &ViewId| { &m.value },
|
||||
|m: &mut ViewId| { &mut m.value },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<ViewId>(
|
||||
"ViewId",
|
||||
@ -1565,7 +1565,7 @@ impl ::protobuf::Message for ViewId {
|
||||
|
||||
impl ::protobuf::Clear for ViewId {
|
||||
fn clear(&mut self) {
|
||||
self.view_id.clear();
|
||||
self.value.clear();
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
@ -1741,41 +1741,41 @@ impl ::protobuf::reflect::ProtobufValue for RepeatedViewId {
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct UpdateViewRequest {
|
||||
pub struct UpdateViewPayload {
|
||||
// message fields
|
||||
pub view_id: ::std::string::String,
|
||||
// message oneof groups
|
||||
pub one_of_name: ::std::option::Option<UpdateViewRequest_oneof_one_of_name>,
|
||||
pub one_of_desc: ::std::option::Option<UpdateViewRequest_oneof_one_of_desc>,
|
||||
pub one_of_thumbnail: ::std::option::Option<UpdateViewRequest_oneof_one_of_thumbnail>,
|
||||
pub one_of_name: ::std::option::Option<UpdateViewPayload_oneof_one_of_name>,
|
||||
pub one_of_desc: ::std::option::Option<UpdateViewPayload_oneof_one_of_desc>,
|
||||
pub one_of_thumbnail: ::std::option::Option<UpdateViewPayload_oneof_one_of_thumbnail>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a UpdateViewRequest {
|
||||
fn default() -> &'a UpdateViewRequest {
|
||||
<UpdateViewRequest as ::protobuf::Message>::default_instance()
|
||||
impl<'a> ::std::default::Default for &'a UpdateViewPayload {
|
||||
fn default() -> &'a UpdateViewPayload {
|
||||
<UpdateViewPayload as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateViewRequest_oneof_one_of_name {
|
||||
pub enum UpdateViewPayload_oneof_one_of_name {
|
||||
name(::std::string::String),
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateViewRequest_oneof_one_of_desc {
|
||||
pub enum UpdateViewPayload_oneof_one_of_desc {
|
||||
desc(::std::string::String),
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateViewRequest_oneof_one_of_thumbnail {
|
||||
pub enum UpdateViewPayload_oneof_one_of_thumbnail {
|
||||
thumbnail(::std::string::String),
|
||||
}
|
||||
|
||||
impl UpdateViewRequest {
|
||||
pub fn new() -> UpdateViewRequest {
|
||||
impl UpdateViewPayload {
|
||||
pub fn new() -> UpdateViewPayload {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
@ -1810,7 +1810,7 @@ impl UpdateViewRequest {
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
match self.one_of_name {
|
||||
::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(ref v)) => v,
|
||||
::std::option::Option::Some(UpdateViewPayload_oneof_one_of_name::name(ref v)) => v,
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
@ -1820,24 +1820,24 @@ impl UpdateViewRequest {
|
||||
|
||||
pub fn has_name(&self) -> bool {
|
||||
match self.one_of_name {
|
||||
::std::option::Option::Some(UpdateViewRequest_oneof_one_of_name::name(..)) => true,
|
||||
::std::option::Option::Some(UpdateViewPayload_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))
|
||||
self.one_of_name = ::std::option::Option::Some(UpdateViewPayload_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 {
|
||||
if let ::std::option::Option::Some(UpdateViewPayload_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()));
|
||||
self.one_of_name = ::std::option::Option::Some(UpdateViewPayload_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,
|
||||
::std::option::Option::Some(UpdateViewPayload_oneof_one_of_name::name(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
@ -1846,7 +1846,7 @@ impl UpdateViewRequest {
|
||||
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,
|
||||
::std::option::Option::Some(UpdateViewPayload_oneof_one_of_name::name(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
@ -1859,7 +1859,7 @@ impl UpdateViewRequest {
|
||||
|
||||
pub fn get_desc(&self) -> &str {
|
||||
match self.one_of_desc {
|
||||
::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(ref v)) => v,
|
||||
::std::option::Option::Some(UpdateViewPayload_oneof_one_of_desc::desc(ref v)) => v,
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
@ -1869,24 +1869,24 @@ impl UpdateViewRequest {
|
||||
|
||||
pub fn has_desc(&self) -> bool {
|
||||
match self.one_of_desc {
|
||||
::std::option::Option::Some(UpdateViewRequest_oneof_one_of_desc::desc(..)) => true,
|
||||
::std::option::Option::Some(UpdateViewPayload_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))
|
||||
self.one_of_desc = ::std::option::Option::Some(UpdateViewPayload_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 {
|
||||
if let ::std::option::Option::Some(UpdateViewPayload_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()));
|
||||
self.one_of_desc = ::std::option::Option::Some(UpdateViewPayload_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,
|
||||
::std::option::Option::Some(UpdateViewPayload_oneof_one_of_desc::desc(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
@ -1895,7 +1895,7 @@ impl UpdateViewRequest {
|
||||
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,
|
||||
::std::option::Option::Some(UpdateViewPayload_oneof_one_of_desc::desc(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
@ -1908,7 +1908,7 @@ impl UpdateViewRequest {
|
||||
|
||||
pub fn get_thumbnail(&self) -> &str {
|
||||
match self.one_of_thumbnail {
|
||||
::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(ref v)) => v,
|
||||
::std::option::Option::Some(UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(ref v)) => v,
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
@ -1918,24 +1918,24 @@ impl UpdateViewRequest {
|
||||
|
||||
pub fn has_thumbnail(&self) -> bool {
|
||||
match self.one_of_thumbnail {
|
||||
::std::option::Option::Some(UpdateViewRequest_oneof_one_of_thumbnail::thumbnail(..)) => true,
|
||||
::std::option::Option::Some(UpdateViewPayload_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))
|
||||
self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewPayload_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 {
|
||||
if let ::std::option::Option::Some(UpdateViewPayload_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()));
|
||||
self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewPayload_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,
|
||||
::std::option::Option::Some(UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
@ -1944,7 +1944,7 @@ impl UpdateViewRequest {
|
||||
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,
|
||||
::std::option::Option::Some(UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
@ -1953,7 +1953,7 @@ impl UpdateViewRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for UpdateViewRequest {
|
||||
impl ::protobuf::Message for UpdateViewPayload {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
@ -1969,19 +1969,19 @@ impl ::protobuf::Message for UpdateViewRequest {
|
||||
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()?));
|
||||
self.one_of_name = ::std::option::Option::Some(UpdateViewPayload_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()?));
|
||||
self.one_of_desc = ::std::option::Option::Some(UpdateViewPayload_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()?));
|
||||
self.one_of_thumbnail = ::std::option::Option::Some(UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(is.read_string()?));
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
@ -2000,21 +2000,21 @@ impl ::protobuf::Message for UpdateViewRequest {
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_name {
|
||||
match v {
|
||||
&UpdateViewRequest_oneof_one_of_name::name(ref v) => {
|
||||
&UpdateViewPayload_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) => {
|
||||
&UpdateViewPayload_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) => {
|
||||
&UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(ref v) => {
|
||||
my_size += ::protobuf::rt::string_size(4, &v);
|
||||
},
|
||||
};
|
||||
@ -2030,21 +2030,21 @@ impl ::protobuf::Message for UpdateViewRequest {
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_name {
|
||||
match v {
|
||||
&UpdateViewRequest_oneof_one_of_name::name(ref v) => {
|
||||
&UpdateViewPayload_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) => {
|
||||
&UpdateViewPayload_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) => {
|
||||
&UpdateViewPayload_oneof_one_of_thumbnail::thumbnail(ref v) => {
|
||||
os.write_string(4, v)?;
|
||||
},
|
||||
};
|
||||
@ -2079,8 +2079,8 @@ impl ::protobuf::Message for UpdateViewRequest {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> UpdateViewRequest {
|
||||
UpdateViewRequest::new()
|
||||
fn new() -> UpdateViewPayload {
|
||||
UpdateViewPayload::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
@ -2089,39 +2089,39 @@ impl ::protobuf::Message for UpdateViewRequest {
|
||||
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 },
|
||||
|m: &UpdateViewPayload| { &m.view_id },
|
||||
|m: &mut UpdateViewPayload| { &mut m.view_id },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
|
||||
"name",
|
||||
UpdateViewRequest::has_name,
|
||||
UpdateViewRequest::get_name,
|
||||
UpdateViewPayload::has_name,
|
||||
UpdateViewPayload::get_name,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
|
||||
"desc",
|
||||
UpdateViewRequest::has_desc,
|
||||
UpdateViewRequest::get_desc,
|
||||
UpdateViewPayload::has_desc,
|
||||
UpdateViewPayload::get_desc,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
|
||||
"thumbnail",
|
||||
UpdateViewRequest::has_thumbnail,
|
||||
UpdateViewRequest::get_thumbnail,
|
||||
UpdateViewPayload::has_thumbnail,
|
||||
UpdateViewPayload::get_thumbnail,
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateViewRequest>(
|
||||
"UpdateViewRequest",
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateViewPayload>(
|
||||
"UpdateViewPayload",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static UpdateViewRequest {
|
||||
static instance: ::protobuf::rt::LazyV2<UpdateViewRequest> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(UpdateViewRequest::new)
|
||||
fn default_instance() -> &'static UpdateViewPayload {
|
||||
static instance: ::protobuf::rt::LazyV2<UpdateViewPayload> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(UpdateViewPayload::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for UpdateViewRequest {
|
||||
impl ::protobuf::Clear for UpdateViewPayload {
|
||||
fn clear(&mut self) {
|
||||
self.view_id.clear();
|
||||
self.one_of_name = ::std::option::Option::None;
|
||||
@ -2131,13 +2131,13 @@ impl ::protobuf::Clear for UpdateViewRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for UpdateViewRequest {
|
||||
impl ::std::fmt::Debug for UpdateViewPayload {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for UpdateViewRequest {
|
||||
impl ::protobuf::reflect::ProtobufValue for UpdateViewPayload {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
@ -2605,7 +2605,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
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\
|
||||
\x01\x20\x03(\x0b2\x05.ViewR\x05items\"\xb9\x01\n\x11CreateViewPayload\
|
||||
\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\
|
||||
@ -2615,10 +2615,10 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
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\x06ViewId\
|
||||
\x12\x17\n\x07view_id\x18\x01\x20\x01(\tR\x06viewId\"&\n\x0eRepeatedView\
|
||||
Id\x12\x14\n\x05items\x18\x01\x20\x03(\tR\x05items\"\xaa\x01\n\x11Update\
|
||||
ViewRequest\x12\x17\n\x07view_id\x18\x01\x20\x01(\tR\x06viewId\x12\x14\n\
|
||||
wData\x12\x17\n\x07view_id\x18\x07\x20\x01(\tR\x06viewId\"\x1e\n\x06View\
|
||||
Id\x12\x14\n\x05value\x18\x01\x20\x01(\tR\x05value\"&\n\x0eRepeatedViewI\
|
||||
d\x12\x14\n\x05items\x18\x01\x20\x03(\tR\x05items\"\xaa\x01\n\x11UpdateV\
|
||||
iewPayload\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\tthu\
|
||||
mbnailB\r\n\x0bone_of_nameB\r\n\x0bone_of_descB\x12\n\x10one_of_thumbnai\
|
||||
|
@ -560,7 +560,7 @@ impl ::protobuf::reflect::ProtobufValue for RepeatedWorkspace {
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct CreateWorkspaceRequest {
|
||||
pub struct CreateWorkspacePayload {
|
||||
// message fields
|
||||
pub name: ::std::string::String,
|
||||
pub desc: ::std::string::String,
|
||||
@ -569,14 +569,14 @@ pub struct CreateWorkspaceRequest {
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a CreateWorkspaceRequest {
|
||||
fn default() -> &'a CreateWorkspaceRequest {
|
||||
<CreateWorkspaceRequest as ::protobuf::Message>::default_instance()
|
||||
impl<'a> ::std::default::Default for &'a CreateWorkspacePayload {
|
||||
fn default() -> &'a CreateWorkspacePayload {
|
||||
<CreateWorkspacePayload as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl CreateWorkspaceRequest {
|
||||
pub fn new() -> CreateWorkspaceRequest {
|
||||
impl CreateWorkspacePayload {
|
||||
pub fn new() -> CreateWorkspacePayload {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
@ -633,7 +633,7 @@ impl CreateWorkspaceRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for CreateWorkspaceRequest {
|
||||
impl ::protobuf::Message for CreateWorkspacePayload {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
@ -708,8 +708,8 @@ impl ::protobuf::Message for CreateWorkspaceRequest {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> CreateWorkspaceRequest {
|
||||
CreateWorkspaceRequest::new()
|
||||
fn new() -> CreateWorkspacePayload {
|
||||
CreateWorkspacePayload::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
@ -718,29 +718,29 @@ impl ::protobuf::Message for CreateWorkspaceRequest {
|
||||
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 },
|
||||
|m: &CreateWorkspacePayload| { &m.name },
|
||||
|m: &mut CreateWorkspacePayload| { &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 },
|
||||
|m: &CreateWorkspacePayload| { &m.desc },
|
||||
|m: &mut CreateWorkspacePayload| { &mut m.desc },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateWorkspaceRequest>(
|
||||
"CreateWorkspaceRequest",
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<CreateWorkspacePayload>(
|
||||
"CreateWorkspacePayload",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static CreateWorkspaceRequest {
|
||||
static instance: ::protobuf::rt::LazyV2<CreateWorkspaceRequest> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(CreateWorkspaceRequest::new)
|
||||
fn default_instance() -> &'static CreateWorkspacePayload {
|
||||
static instance: ::protobuf::rt::LazyV2<CreateWorkspacePayload> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(CreateWorkspacePayload::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for CreateWorkspaceRequest {
|
||||
impl ::protobuf::Clear for CreateWorkspacePayload {
|
||||
fn clear(&mut self) {
|
||||
self.name.clear();
|
||||
self.desc.clear();
|
||||
@ -748,13 +748,13 @@ impl ::protobuf::Clear for CreateWorkspaceRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for CreateWorkspaceRequest {
|
||||
impl ::std::fmt::Debug for CreateWorkspacePayload {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for CreateWorkspaceRequest {
|
||||
impl ::protobuf::reflect::ProtobufValue for CreateWorkspacePayload {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
@ -961,208 +961,10 @@ impl ::protobuf::reflect::ProtobufValue for CreateWorkspaceParams {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct QueryWorkspaceRequest {
|
||||
// message oneof groups
|
||||
pub one_of_workspace_id: ::std::option::Option<QueryWorkspaceRequest_oneof_one_of_workspace_id>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a QueryWorkspaceRequest {
|
||||
fn default() -> &'a QueryWorkspaceRequest {
|
||||
<QueryWorkspaceRequest as ::protobuf::Message>::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<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
|
||||
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>(
|
||||
"QueryWorkspaceRequest",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static QueryWorkspaceRequest {
|
||||
static instance: ::protobuf::rt::LazyV2<QueryWorkspaceRequest> = ::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<WorkspaceId_oneof_one_of_workspace_id>,
|
||||
pub one_of_value: ::std::option::Option<WorkspaceId_oneof_one_of_value>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
@ -1175,8 +977,8 @@ impl<'a> ::std::default::Default for &'a WorkspaceId {
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum WorkspaceId_oneof_one_of_workspace_id {
|
||||
workspace_id(::std::string::String),
|
||||
pub enum WorkspaceId_oneof_one_of_value {
|
||||
value(::std::string::String),
|
||||
}
|
||||
|
||||
impl WorkspaceId {
|
||||
@ -1184,48 +986,48 @@ impl WorkspaceId {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
// string workspace_id = 1;
|
||||
// string value = 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 get_value(&self) -> &str {
|
||||
match self.one_of_value {
|
||||
::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(ref v)) => v,
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
pub fn clear_workspace_id(&mut self) {
|
||||
self.one_of_workspace_id = ::std::option::Option::None;
|
||||
pub fn clear_value(&mut self) {
|
||||
self.one_of_value = ::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,
|
||||
pub fn has_value(&self) -> bool {
|
||||
match self.one_of_value {
|
||||
::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(..)) => 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))
|
||||
pub fn set_value(&mut self, v: ::std::string::String) {
|
||||
self.one_of_value = ::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(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 {
|
||||
pub fn mut_value(&mut self) -> &mut ::std::string::String {
|
||||
if let ::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(_)) = self.one_of_value {
|
||||
} else {
|
||||
self.one_of_workspace_id = ::std::option::Option::Some(WorkspaceId_oneof_one_of_workspace_id::workspace_id(::std::string::String::new()));
|
||||
self.one_of_value = ::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(::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,
|
||||
match self.one_of_value {
|
||||
::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(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,
|
||||
pub fn take_value(&mut self) -> ::std::string::String {
|
||||
if self.has_value() {
|
||||
match self.one_of_value.take() {
|
||||
::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
@ -1247,7 +1049,7 @@ impl ::protobuf::Message for WorkspaceId {
|
||||
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()?));
|
||||
self.one_of_value = ::std::option::Option::Some(WorkspaceId_oneof_one_of_value::value(is.read_string()?));
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
@ -1261,9 +1063,9 @@ impl ::protobuf::Message for WorkspaceId {
|
||||
#[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 {
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_value {
|
||||
match v {
|
||||
&WorkspaceId_oneof_one_of_workspace_id::workspace_id(ref v) => {
|
||||
&WorkspaceId_oneof_one_of_value::value(ref v) => {
|
||||
my_size += ::protobuf::rt::string_size(1, &v);
|
||||
},
|
||||
};
|
||||
@ -1274,9 +1076,9 @@ impl ::protobuf::Message for WorkspaceId {
|
||||
}
|
||||
|
||||
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 {
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_value {
|
||||
match v {
|
||||
&WorkspaceId_oneof_one_of_workspace_id::workspace_id(ref v) => {
|
||||
&WorkspaceId_oneof_one_of_value::value(ref v) => {
|
||||
os.write_string(1, v)?;
|
||||
},
|
||||
};
|
||||
@ -1320,9 +1122,9 @@ impl ::protobuf::Message for WorkspaceId {
|
||||
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,
|
||||
"value",
|
||||
WorkspaceId::has_value,
|
||||
WorkspaceId::get_value,
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<WorkspaceId>(
|
||||
"WorkspaceId",
|
||||
@ -1340,7 +1142,7 @@ impl ::protobuf::Message for WorkspaceId {
|
||||
|
||||
impl ::protobuf::Clear for WorkspaceId {
|
||||
fn clear(&mut self) {
|
||||
self.one_of_workspace_id = ::std::option::Option::None;
|
||||
self.one_of_value = ::std::option::Option::None;
|
||||
self.unknown_fields.clear();
|
||||
}
|
||||
}
|
||||
@ -2273,22 +2075,20 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
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\
|
||||
spacePayload\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_descb\x06proto3\
|
||||
\tR\x04desc\"5\n\x0bWorkspaceId\x12\x16\n\x05value\x18\x01\x20\x01(\tH\0\
|
||||
R\x05valueB\x0e\n\x0cone_of_value\"\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\"r\n\x16UpdateWorkspaceRequest\x12\x0e\n\x02id\
|
||||
\x18\x01\x20\x01(\tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04n\
|
||||
ame\x12\x14\n\x04desc\x18\x03\x20\x01(\tH\x01R\x04descB\r\n\x0bone_of_na\
|
||||
meB\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_descb\x06proto3\
|
||||
";
|
||||
|
||||
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
|
||||
|
@ -14,7 +14,7 @@ message App {
|
||||
message RepeatedApp {
|
||||
repeated App items = 1;
|
||||
}
|
||||
message CreateAppRequest {
|
||||
message CreateAppPayload {
|
||||
string workspace_id = 1;
|
||||
string name = 2;
|
||||
string desc = 3;
|
||||
@ -29,13 +29,10 @@ message CreateAppParams {
|
||||
string desc = 3;
|
||||
ColorStyle color_style = 4;
|
||||
}
|
||||
message QueryAppRequest {
|
||||
repeated string app_ids = 1;
|
||||
}
|
||||
message AppId {
|
||||
string app_id = 1;
|
||||
string value = 1;
|
||||
}
|
||||
message UpdateAppRequest {
|
||||
message UpdateAppPayload {
|
||||
string app_id = 1;
|
||||
oneof one_of_name { string name = 2; };
|
||||
oneof one_of_desc { string desc = 3; };
|
||||
|
@ -1,6 +1,6 @@
|
||||
syntax = "proto3";
|
||||
|
||||
message ExportRequest {
|
||||
message ExportPayload {
|
||||
string doc_id = 1;
|
||||
ExportType export_type = 2;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ message View {
|
||||
message RepeatedView {
|
||||
repeated View items = 1;
|
||||
}
|
||||
message CreateViewRequest {
|
||||
message CreateViewPayload {
|
||||
string belong_to_id = 1;
|
||||
string name = 2;
|
||||
string desc = 3;
|
||||
@ -31,12 +31,12 @@ message CreateViewParams {
|
||||
string view_id = 7;
|
||||
}
|
||||
message ViewId {
|
||||
string view_id = 1;
|
||||
string value = 1;
|
||||
}
|
||||
message RepeatedViewId {
|
||||
repeated string items = 1;
|
||||
}
|
||||
message UpdateViewRequest {
|
||||
message UpdateViewPayload {
|
||||
string view_id = 1;
|
||||
oneof one_of_name { string name = 2; };
|
||||
oneof one_of_desc { string desc = 3; };
|
||||
|
@ -13,7 +13,7 @@ message Workspace {
|
||||
message RepeatedWorkspace {
|
||||
repeated Workspace items = 1;
|
||||
}
|
||||
message CreateWorkspaceRequest {
|
||||
message CreateWorkspacePayload {
|
||||
string name = 1;
|
||||
string desc = 2;
|
||||
}
|
||||
@ -21,11 +21,8 @@ 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; };
|
||||
oneof one_of_value { string value = 1; };
|
||||
}
|
||||
message CurrentWorkspaceSetting {
|
||||
Workspace workspace = 1;
|
||||
|
@ -5,7 +5,7 @@ use flowy_derive::ProtoBuf;
|
||||
use crate::{errors::*, parser::*};
|
||||
|
||||
#[derive(ProtoBuf, Default)]
|
||||
pub struct SignInRequest {
|
||||
pub struct SignInPayload {
|
||||
#[pb(index = 1)]
|
||||
pub email: String,
|
||||
|
||||
@ -43,7 +43,7 @@ pub struct SignInResponse {
|
||||
pub token: String,
|
||||
}
|
||||
|
||||
impl TryInto<SignInParams> for SignInRequest {
|
||||
impl TryInto<SignInParams> for SignInPayload {
|
||||
type Error = ErrorCode;
|
||||
|
||||
fn try_into(self) -> Result<SignInParams, Self::Error> {
|
||||
@ -59,7 +59,7 @@ impl TryInto<SignInParams> for SignInRequest {
|
||||
}
|
||||
|
||||
#[derive(ProtoBuf, Default)]
|
||||
pub struct SignUpRequest {
|
||||
pub struct SignUpPayload {
|
||||
#[pb(index = 1)]
|
||||
pub email: String,
|
||||
|
||||
@ -69,7 +69,7 @@ pub struct SignUpRequest {
|
||||
#[pb(index = 3)]
|
||||
pub password: String,
|
||||
}
|
||||
impl TryInto<SignUpParams> for SignUpRequest {
|
||||
impl TryInto<SignUpParams> for SignUpPayload {
|
||||
type Error = ErrorCode;
|
||||
|
||||
fn try_into(self) -> Result<SignUpParams, Self::Error> {
|
||||
|
@ -28,7 +28,7 @@ pub struct UserProfile {
|
||||
}
|
||||
|
||||
#[derive(ProtoBuf, Default)]
|
||||
pub struct UpdateUserRequest {
|
||||
pub struct UpdateUserPayload {
|
||||
#[pb(index = 1)]
|
||||
pub id: String,
|
||||
|
||||
@ -42,7 +42,7 @@ pub struct UpdateUserRequest {
|
||||
pub password: Option<String>,
|
||||
}
|
||||
|
||||
impl UpdateUserRequest {
|
||||
impl UpdateUserPayload {
|
||||
pub fn new(id: &str) -> Self {
|
||||
Self {
|
||||
id: id.to_owned(),
|
||||
@ -105,7 +105,7 @@ impl UpdateUserParams {
|
||||
}
|
||||
}
|
||||
|
||||
impl TryInto<UpdateUserParams> for UpdateUserRequest {
|
||||
impl TryInto<UpdateUserParams> for UpdateUserPayload {
|
||||
type Error = ErrorCode;
|
||||
|
||||
fn try_into(self) -> Result<UpdateUserParams, Self::Error> {
|
||||
|
@ -24,7 +24,7 @@
|
||||
// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_25_2;
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct SignInRequest {
|
||||
pub struct SignInPayload {
|
||||
// message fields
|
||||
pub email: ::std::string::String,
|
||||
pub password: ::std::string::String,
|
||||
@ -34,14 +34,14 @@ pub struct SignInRequest {
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a SignInRequest {
|
||||
fn default() -> &'a SignInRequest {
|
||||
<SignInRequest as ::protobuf::Message>::default_instance()
|
||||
impl<'a> ::std::default::Default for &'a SignInPayload {
|
||||
fn default() -> &'a SignInPayload {
|
||||
<SignInPayload as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl SignInRequest {
|
||||
pub fn new() -> SignInRequest {
|
||||
impl SignInPayload {
|
||||
pub fn new() -> SignInPayload {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ impl SignInRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for SignInRequest {
|
||||
impl ::protobuf::Message for SignInPayload {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
@ -208,8 +208,8 @@ impl ::protobuf::Message for SignInRequest {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> SignInRequest {
|
||||
SignInRequest::new()
|
||||
fn new() -> SignInPayload {
|
||||
SignInPayload::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
@ -218,34 +218,34 @@ impl ::protobuf::Message for SignInRequest {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"email",
|
||||
|m: &SignInRequest| { &m.email },
|
||||
|m: &mut SignInRequest| { &mut m.email },
|
||||
|m: &SignInPayload| { &m.email },
|
||||
|m: &mut SignInPayload| { &mut m.email },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"password",
|
||||
|m: &SignInRequest| { &m.password },
|
||||
|m: &mut SignInRequest| { &mut m.password },
|
||||
|m: &SignInPayload| { &m.password },
|
||||
|m: &mut SignInPayload| { &mut m.password },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &SignInRequest| { &m.name },
|
||||
|m: &mut SignInRequest| { &mut m.name },
|
||||
|m: &SignInPayload| { &m.name },
|
||||
|m: &mut SignInPayload| { &mut m.name },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<SignInRequest>(
|
||||
"SignInRequest",
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<SignInPayload>(
|
||||
"SignInPayload",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static SignInRequest {
|
||||
static instance: ::protobuf::rt::LazyV2<SignInRequest> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(SignInRequest::new)
|
||||
fn default_instance() -> &'static SignInPayload {
|
||||
static instance: ::protobuf::rt::LazyV2<SignInPayload> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(SignInPayload::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for SignInRequest {
|
||||
impl ::protobuf::Clear for SignInPayload {
|
||||
fn clear(&mut self) {
|
||||
self.email.clear();
|
||||
self.password.clear();
|
||||
@ -254,13 +254,13 @@ impl ::protobuf::Clear for SignInRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for SignInRequest {
|
||||
impl ::std::fmt::Debug for SignInPayload {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for SignInRequest {
|
||||
impl ::protobuf::reflect::ProtobufValue for SignInPayload {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
@ -795,7 +795,7 @@ impl ::protobuf::reflect::ProtobufValue for SignInResponse {
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct SignUpRequest {
|
||||
pub struct SignUpPayload {
|
||||
// message fields
|
||||
pub email: ::std::string::String,
|
||||
pub name: ::std::string::String,
|
||||
@ -805,14 +805,14 @@ pub struct SignUpRequest {
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a SignUpRequest {
|
||||
fn default() -> &'a SignUpRequest {
|
||||
<SignUpRequest as ::protobuf::Message>::default_instance()
|
||||
impl<'a> ::std::default::Default for &'a SignUpPayload {
|
||||
fn default() -> &'a SignUpPayload {
|
||||
<SignUpPayload as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
impl SignUpRequest {
|
||||
pub fn new() -> SignUpRequest {
|
||||
impl SignUpPayload {
|
||||
pub fn new() -> SignUpPayload {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
@ -895,7 +895,7 @@ impl SignUpRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for SignUpRequest {
|
||||
impl ::protobuf::Message for SignUpPayload {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
@ -979,8 +979,8 @@ impl ::protobuf::Message for SignUpRequest {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> SignUpRequest {
|
||||
SignUpRequest::new()
|
||||
fn new() -> SignUpPayload {
|
||||
SignUpPayload::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
@ -989,34 +989,34 @@ impl ::protobuf::Message for SignUpRequest {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"email",
|
||||
|m: &SignUpRequest| { &m.email },
|
||||
|m: &mut SignUpRequest| { &mut m.email },
|
||||
|m: &SignUpPayload| { &m.email },
|
||||
|m: &mut SignUpPayload| { &mut m.email },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"name",
|
||||
|m: &SignUpRequest| { &m.name },
|
||||
|m: &mut SignUpRequest| { &mut m.name },
|
||||
|m: &SignUpPayload| { &m.name },
|
||||
|m: &mut SignUpPayload| { &mut m.name },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"password",
|
||||
|m: &SignUpRequest| { &m.password },
|
||||
|m: &mut SignUpRequest| { &mut m.password },
|
||||
|m: &SignUpPayload| { &m.password },
|
||||
|m: &mut SignUpPayload| { &mut m.password },
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<SignUpRequest>(
|
||||
"SignUpRequest",
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<SignUpPayload>(
|
||||
"SignUpPayload",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static SignUpRequest {
|
||||
static instance: ::protobuf::rt::LazyV2<SignUpRequest> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(SignUpRequest::new)
|
||||
fn default_instance() -> &'static SignUpPayload {
|
||||
static instance: ::protobuf::rt::LazyV2<SignUpPayload> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(SignUpPayload::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for SignUpRequest {
|
||||
impl ::protobuf::Clear for SignUpPayload {
|
||||
fn clear(&mut self) {
|
||||
self.email.clear();
|
||||
self.name.clear();
|
||||
@ -1025,13 +1025,13 @@ impl ::protobuf::Clear for SignUpRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for SignUpRequest {
|
||||
impl ::std::fmt::Debug for SignUpPayload {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for SignUpRequest {
|
||||
impl ::protobuf::reflect::ProtobufValue for SignUpPayload {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
@ -1566,7 +1566,7 @@ impl ::protobuf::reflect::ProtobufValue for SignUpResponse {
|
||||
}
|
||||
|
||||
static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\n\nauth.proto\"U\n\rSignInRequest\x12\x14\n\x05email\x18\x01\x20\x01(\t\
|
||||
\n\nauth.proto\"U\n\rSignInPayload\x12\x14\n\x05email\x18\x01\x20\x01(\t\
|
||||
R\x05email\x12\x1a\n\x08password\x18\x02\x20\x01(\tR\x08password\x12\x12\
|
||||
\n\x04name\x18\x03\x20\x01(\tR\x04name\"T\n\x0cSignInParams\x12\x14\n\
|
||||
\x05email\x18\x01\x20\x01(\tR\x05email\x12\x1a\n\x08password\x18\x02\x20\
|
||||
@ -1574,7 +1574,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\x0eSignInResponse\x12\x17\n\x07user_id\x18\x01\x20\x01(\tR\x06userId\
|
||||
\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x14\n\x05email\x18\
|
||||
\x03\x20\x01(\tR\x05email\x12\x14\n\x05token\x18\x04\x20\x01(\tR\x05toke\
|
||||
n\"U\n\rSignUpRequest\x12\x14\n\x05email\x18\x01\x20\x01(\tR\x05email\
|
||||
n\"U\n\rSignUpPayload\x12\x14\n\x05email\x18\x01\x20\x01(\tR\x05email\
|
||||
\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\x1a\n\x08password\x18\
|
||||
\x03\x20\x01(\tR\x08password\"T\n\x0cSignUpParams\x12\x14\n\x05email\x18\
|
||||
\x01\x20\x01(\tR\x05email\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\
|
||||
|
@ -468,41 +468,41 @@ impl ::protobuf::reflect::ProtobufValue for UserProfile {
|
||||
}
|
||||
|
||||
#[derive(PartialEq,Clone,Default)]
|
||||
pub struct UpdateUserRequest {
|
||||
pub struct UpdateUserPayload {
|
||||
// message fields
|
||||
pub id: ::std::string::String,
|
||||
// message oneof groups
|
||||
pub one_of_name: ::std::option::Option<UpdateUserRequest_oneof_one_of_name>,
|
||||
pub one_of_email: ::std::option::Option<UpdateUserRequest_oneof_one_of_email>,
|
||||
pub one_of_password: ::std::option::Option<UpdateUserRequest_oneof_one_of_password>,
|
||||
pub one_of_name: ::std::option::Option<UpdateUserPayload_oneof_one_of_name>,
|
||||
pub one_of_email: ::std::option::Option<UpdateUserPayload_oneof_one_of_email>,
|
||||
pub one_of_password: ::std::option::Option<UpdateUserPayload_oneof_one_of_password>,
|
||||
// special fields
|
||||
pub unknown_fields: ::protobuf::UnknownFields,
|
||||
pub cached_size: ::protobuf::CachedSize,
|
||||
}
|
||||
|
||||
impl<'a> ::std::default::Default for &'a UpdateUserRequest {
|
||||
fn default() -> &'a UpdateUserRequest {
|
||||
<UpdateUserRequest as ::protobuf::Message>::default_instance()
|
||||
impl<'a> ::std::default::Default for &'a UpdateUserPayload {
|
||||
fn default() -> &'a UpdateUserPayload {
|
||||
<UpdateUserPayload as ::protobuf::Message>::default_instance()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateUserRequest_oneof_one_of_name {
|
||||
pub enum UpdateUserPayload_oneof_one_of_name {
|
||||
name(::std::string::String),
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateUserRequest_oneof_one_of_email {
|
||||
pub enum UpdateUserPayload_oneof_one_of_email {
|
||||
email(::std::string::String),
|
||||
}
|
||||
|
||||
#[derive(Clone,PartialEq,Debug)]
|
||||
pub enum UpdateUserRequest_oneof_one_of_password {
|
||||
pub enum UpdateUserPayload_oneof_one_of_password {
|
||||
password(::std::string::String),
|
||||
}
|
||||
|
||||
impl UpdateUserRequest {
|
||||
pub fn new() -> UpdateUserRequest {
|
||||
impl UpdateUserPayload {
|
||||
pub fn new() -> UpdateUserPayload {
|
||||
::std::default::Default::default()
|
||||
}
|
||||
|
||||
@ -537,7 +537,7 @@ impl UpdateUserRequest {
|
||||
|
||||
pub fn get_name(&self) -> &str {
|
||||
match self.one_of_name {
|
||||
::std::option::Option::Some(UpdateUserRequest_oneof_one_of_name::name(ref v)) => v,
|
||||
::std::option::Option::Some(UpdateUserPayload_oneof_one_of_name::name(ref v)) => v,
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
@ -547,24 +547,24 @@ impl UpdateUserRequest {
|
||||
|
||||
pub fn has_name(&self) -> bool {
|
||||
match self.one_of_name {
|
||||
::std::option::Option::Some(UpdateUserRequest_oneof_one_of_name::name(..)) => true,
|
||||
::std::option::Option::Some(UpdateUserPayload_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(UpdateUserRequest_oneof_one_of_name::name(v))
|
||||
self.one_of_name = ::std::option::Option::Some(UpdateUserPayload_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(UpdateUserRequest_oneof_one_of_name::name(_)) = self.one_of_name {
|
||||
if let ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_name::name(_)) = self.one_of_name {
|
||||
} else {
|
||||
self.one_of_name = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_name::name(::std::string::String::new()));
|
||||
self.one_of_name = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_name::name(::std::string::String::new()));
|
||||
}
|
||||
match self.one_of_name {
|
||||
::std::option::Option::Some(UpdateUserRequest_oneof_one_of_name::name(ref mut v)) => v,
|
||||
::std::option::Option::Some(UpdateUserPayload_oneof_one_of_name::name(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
@ -573,7 +573,7 @@ impl UpdateUserRequest {
|
||||
pub fn take_name(&mut self) -> ::std::string::String {
|
||||
if self.has_name() {
|
||||
match self.one_of_name.take() {
|
||||
::std::option::Option::Some(UpdateUserRequest_oneof_one_of_name::name(v)) => v,
|
||||
::std::option::Option::Some(UpdateUserPayload_oneof_one_of_name::name(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
@ -586,7 +586,7 @@ impl UpdateUserRequest {
|
||||
|
||||
pub fn get_email(&self) -> &str {
|
||||
match self.one_of_email {
|
||||
::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(ref v)) => v,
|
||||
::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(ref v)) => v,
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
@ -596,24 +596,24 @@ impl UpdateUserRequest {
|
||||
|
||||
pub fn has_email(&self) -> bool {
|
||||
match self.one_of_email {
|
||||
::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(..)) => true,
|
||||
::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(..)) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_email(&mut self, v: ::std::string::String) {
|
||||
self.one_of_email = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(v))
|
||||
self.one_of_email = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(v))
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_email(&mut self) -> &mut ::std::string::String {
|
||||
if let ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(_)) = self.one_of_email {
|
||||
if let ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(_)) = self.one_of_email {
|
||||
} else {
|
||||
self.one_of_email = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(::std::string::String::new()));
|
||||
self.one_of_email = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(::std::string::String::new()));
|
||||
}
|
||||
match self.one_of_email {
|
||||
::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(ref mut v)) => v,
|
||||
::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
@ -622,7 +622,7 @@ impl UpdateUserRequest {
|
||||
pub fn take_email(&mut self) -> ::std::string::String {
|
||||
if self.has_email() {
|
||||
match self.one_of_email.take() {
|
||||
::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(v)) => v,
|
||||
::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
@ -635,7 +635,7 @@ impl UpdateUserRequest {
|
||||
|
||||
pub fn get_password(&self) -> &str {
|
||||
match self.one_of_password {
|
||||
::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(ref v)) => v,
|
||||
::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(ref v)) => v,
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
@ -645,24 +645,24 @@ impl UpdateUserRequest {
|
||||
|
||||
pub fn has_password(&self) -> bool {
|
||||
match self.one_of_password {
|
||||
::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(..)) => true,
|
||||
::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(..)) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
// Param is passed by value, moved
|
||||
pub fn set_password(&mut self, v: ::std::string::String) {
|
||||
self.one_of_password = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(v))
|
||||
self.one_of_password = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(v))
|
||||
}
|
||||
|
||||
// Mutable pointer to the field.
|
||||
pub fn mut_password(&mut self) -> &mut ::std::string::String {
|
||||
if let ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(_)) = self.one_of_password {
|
||||
if let ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(_)) = self.one_of_password {
|
||||
} else {
|
||||
self.one_of_password = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(::std::string::String::new()));
|
||||
self.one_of_password = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(::std::string::String::new()));
|
||||
}
|
||||
match self.one_of_password {
|
||||
::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(ref mut v)) => v,
|
||||
::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(ref mut v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
}
|
||||
@ -671,7 +671,7 @@ impl UpdateUserRequest {
|
||||
pub fn take_password(&mut self) -> ::std::string::String {
|
||||
if self.has_password() {
|
||||
match self.one_of_password.take() {
|
||||
::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(v)) => v,
|
||||
::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(v)) => v,
|
||||
_ => panic!(),
|
||||
}
|
||||
} else {
|
||||
@ -680,7 +680,7 @@ impl UpdateUserRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Message for UpdateUserRequest {
|
||||
impl ::protobuf::Message for UpdateUserPayload {
|
||||
fn is_initialized(&self) -> bool {
|
||||
true
|
||||
}
|
||||
@ -696,19 +696,19 @@ impl ::protobuf::Message for UpdateUserRequest {
|
||||
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(UpdateUserRequest_oneof_one_of_name::name(is.read_string()?));
|
||||
self.one_of_name = ::std::option::Option::Some(UpdateUserPayload_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_email = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_email::email(is.read_string()?));
|
||||
self.one_of_email = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_email::email(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_password = ::std::option::Option::Some(UpdateUserRequest_oneof_one_of_password::password(is.read_string()?));
|
||||
self.one_of_password = ::std::option::Option::Some(UpdateUserPayload_oneof_one_of_password::password(is.read_string()?));
|
||||
},
|
||||
_ => {
|
||||
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
|
||||
@ -727,21 +727,21 @@ impl ::protobuf::Message for UpdateUserRequest {
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_name {
|
||||
match v {
|
||||
&UpdateUserRequest_oneof_one_of_name::name(ref v) => {
|
||||
&UpdateUserPayload_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_email {
|
||||
match v {
|
||||
&UpdateUserRequest_oneof_one_of_email::email(ref v) => {
|
||||
&UpdateUserPayload_oneof_one_of_email::email(ref v) => {
|
||||
my_size += ::protobuf::rt::string_size(3, &v);
|
||||
},
|
||||
};
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_password {
|
||||
match v {
|
||||
&UpdateUserRequest_oneof_one_of_password::password(ref v) => {
|
||||
&UpdateUserPayload_oneof_one_of_password::password(ref v) => {
|
||||
my_size += ::protobuf::rt::string_size(4, &v);
|
||||
},
|
||||
};
|
||||
@ -757,21 +757,21 @@ impl ::protobuf::Message for UpdateUserRequest {
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_name {
|
||||
match v {
|
||||
&UpdateUserRequest_oneof_one_of_name::name(ref v) => {
|
||||
&UpdateUserPayload_oneof_one_of_name::name(ref v) => {
|
||||
os.write_string(2, v)?;
|
||||
},
|
||||
};
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_email {
|
||||
match v {
|
||||
&UpdateUserRequest_oneof_one_of_email::email(ref v) => {
|
||||
&UpdateUserPayload_oneof_one_of_email::email(ref v) => {
|
||||
os.write_string(3, v)?;
|
||||
},
|
||||
};
|
||||
}
|
||||
if let ::std::option::Option::Some(ref v) = self.one_of_password {
|
||||
match v {
|
||||
&UpdateUserRequest_oneof_one_of_password::password(ref v) => {
|
||||
&UpdateUserPayload_oneof_one_of_password::password(ref v) => {
|
||||
os.write_string(4, v)?;
|
||||
},
|
||||
};
|
||||
@ -806,8 +806,8 @@ impl ::protobuf::Message for UpdateUserRequest {
|
||||
Self::descriptor_static()
|
||||
}
|
||||
|
||||
fn new() -> UpdateUserRequest {
|
||||
UpdateUserRequest::new()
|
||||
fn new() -> UpdateUserPayload {
|
||||
UpdateUserPayload::new()
|
||||
}
|
||||
|
||||
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
|
||||
@ -816,39 +816,39 @@ impl ::protobuf::Message for UpdateUserRequest {
|
||||
let mut fields = ::std::vec::Vec::new();
|
||||
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
|
||||
"id",
|
||||
|m: &UpdateUserRequest| { &m.id },
|
||||
|m: &mut UpdateUserRequest| { &mut m.id },
|
||||
|m: &UpdateUserPayload| { &m.id },
|
||||
|m: &mut UpdateUserPayload| { &mut m.id },
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
|
||||
"name",
|
||||
UpdateUserRequest::has_name,
|
||||
UpdateUserRequest::get_name,
|
||||
UpdateUserPayload::has_name,
|
||||
UpdateUserPayload::get_name,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
|
||||
"email",
|
||||
UpdateUserRequest::has_email,
|
||||
UpdateUserRequest::get_email,
|
||||
UpdateUserPayload::has_email,
|
||||
UpdateUserPayload::get_email,
|
||||
));
|
||||
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
|
||||
"password",
|
||||
UpdateUserRequest::has_password,
|
||||
UpdateUserRequest::get_password,
|
||||
UpdateUserPayload::has_password,
|
||||
UpdateUserPayload::get_password,
|
||||
));
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateUserRequest>(
|
||||
"UpdateUserRequest",
|
||||
::protobuf::reflect::MessageDescriptor::new_pb_name::<UpdateUserPayload>(
|
||||
"UpdateUserPayload",
|
||||
fields,
|
||||
file_descriptor_proto()
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn default_instance() -> &'static UpdateUserRequest {
|
||||
static instance: ::protobuf::rt::LazyV2<UpdateUserRequest> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(UpdateUserRequest::new)
|
||||
fn default_instance() -> &'static UpdateUserPayload {
|
||||
static instance: ::protobuf::rt::LazyV2<UpdateUserPayload> = ::protobuf::rt::LazyV2::INIT;
|
||||
instance.get(UpdateUserPayload::new)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::Clear for UpdateUserRequest {
|
||||
impl ::protobuf::Clear for UpdateUserPayload {
|
||||
fn clear(&mut self) {
|
||||
self.id.clear();
|
||||
self.one_of_name = ::std::option::Option::None;
|
||||
@ -858,13 +858,13 @@ impl ::protobuf::Clear for UpdateUserRequest {
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for UpdateUserRequest {
|
||||
impl ::std::fmt::Debug for UpdateUserPayload {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
::protobuf::text_format::fmt(self, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::protobuf::reflect::ProtobufValue for UpdateUserRequest {
|
||||
impl ::protobuf::reflect::ProtobufValue for UpdateUserPayload {
|
||||
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
|
||||
::protobuf::reflect::ReflectValueRef::Message(self)
|
||||
}
|
||||
@ -1278,7 +1278,7 @@ static file_descriptor_proto_data: &'static [u8] = b"\
|
||||
\x01(\tR\x05token\"]\n\x0bUserProfile\x12\x0e\n\x02id\x18\x01\x20\x01(\t\
|
||||
R\x02id\x12\x14\n\x05email\x18\x02\x20\x01(\tR\x05email\x12\x12\n\x04nam\
|
||||
e\x18\x03\x20\x01(\tR\x04name\x12\x14\n\x05token\x18\x04\x20\x01(\tR\x05\
|
||||
token\"\xa1\x01\n\x11UpdateUserRequest\x12\x0e\n\x02id\x18\x01\x20\x01(\
|
||||
token\"\xa1\x01\n\x11UpdateUserPayload\x12\x0e\n\x02id\x18\x01\x20\x01(\
|
||||
\tR\x02id\x12\x14\n\x04name\x18\x02\x20\x01(\tH\0R\x04name\x12\x16\n\x05\
|
||||
email\x18\x03\x20\x01(\tH\x01R\x05email\x12\x1c\n\x08password\x18\x04\
|
||||
\x20\x01(\tH\x02R\x08passwordB\r\n\x0bone_of_nameB\x0e\n\x0cone_of_email\
|
||||
|
@ -1,6 +1,6 @@
|
||||
syntax = "proto3";
|
||||
|
||||
message SignInRequest {
|
||||
message SignInPayload {
|
||||
string email = 1;
|
||||
string password = 2;
|
||||
string name = 3;
|
||||
@ -16,7 +16,7 @@ message SignInResponse {
|
||||
string email = 3;
|
||||
string token = 4;
|
||||
}
|
||||
message SignUpRequest {
|
||||
message SignUpPayload {
|
||||
string email = 1;
|
||||
string name = 2;
|
||||
string password = 3;
|
||||
|
@ -9,7 +9,7 @@ message UserProfile {
|
||||
string name = 3;
|
||||
string token = 4;
|
||||
}
|
||||
message UpdateUserRequest {
|
||||
message UpdateUserPayload {
|
||||
string id = 1;
|
||||
oneof one_of_name { string name = 2; };
|
||||
oneof one_of_email { string email = 3; };
|
||||
|
Loading…
Reference in New Issue
Block a user