// This is a generated file - do not edit. // // Generated from note.proto. // @dart = 3.3 // ignore_for_file: annotate_overrides, camel_case_types, comment_references // ignore_for_file: constant_identifier_names // ignore_for_file: curly_braces_in_flow_control_structures // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes // ignore_for_file: non_constant_identifier_names import 'dart:async' as $async; import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; import 'blocks.pb.dart' as $1; import 'note.pb.dart' as $0; export 'note.pb.dart'; /// 笔记服务 @$pb.GrpcServiceName('cloud.Note') class NoteClient extends $grpc.Client { /// The hostname for this service. static const $core.String defaultHost = ''; /// OAuth scopes needed for the client. static const $core.List<$core.String> oauthScopes = [ '', ]; NoteClient(super.channel, {super.options, super.interceptors}); /// 创建笔记 $grpc.ResponseFuture<$1.StatusReply> createNote( $0.CreateNoteRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$createNote, request, options: options); } /// 获取笔记详情 $grpc.ResponseFuture<$0.CloudNoteItem> getNote( $1.IdentRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$getNote, request, options: options); } /// 更新笔记 $grpc.ResponseFuture<$1.StatusReply> updateNote( $0.CloudNoteItem request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$updateNote, request, options: options); } /// 删除笔记 $grpc.ResponseFuture<$1.StatusReply> deleteNote( $1.IdentRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$deleteNote, request, options: options); } /// 获取笔记列表 $grpc.ResponseFuture<$0.ListNotesResponse> listNotes( $1.FetchRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$listNotes, request, options: options); } /// 置顶/取消置顶笔记 $grpc.ResponseFuture<$1.StatusReply> togglePin( $0.TogglePinRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$togglePin, request, options: options); } /// 增加浏览次数 $grpc.ResponseFuture<$1.StatusReply> incrementViews( $1.IdentRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$incrementViews, request, options: options); } /// 搜索笔记 $grpc.ResponseFuture<$0.ListNotesResponse> searchNotes( $1.FetchRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$searchNotes, request, options: options); } /// 上传附件 $grpc.ResponseFuture<$1.StatusReply> insertAttachment( $0.NoteAttachmentItem request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$insertAttachment, request, options: options); } /// 删除附件 $grpc.ResponseFuture<$1.StatusReply> deleteAttachment( $1.IdentRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$deleteAttachment, request, options: options); } // method descriptors static final _$createNote = $grpc.ClientMethod<$0.CreateNoteRequest, $1.StatusReply>( '/cloud.Note/CreateNote', ($0.CreateNoteRequest value) => value.writeToBuffer(), $1.StatusReply.fromBuffer); static final _$getNote = $grpc.ClientMethod<$1.IdentRequest, $0.CloudNoteItem>( '/cloud.Note/GetNote', ($1.IdentRequest value) => value.writeToBuffer(), $0.CloudNoteItem.fromBuffer); static final _$updateNote = $grpc.ClientMethod<$0.CloudNoteItem, $1.StatusReply>( '/cloud.Note/UpdateNote', ($0.CloudNoteItem value) => value.writeToBuffer(), $1.StatusReply.fromBuffer); static final _$deleteNote = $grpc.ClientMethod<$1.IdentRequest, $1.StatusReply>( '/cloud.Note/DeleteNote', ($1.IdentRequest value) => value.writeToBuffer(), $1.StatusReply.fromBuffer); static final _$listNotes = $grpc.ClientMethod<$1.FetchRequest, $0.ListNotesResponse>( '/cloud.Note/ListNotes', ($1.FetchRequest value) => value.writeToBuffer(), $0.ListNotesResponse.fromBuffer); static final _$togglePin = $grpc.ClientMethod<$0.TogglePinRequest, $1.StatusReply>( '/cloud.Note/TogglePin', ($0.TogglePinRequest value) => value.writeToBuffer(), $1.StatusReply.fromBuffer); static final _$incrementViews = $grpc.ClientMethod<$1.IdentRequest, $1.StatusReply>( '/cloud.Note/IncrementViews', ($1.IdentRequest value) => value.writeToBuffer(), $1.StatusReply.fromBuffer); static final _$searchNotes = $grpc.ClientMethod<$1.FetchRequest, $0.ListNotesResponse>( '/cloud.Note/SearchNotes', ($1.FetchRequest value) => value.writeToBuffer(), $0.ListNotesResponse.fromBuffer); static final _$insertAttachment = $grpc.ClientMethod<$0.NoteAttachmentItem, $1.StatusReply>( '/cloud.Note/InsertAttachment', ($0.NoteAttachmentItem value) => value.writeToBuffer(), $1.StatusReply.fromBuffer); static final _$deleteAttachment = $grpc.ClientMethod<$1.IdentRequest, $1.StatusReply>( '/cloud.Note/DeleteAttachment', ($1.IdentRequest value) => value.writeToBuffer(), $1.StatusReply.fromBuffer); } @$pb.GrpcServiceName('cloud.Note') abstract class NoteServiceBase extends $grpc.Service { $core.String get $name => 'cloud.Note'; NoteServiceBase() { $addMethod($grpc.ServiceMethod<$0.CreateNoteRequest, $1.StatusReply>( 'CreateNote', createNote_Pre, false, false, ($core.List<$core.int> value) => $0.CreateNoteRequest.fromBuffer(value), ($1.StatusReply value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$1.IdentRequest, $0.CloudNoteItem>( 'GetNote', getNote_Pre, false, false, ($core.List<$core.int> value) => $1.IdentRequest.fromBuffer(value), ($0.CloudNoteItem value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$0.CloudNoteItem, $1.StatusReply>( 'UpdateNote', updateNote_Pre, false, false, ($core.List<$core.int> value) => $0.CloudNoteItem.fromBuffer(value), ($1.StatusReply value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$1.IdentRequest, $1.StatusReply>( 'DeleteNote', deleteNote_Pre, false, false, ($core.List<$core.int> value) => $1.IdentRequest.fromBuffer(value), ($1.StatusReply value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$1.FetchRequest, $0.ListNotesResponse>( 'ListNotes', listNotes_Pre, false, false, ($core.List<$core.int> value) => $1.FetchRequest.fromBuffer(value), ($0.ListNotesResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$0.TogglePinRequest, $1.StatusReply>( 'TogglePin', togglePin_Pre, false, false, ($core.List<$core.int> value) => $0.TogglePinRequest.fromBuffer(value), ($1.StatusReply value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$1.IdentRequest, $1.StatusReply>( 'IncrementViews', incrementViews_Pre, false, false, ($core.List<$core.int> value) => $1.IdentRequest.fromBuffer(value), ($1.StatusReply value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$1.FetchRequest, $0.ListNotesResponse>( 'SearchNotes', searchNotes_Pre, false, false, ($core.List<$core.int> value) => $1.FetchRequest.fromBuffer(value), ($0.ListNotesResponse value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$0.NoteAttachmentItem, $1.StatusReply>( 'InsertAttachment', insertAttachment_Pre, false, false, ($core.List<$core.int> value) => $0.NoteAttachmentItem.fromBuffer(value), ($1.StatusReply value) => value.writeToBuffer())); $addMethod($grpc.ServiceMethod<$1.IdentRequest, $1.StatusReply>( 'DeleteAttachment', deleteAttachment_Pre, false, false, ($core.List<$core.int> value) => $1.IdentRequest.fromBuffer(value), ($1.StatusReply value) => value.writeToBuffer())); } $async.Future<$1.StatusReply> createNote_Pre($grpc.ServiceCall $call, $async.Future<$0.CreateNoteRequest> $request) async { return createNote($call, await $request); } $async.Future<$1.StatusReply> createNote( $grpc.ServiceCall call, $0.CreateNoteRequest request); $async.Future<$0.CloudNoteItem> getNote_Pre( $grpc.ServiceCall $call, $async.Future<$1.IdentRequest> $request) async { return getNote($call, await $request); } $async.Future<$0.CloudNoteItem> getNote( $grpc.ServiceCall call, $1.IdentRequest request); $async.Future<$1.StatusReply> updateNote_Pre( $grpc.ServiceCall $call, $async.Future<$0.CloudNoteItem> $request) async { return updateNote($call, await $request); } $async.Future<$1.StatusReply> updateNote( $grpc.ServiceCall call, $0.CloudNoteItem request); $async.Future<$1.StatusReply> deleteNote_Pre( $grpc.ServiceCall $call, $async.Future<$1.IdentRequest> $request) async { return deleteNote($call, await $request); } $async.Future<$1.StatusReply> deleteNote( $grpc.ServiceCall call, $1.IdentRequest request); $async.Future<$0.ListNotesResponse> listNotes_Pre( $grpc.ServiceCall $call, $async.Future<$1.FetchRequest> $request) async { return listNotes($call, await $request); } $async.Future<$0.ListNotesResponse> listNotes( $grpc.ServiceCall call, $1.FetchRequest request); $async.Future<$1.StatusReply> togglePin_Pre($grpc.ServiceCall $call, $async.Future<$0.TogglePinRequest> $request) async { return togglePin($call, await $request); } $async.Future<$1.StatusReply> togglePin( $grpc.ServiceCall call, $0.TogglePinRequest request); $async.Future<$1.StatusReply> incrementViews_Pre( $grpc.ServiceCall $call, $async.Future<$1.IdentRequest> $request) async { return incrementViews($call, await $request); } $async.Future<$1.StatusReply> incrementViews( $grpc.ServiceCall call, $1.IdentRequest request); $async.Future<$0.ListNotesResponse> searchNotes_Pre( $grpc.ServiceCall $call, $async.Future<$1.FetchRequest> $request) async { return searchNotes($call, await $request); } $async.Future<$0.ListNotesResponse> searchNotes( $grpc.ServiceCall call, $1.FetchRequest request); $async.Future<$1.StatusReply> insertAttachment_Pre($grpc.ServiceCall $call, $async.Future<$0.NoteAttachmentItem> $request) async { return insertAttachment($call, await $request); } $async.Future<$1.StatusReply> insertAttachment( $grpc.ServiceCall call, $0.NoteAttachmentItem request); $async.Future<$1.StatusReply> deleteAttachment_Pre( $grpc.ServiceCall $call, $async.Future<$1.IdentRequest> $request) async { return deleteAttachment($call, await $request); } $async.Future<$1.StatusReply> deleteAttachment( $grpc.ServiceCall call, $1.IdentRequest request); }