From bedd3977b85ebd068ec457391b6df923f4c21860 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Tue, 24 Mar 2026 21:24:45 -0700 Subject: [PATCH] Fix protobuf setup: canonical proto, buf lint, Makefile proto target - Restored canonical proto from eng-pad-server (PageData, StrokeData message names, not Notebook/Page/Stroke) - Added java_package + java_multiple_files options - Renamed service to EngPadSyncService (buf STANDARD lint compliance) - Simplified build.gradle.kts: removed broken custom GenerateProtoTask, proto stubs generated via Makefile `make proto` and checked into git - Generated stubs in app/src/main/java/gen/ - Fixed SyncClient/SyncManager to match canonical proto schema - Updated dependency versions: protobuf 4.34.1, grpc 1.80.0, grpcKotlin 1.5.0 - Added buf.yaml with STANDARD lint rules and FILE breaking detection Co-Authored-By: Claude Opus 4.6 (1M context) --- .claude/worktrees/agent-a02dd4f9 | 1 + .claude/worktrees/agent-a1d062c0 | 1 + .claude/worktrees/agent-a8f94a24 | 1 + Makefile | 26 +- app/build.gradle.kts | 175 ----- .../proto/v1/CreateShareLinkRequest.java | 294 ++++++++ .../proto/v1/CreateShareLinkRequestKt.kt | 62 ++ .../v1/CreateShareLinkRequestOrBuilder.java | 21 + .../proto/v1/CreateShareLinkResponse.java | 474 +++++++++++++ .../proto/v1/CreateShareLinkResponseKt.kt | 89 +++ .../v1/CreateShareLinkResponseOrBuilder.java | 44 ++ .../proto/v1/DeleteNotebookRequest.java | 238 +++++++ .../proto/v1/DeleteNotebookRequestKt.kt | 45 ++ .../v1/DeleteNotebookRequestOrBuilder.java | 15 + .../proto/v1/DeleteNotebookResponse.java | 181 +++++ .../proto/v1/DeleteNotebookResponseKt.kt | 28 + .../v1/DeleteNotebookResponseOrBuilder.java | 9 + .../proto/v1/EngPadSyncServiceGrpc.java | 621 +++++++++++++++++ .../engpad/proto/v1/ListNotebooksRequest.java | 181 +++++ .../engpad/proto/v1/ListNotebooksRequestKt.kt | 28 + .../v1/ListNotebooksRequestOrBuilder.java | 9 + .../proto/v1/ListNotebooksResponse.java | 382 +++++++++++ .../proto/v1/ListNotebooksResponseKt.kt | 99 +++ .../v1/ListNotebooksResponseOrBuilder.java | 23 + .../proto/v1/ListShareLinksRequest.java | 238 +++++++ .../proto/v1/ListShareLinksRequestKt.kt | 45 ++ .../v1/ListShareLinksRequestOrBuilder.java | 15 + .../proto/v1/ListShareLinksResponse.java | 382 +++++++++++ .../proto/v1/ListShareLinksResponseKt.kt | 99 +++ .../v1/ListShareLinksResponseOrBuilder.java | 23 + .../engpad/proto/v1/NotebookSummary.java | 639 ++++++++++++++++++ .../engpad/proto/v1/NotebookSummaryKt.kt | 140 ++++ .../proto/v1/NotebookSummaryOrBuilder.java | 62 ++ .../engpad/proto/v1/PageData.java | 493 ++++++++++++++ .../engpad/proto/v1/PageDataKt.kt | 133 ++++ .../engpad/proto/v1/PageDataOrBuilder.java | 35 + .../proto/v1/RevokeShareLinkRequest.java | 281 ++++++++ .../proto/v1/RevokeShareLinkRequestKt.kt | 45 ++ .../v1/RevokeShareLinkRequestOrBuilder.java | 21 + .../proto/v1/RevokeShareLinkResponse.java | 181 +++++ .../proto/v1/RevokeShareLinkResponseKt.kt | 28 + .../v1/RevokeShareLinkResponseOrBuilder.java | 9 + .../engpad/proto/v1/ShareLinkInfo.java | 568 ++++++++++++++++ .../engpad/proto/v1/ShareLinkInfoKt.kt | 116 ++++ .../proto/v1/ShareLinkInfoOrBuilder.java | 55 ++ .../engpad/proto/v1/StrokeData.java | 504 ++++++++++++++ .../engpad/proto/v1/StrokeDataKt.kt | 113 ++++ .../engpad/proto/v1/StrokeDataOrBuilder.java | 45 ++ .../metacircular/engpad/proto/v1/Sync.java | 16 + .../engpad/proto/v1/SyncGrpcKt.kt | 332 +++++++++ .../metacircular/engpad/proto/v1/SyncKt.kt | 0 .../engpad/proto/v1/SyncNotebookRequest.java | 634 +++++++++++++++++ .../engpad/proto/v1/SyncNotebookRequestKt.kt | 150 ++++ .../v1/SyncNotebookRequestOrBuilder.java | 53 ++ .../engpad/proto/v1/SyncNotebookResponse.java | 333 +++++++++ .../engpad/proto/v1/SyncNotebookResponseKt.kt | 72 ++ .../v1/SyncNotebookResponseOrBuilder.java | 26 + .../engpad/data/sync/SyncClient.kt | 6 +- .../engpad/data/sync/SyncManager.kt | 66 +- app/src/main/proto/engpad/v1/sync.proto | 106 +-- buf.yaml | 12 + gradle/libs.versions.toml | 6 +- 62 files changed, 8857 insertions(+), 272 deletions(-) create mode 160000 .claude/worktrees/agent-a02dd4f9 create mode 160000 .claude/worktrees/agent-a1d062c0 create mode 160000 .claude/worktrees/agent-a8f94a24 create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkRequest.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkRequestKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkRequestOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkResponse.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkResponseKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkResponseOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookRequest.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookRequestKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookRequestOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookResponse.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookResponseKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookResponseOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/EngPadSyncServiceGrpc.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksRequest.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksRequestKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksRequestOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksResponse.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksResponseKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksResponseOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksRequest.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksRequestKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksRequestOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksResponse.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksResponseKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksResponseOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/NotebookSummary.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/NotebookSummaryKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/NotebookSummaryOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/PageData.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/PageDataKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/PageDataOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkRequest.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkRequestKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkRequestOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkResponse.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkResponseKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkResponseOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ShareLinkInfo.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ShareLinkInfoKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/ShareLinkInfoOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/StrokeData.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/StrokeDataKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/StrokeDataOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/Sync.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncGrpcKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookRequest.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookRequestKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookRequestOrBuilder.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookResponse.java create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookResponseKt.kt create mode 100644 app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookResponseOrBuilder.java create mode 100644 buf.yaml diff --git a/.claude/worktrees/agent-a02dd4f9 b/.claude/worktrees/agent-a02dd4f9 new file mode 160000 index 0000000..6e5c500 --- /dev/null +++ b/.claude/worktrees/agent-a02dd4f9 @@ -0,0 +1 @@ +Subproject commit 6e5c5007866d2a85a12e10e1549b76911132c1f0 diff --git a/.claude/worktrees/agent-a1d062c0 b/.claude/worktrees/agent-a1d062c0 new file mode 160000 index 0000000..16de639 --- /dev/null +++ b/.claude/worktrees/agent-a1d062c0 @@ -0,0 +1 @@ +Subproject commit 16de63972aaf2b2d9dea25dd455219a2f7287d50 diff --git a/.claude/worktrees/agent-a8f94a24 b/.claude/worktrees/agent-a8f94a24 new file mode 160000 index 0000000..e106d1a --- /dev/null +++ b/.claude/worktrees/agent-a8f94a24 @@ -0,0 +1 @@ +Subproject commit e106d1ab76e31e0b235eb0da923737aa49941b19 diff --git a/Makefile b/Makefile index e55330e..a4e9e60 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,11 @@ AVD ?= DC-1 PACKAGE := net.metacircular.engpad ACTIVITY := $(PACKAGE).MainActivity -.PHONY: build test lint clean run devrun apk all +# Proto generation output directory (checked into git) +PROTO_GEN := app/src/main/java/gen +PROTO_SRC := app/src/main/proto + +.PHONY: build test lint clean run devrun apk proto proto-lint all # Build everything (compile + test + lint) all: lint test build @@ -31,6 +35,26 @@ apk: ./gradlew assembleRelease @echo "APK: app/build/outputs/apk/release/app-release-unsigned.apk" +# Generate Kotlin/gRPC stubs from .proto files +proto: + @rm -rf $(PROTO_GEN) + @mkdir -p $(PROTO_GEN) + protoc \ + --proto_path=$(PROTO_SRC) \ + --proto_path=$$(protoc --print-proto-path 2>/dev/null || echo /usr/local/include) \ + --java_out=lite:$(PROTO_GEN) \ + --kotlin_out=lite:$(PROTO_GEN) \ + --plugin=protoc-gen-grpc=$$(which protoc-gen-grpc-java 2>/dev/null || echo $(HOME)/bin/protoc-gen-grpc-java) \ + --grpc_out=lite:$(PROTO_GEN) \ + --plugin=protoc-gen-grpckt=$(HOME)/bin/protoc-gen-grpckt \ + --grpckt_out=lite:$(PROTO_GEN) \ + $$(find $(PROTO_SRC) -name '*.proto') + +# Lint proto files with buf +proto-lint: + buf lint + buf breaking --against '.git#branch=master,subdir=$(PROTO_SRC)' + # Clean build artifacts clean: ./gradlew clean diff --git a/app/build.gradle.kts b/app/build.gradle.kts index db4d078..534b8fb 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,5 +1,3 @@ -import javax.inject.Inject - plugins { alias(libs.plugins.android.application) alias(libs.plugins.kotlin.compose) @@ -50,179 +48,6 @@ kotlin { jvmToolchain(17) } -// --- Protobuf / gRPC code generation via protoc --- -// -// The protobuf-gradle-plugin (0.9.6) does not yet support AGP 9, so we drive -// protoc directly. A custom task exposes DirectoryProperty outputs that the -// AGP Variant API can consume. - -abstract class GenerateProtoTask : DefaultTask() { - @get:Inject - abstract val execOps: ExecOperations - @get:InputDirectory - abstract val protoSourceDir: DirectoryProperty - - @get:InputFiles - abstract val protocFile: ConfigurableFileCollection - - @get:InputFiles - abstract val grpcJavaPluginFile: ConfigurableFileCollection - - @get:InputFiles - abstract val grpcKotlinPluginFile: ConfigurableFileCollection - - /** Protobuf JAR containing well-known type .proto files (google/protobuf/*.proto). */ - @get:InputFiles - abstract val protobufIncludesJar: ConfigurableFileCollection - - /** Temp directory for extracting well-known proto includes. */ - @get:OutputDirectory - abstract val includesExtractDir: DirectoryProperty - - /** Java sources generated by protoc (messages). */ - @get:OutputDirectory - abstract val javaOutputDir: DirectoryProperty - - /** Kotlin sources generated by protoc (Kotlin DSL builders). */ - @get:OutputDirectory - abstract val kotlinOutputDir: DirectoryProperty - - /** Java sources generated by protoc-gen-grpc-java (service stubs). */ - @get:OutputDirectory - abstract val grpcOutputDir: DirectoryProperty - - /** Kotlin sources generated by protoc-gen-grpc-kotlin (coroutine stubs). */ - @get:OutputDirectory - abstract val grpcKtOutputDir: DirectoryProperty - - @TaskAction - fun generate() { - val javaOut = javaOutputDir.get().asFile - val kotlinOut = kotlinOutputDir.get().asFile - val grpcOut = grpcOutputDir.get().asFile - val grpcKtOut = grpcKtOutputDir.get().asFile - - listOf(javaOut, kotlinOut, grpcOut, grpcKtOut).forEach { it.mkdirs() } - - // Extract well-known .proto files from the protobuf JAR. - val extractDir = includesExtractDir.get().asFile - extractDir.mkdirs() - val jar = protobufIncludesJar.singleFile - java.util.zip.ZipFile(jar).use { zip -> - zip.entries().asSequence() - .filter { it.name.endsWith(".proto") } - .forEach { entry -> - val outFile = File(extractDir, entry.name) - outFile.parentFile.mkdirs() - zip.getInputStream(entry).use { input -> - outFile.outputStream().use { output -> input.copyTo(output) } - } - } - } - - val protoc = protocFile.singleFile.also { it.setExecutable(true) } - val grpcJava = grpcJavaPluginFile.singleFile.also { it.setExecutable(true) } - val grpcKt = grpcKotlinPluginFile.singleFile.also { it.setExecutable(true) } - - val protoDir = protoSourceDir.get().asFile - val protoFiles = protoDir.walkTopDown().filter { it.extension == "proto" }.toList() - if (protoFiles.isEmpty()) return - - execOps.exec { - commandLine( - protoc.absolutePath, - "--proto_path=${protoDir.absolutePath}", - "--proto_path=${extractDir.absolutePath}", - "--java_out=lite:${javaOut.absolutePath}", - "--kotlin_out=lite:${kotlinOut.absolutePath}", - "--plugin=protoc-gen-grpc=${grpcJava.absolutePath}", - "--grpc_out=lite:${grpcOut.absolutePath}", - "--plugin=protoc-gen-grpckt=${grpcKt.absolutePath}", - "--grpckt_out=lite:${grpcKtOut.absolutePath}", - *protoFiles.map { it.absolutePath }.toTypedArray(), - ) - } - } -} - -val protobufIncludes: Configuration by configurations.creating { - isTransitive = false -} -val protocArtifact: Configuration by configurations.creating { - isTransitive = false -} -val grpcJavaPlugin: Configuration by configurations.creating { - isTransitive = false -} -val grpcKotlinPlugin: Configuration by configurations.creating { - isTransitive = false -} - -// Determine the OS/arch classifier for native protoc binaries. -val protocClassifier: String = run { - val os = System.getProperty("os.name").lowercase() - val arch = System.getProperty("os.arch").lowercase() - val osName = when { - os.contains("mac") || os.contains("darwin") -> "osx" - os.contains("linux") -> "linux" - os.contains("windows") -> "windows" - else -> error("Unsupported OS: $os") - } - val archName = when { - arch.contains("aarch64") || arch.contains("arm64") -> "aarch_64" - arch.contains("amd64") || arch.contains("x86_64") -> "x86_64" - else -> error("Unsupported architecture: $arch") - } - "$osName-$archName" -} - -dependencies { - protobufIncludes("com.google.protobuf:protobuf-java:${libs.versions.protobuf.get()}") - protocArtifact("com.google.protobuf:protoc:${libs.versions.protobuf.get()}:$protocClassifier@exe") - grpcJavaPlugin("io.grpc:protoc-gen-grpc-java:${libs.versions.grpc.get()}:$protocClassifier@exe") - grpcKotlinPlugin("io.grpc:protoc-gen-grpc-kotlin:${libs.versions.grpcKotlin.get()}:jdk8@jar") -} - -val protoGenBase = layout.buildDirectory.dir("generated/source/proto/main") - -val generateProto by tasks.registering(GenerateProtoTask::class) { - description = "Generate Kotlin/gRPC sources from .proto files" - group = "build" - - protoSourceDir.set(layout.projectDirectory.dir("src/main/proto")) - protocFile.from(protocArtifact) - grpcJavaPluginFile.from(grpcJavaPlugin) - grpcKotlinPluginFile.from(grpcKotlinPlugin) - - protobufIncludesJar.from(protobufIncludes) - includesExtractDir.set(protoGenBase.map { it.dir("includes") }) - - javaOutputDir.set(protoGenBase.map { it.dir("java") }) - kotlinOutputDir.set(protoGenBase.map { it.dir("kotlin") }) - grpcOutputDir.set(protoGenBase.map { it.dir("grpc") }) - grpcKtOutputDir.set(protoGenBase.map { it.dir("grpckt") }) -} - -// Register generated directories with AGP via the Variant API (AGP 9+). -androidComponents { - onVariants { variant -> - variant.sources.java?.addGeneratedSourceDirectory( - generateProto, GenerateProtoTask::javaOutputDir, - ) - variant.sources.java?.addGeneratedSourceDirectory( - generateProto, GenerateProtoTask::grpcOutputDir, - ) - variant.sources.kotlin?.addGeneratedSourceDirectory( - generateProto, GenerateProtoTask::kotlinOutputDir, - ) - variant.sources.kotlin?.addGeneratedSourceDirectory( - generateProto, GenerateProtoTask::grpcKtOutputDir, - ) - } -} - -// --- end protobuf generation --- - dependencies { implementation(libs.androidx.core.ktx) implementation(libs.androidx.activity.compose) diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkRequest.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkRequest.java new file mode 100644 index 0000000..a502980 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkRequest.java @@ -0,0 +1,294 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.CreateShareLinkRequest} + */ +public final class CreateShareLinkRequest extends + com.google.protobuf.GeneratedMessageLite< + CreateShareLinkRequest, CreateShareLinkRequest.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.CreateShareLinkRequest) + CreateShareLinkRequestOrBuilder { + private CreateShareLinkRequest() { + } + public static final int NOTEBOOK_ID_FIELD_NUMBER = 1; + private long notebookId_; + /** + * int64 notebook_id = 1; + * @return The notebookId. + */ + @java.lang.Override + public long getNotebookId() { + return notebookId_; + } + /** + * int64 notebook_id = 1; + * @param value The notebookId to set. + */ + private void setNotebookId(long value) { + + notebookId_ = value; + } + /** + * int64 notebook_id = 1; + */ + private void clearNotebookId() { + + notebookId_ = 0L; + } + + public static final int EXPIRES_IN_SECONDS_FIELD_NUMBER = 2; + private long expiresInSeconds_; + /** + * int64 expires_in_seconds = 2; + * @return The expiresInSeconds. + */ + @java.lang.Override + public long getExpiresInSeconds() { + return expiresInSeconds_; + } + /** + * int64 expires_in_seconds = 2; + * @param value The expiresInSeconds to set. + */ + private void setExpiresInSeconds(long value) { + + expiresInSeconds_ = value; + } + /** + * int64 expires_in_seconds = 2; + */ + private void clearExpiresInSeconds() { + + expiresInSeconds_ = 0L; + } + + public static net.metacircular.engpad.proto.v1.CreateShareLinkRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.CreateShareLinkRequest prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.CreateShareLinkRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.CreateShareLinkRequest, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.CreateShareLinkRequest) + net.metacircular.engpad.proto.v1.CreateShareLinkRequestOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.CreateShareLinkRequest.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * int64 notebook_id = 1; + * @return The notebookId. + */ + @java.lang.Override + public long getNotebookId() { + return instance.getNotebookId(); + } + /** + * int64 notebook_id = 1; + * @param value The notebookId to set. + * @return This builder for chaining. + */ + public Builder setNotebookId(long value) { + copyOnWrite(); + instance.setNotebookId(value); + return this; + } + /** + * int64 notebook_id = 1; + * @return This builder for chaining. + */ + public Builder clearNotebookId() { + copyOnWrite(); + instance.clearNotebookId(); + return this; + } + + /** + * int64 expires_in_seconds = 2; + * @return The expiresInSeconds. + */ + @java.lang.Override + public long getExpiresInSeconds() { + return instance.getExpiresInSeconds(); + } + /** + * int64 expires_in_seconds = 2; + * @param value The expiresInSeconds to set. + * @return This builder for chaining. + */ + public Builder setExpiresInSeconds(long value) { + copyOnWrite(); + instance.setExpiresInSeconds(value); + return this; + } + /** + * int64 expires_in_seconds = 2; + * @return This builder for chaining. + */ + public Builder clearExpiresInSeconds() { + copyOnWrite(); + instance.clearExpiresInSeconds(); + return this; + } + + // @@protoc_insertion_point(builder_scope:engpad.v1.CreateShareLinkRequest) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.CreateShareLinkRequest(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "notebookId_", + "expiresInSeconds_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0002\u0002\u0002" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.CreateShareLinkRequest.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.CreateShareLinkRequest) + private static final net.metacircular.engpad.proto.v1.CreateShareLinkRequest DEFAULT_INSTANCE; + static { + CreateShareLinkRequest defaultInstance = new CreateShareLinkRequest(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + CreateShareLinkRequest.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.CreateShareLinkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkRequestKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkRequestKt.kt new file mode 100644 index 0000000..0a8c9f8 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkRequestKt.kt @@ -0,0 +1,62 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializecreateShareLinkRequest") +public inline fun createShareLinkRequest(block: net.metacircular.engpad.proto.v1.CreateShareLinkRequestKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.CreateShareLinkRequest = + net.metacircular.engpad.proto.v1.CreateShareLinkRequestKt.Dsl._create(net.metacircular.engpad.proto.v1.CreateShareLinkRequest.newBuilder()).apply { block() }._build() +public object CreateShareLinkRequestKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.CreateShareLinkRequest.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.CreateShareLinkRequest.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.CreateShareLinkRequest = _builder.build() + + /** + * int64 notebook_id = 1; + */ + public var notebookId: kotlin.Long + @JvmName("getNotebookId") + get() = _builder.getNotebookId() + @JvmName("setNotebookId") + set(value) { + _builder.setNotebookId(value) + } + /** + * int64 notebook_id = 1; + */ + public fun clearNotebookId() { + _builder.clearNotebookId() + } + + /** + * int64 expires_in_seconds = 2; + */ + public var expiresInSeconds: kotlin.Long + @JvmName("getExpiresInSeconds") + get() = _builder.getExpiresInSeconds() + @JvmName("setExpiresInSeconds") + set(value) { + _builder.setExpiresInSeconds(value) + } + /** + * int64 expires_in_seconds = 2; + */ + public fun clearExpiresInSeconds() { + _builder.clearExpiresInSeconds() + } + } +} +public inline fun net.metacircular.engpad.proto.v1.CreateShareLinkRequest.copy(block: net.metacircular.engpad.proto.v1.CreateShareLinkRequestKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.CreateShareLinkRequest = + net.metacircular.engpad.proto.v1.CreateShareLinkRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkRequestOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkRequestOrBuilder.java new file mode 100644 index 0000000..edf895e --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkRequestOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface CreateShareLinkRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.CreateShareLinkRequest) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * int64 notebook_id = 1; + * @return The notebookId. + */ + long getNotebookId(); + + /** + * int64 expires_in_seconds = 2; + * @return The expiresInSeconds. + */ + long getExpiresInSeconds(); +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkResponse.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkResponse.java new file mode 100644 index 0000000..0685f8f --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkResponse.java @@ -0,0 +1,474 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.CreateShareLinkResponse} + */ +public final class CreateShareLinkResponse extends + com.google.protobuf.GeneratedMessageLite< + CreateShareLinkResponse, CreateShareLinkResponse.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.CreateShareLinkResponse) + CreateShareLinkResponseOrBuilder { + private CreateShareLinkResponse() { + token_ = ""; + url_ = ""; + } + public static final int TOKEN_FIELD_NUMBER = 1; + private java.lang.String token_; + /** + * string token = 1; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + return token_; + } + /** + * string token = 1; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(token_); + } + /** + * string token = 1; + * @param value The token to set. + */ + private void setToken( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + token_ = value; + } + /** + * string token = 1; + */ + private void clearToken() { + + token_ = getDefaultInstance().getToken(); + } + /** + * string token = 1; + * @param value The bytes for token to set. + */ + private void setTokenBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + token_ = value.toStringUtf8(); + + } + + public static final int URL_FIELD_NUMBER = 2; + private java.lang.String url_; + /** + * string url = 2; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + return url_; + } + /** + * string url = 2; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(url_); + } + /** + * string url = 2; + * @param value The url to set. + */ + private void setUrl( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + url_ = value; + } + /** + * string url = 2; + */ + private void clearUrl() { + + url_ = getDefaultInstance().getUrl(); + } + /** + * string url = 2; + * @param value The bytes for url to set. + */ + private void setUrlBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + url_ = value.toStringUtf8(); + + } + + public static final int EXPIRES_AT_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp expiresAt_; + /** + * .google.protobuf.Timestamp expires_at = 3; + */ + @java.lang.Override + public boolean hasExpiresAt() { + return expiresAt_ != null; + } + /** + * .google.protobuf.Timestamp expires_at = 3; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpiresAt() { + return expiresAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expiresAt_; + } + /** + * .google.protobuf.Timestamp expires_at = 3; + */ + private void setExpiresAt(com.google.protobuf.Timestamp value) { + value.getClass(); + expiresAt_ = value; + + } + /** + * .google.protobuf.Timestamp expires_at = 3; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeExpiresAt(com.google.protobuf.Timestamp value) { + value.getClass(); + if (expiresAt_ != null && + expiresAt_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + expiresAt_ = + com.google.protobuf.Timestamp.newBuilder(expiresAt_).mergeFrom(value).buildPartial(); + } else { + expiresAt_ = value; + } + + } + /** + * .google.protobuf.Timestamp expires_at = 3; + */ + private void clearExpiresAt() { expiresAt_ = null; + + } + + public static net.metacircular.engpad.proto.v1.CreateShareLinkResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.CreateShareLinkResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.CreateShareLinkResponse prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.CreateShareLinkResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.CreateShareLinkResponse, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.CreateShareLinkResponse) + net.metacircular.engpad.proto.v1.CreateShareLinkResponseOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.CreateShareLinkResponse.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * string token = 1; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + return instance.getToken(); + } + /** + * string token = 1; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + return instance.getTokenBytes(); + } + /** + * string token = 1; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + copyOnWrite(); + instance.setToken(value); + return this; + } + /** + * string token = 1; + * @return This builder for chaining. + */ + public Builder clearToken() { + copyOnWrite(); + instance.clearToken(); + return this; + } + /** + * string token = 1; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setTokenBytes(value); + return this; + } + + /** + * string url = 2; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + return instance.getUrl(); + } + /** + * string url = 2; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + return instance.getUrlBytes(); + } + /** + * string url = 2; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + copyOnWrite(); + instance.setUrl(value); + return this; + } + /** + * string url = 2; + * @return This builder for chaining. + */ + public Builder clearUrl() { + copyOnWrite(); + instance.clearUrl(); + return this; + } + /** + * string url = 2; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setUrlBytes(value); + return this; + } + + /** + * .google.protobuf.Timestamp expires_at = 3; + */ + @java.lang.Override + public boolean hasExpiresAt() { + return instance.hasExpiresAt(); + } + /** + * .google.protobuf.Timestamp expires_at = 3; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpiresAt() { + return instance.getExpiresAt(); + } + /** + * .google.protobuf.Timestamp expires_at = 3; + */ + public Builder setExpiresAt(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.setExpiresAt(value); + return this; + } + /** + * .google.protobuf.Timestamp expires_at = 3; + */ + public Builder setExpiresAt( + com.google.protobuf.Timestamp.Builder builderForValue) { + copyOnWrite(); + instance.setExpiresAt(builderForValue.build()); + return this; + } + /** + * .google.protobuf.Timestamp expires_at = 3; + */ + public Builder mergeExpiresAt(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.mergeExpiresAt(value); + return this; + } + /** + * .google.protobuf.Timestamp expires_at = 3; + */ + public Builder clearExpiresAt() { copyOnWrite(); + instance.clearExpiresAt(); + return this; + } + + // @@protoc_insertion_point(builder_scope:engpad.v1.CreateShareLinkResponse) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.CreateShareLinkResponse(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "token_", + "url_", + "expiresAt_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u0208\u0002\u0208" + + "\u0003\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.CreateShareLinkResponse.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.CreateShareLinkResponse) + private static final net.metacircular.engpad.proto.v1.CreateShareLinkResponse DEFAULT_INSTANCE; + static { + CreateShareLinkResponse defaultInstance = new CreateShareLinkResponse(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + CreateShareLinkResponse.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.CreateShareLinkResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkResponseKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkResponseKt.kt new file mode 100644 index 0000000..df5fb41 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkResponseKt.kt @@ -0,0 +1,89 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializecreateShareLinkResponse") +public inline fun createShareLinkResponse(block: net.metacircular.engpad.proto.v1.CreateShareLinkResponseKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.CreateShareLinkResponse = + net.metacircular.engpad.proto.v1.CreateShareLinkResponseKt.Dsl._create(net.metacircular.engpad.proto.v1.CreateShareLinkResponse.newBuilder()).apply { block() }._build() +public object CreateShareLinkResponseKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.CreateShareLinkResponse.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.CreateShareLinkResponse.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.CreateShareLinkResponse = _builder.build() + + /** + * string token = 1; + */ + public var token: kotlin.String + @JvmName("getToken") + get() = _builder.getToken() + @JvmName("setToken") + set(value) { + _builder.setToken(value) + } + /** + * string token = 1; + */ + public fun clearToken() { + _builder.clearToken() + } + + /** + * string url = 2; + */ + public var url: kotlin.String + @JvmName("getUrl") + get() = _builder.getUrl() + @JvmName("setUrl") + set(value) { + _builder.setUrl(value) + } + /** + * string url = 2; + */ + public fun clearUrl() { + _builder.clearUrl() + } + + /** + * .google.protobuf.Timestamp expires_at = 3; + */ + public var expiresAt: com.google.protobuf.Timestamp + @JvmName("getExpiresAt") + get() = _builder.getExpiresAt() + @JvmName("setExpiresAt") + set(value) { + _builder.setExpiresAt(value) + } + /** + * .google.protobuf.Timestamp expires_at = 3; + */ + public fun clearExpiresAt() { + _builder.clearExpiresAt() + } + /** + * .google.protobuf.Timestamp expires_at = 3; + * @return Whether the expiresAt field is set. + */ + public fun hasExpiresAt(): kotlin.Boolean { + return _builder.hasExpiresAt() + } + } +} +public inline fun net.metacircular.engpad.proto.v1.CreateShareLinkResponse.copy(block: net.metacircular.engpad.proto.v1.CreateShareLinkResponseKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.CreateShareLinkResponse = + net.metacircular.engpad.proto.v1.CreateShareLinkResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +val net.metacircular.engpad.proto.v1.CreateShareLinkResponseOrBuilder.expiresAtOrNull: com.google.protobuf.Timestamp? + get() = if (hasExpiresAt()) getExpiresAt() else null + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkResponseOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkResponseOrBuilder.java new file mode 100644 index 0000000..78965cb --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/CreateShareLinkResponseOrBuilder.java @@ -0,0 +1,44 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface CreateShareLinkResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.CreateShareLinkResponse) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * string token = 1; + * @return The token. + */ + java.lang.String getToken(); + /** + * string token = 1; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + * string url = 2; + * @return The url. + */ + java.lang.String getUrl(); + /** + * string url = 2; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + * .google.protobuf.Timestamp expires_at = 3; + * @return Whether the expiresAt field is set. + */ + boolean hasExpiresAt(); + /** + * .google.protobuf.Timestamp expires_at = 3; + * @return The expiresAt. + */ + com.google.protobuf.Timestamp getExpiresAt(); +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookRequest.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookRequest.java new file mode 100644 index 0000000..176aeec --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookRequest.java @@ -0,0 +1,238 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.DeleteNotebookRequest} + */ +public final class DeleteNotebookRequest extends + com.google.protobuf.GeneratedMessageLite< + DeleteNotebookRequest, DeleteNotebookRequest.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.DeleteNotebookRequest) + DeleteNotebookRequestOrBuilder { + private DeleteNotebookRequest() { + } + public static final int NOTEBOOK_ID_FIELD_NUMBER = 1; + private long notebookId_; + /** + * int64 notebook_id = 1; + * @return The notebookId. + */ + @java.lang.Override + public long getNotebookId() { + return notebookId_; + } + /** + * int64 notebook_id = 1; + * @param value The notebookId to set. + */ + private void setNotebookId(long value) { + + notebookId_ = value; + } + /** + * int64 notebook_id = 1; + */ + private void clearNotebookId() { + + notebookId_ = 0L; + } + + public static net.metacircular.engpad.proto.v1.DeleteNotebookRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.DeleteNotebookRequest prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.DeleteNotebookRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.DeleteNotebookRequest, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.DeleteNotebookRequest) + net.metacircular.engpad.proto.v1.DeleteNotebookRequestOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.DeleteNotebookRequest.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * int64 notebook_id = 1; + * @return The notebookId. + */ + @java.lang.Override + public long getNotebookId() { + return instance.getNotebookId(); + } + /** + * int64 notebook_id = 1; + * @param value The notebookId to set. + * @return This builder for chaining. + */ + public Builder setNotebookId(long value) { + copyOnWrite(); + instance.setNotebookId(value); + return this; + } + /** + * int64 notebook_id = 1; + * @return This builder for chaining. + */ + public Builder clearNotebookId() { + copyOnWrite(); + instance.clearNotebookId(); + return this; + } + + // @@protoc_insertion_point(builder_scope:engpad.v1.DeleteNotebookRequest) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.DeleteNotebookRequest(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "notebookId_", + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\u0002"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.DeleteNotebookRequest.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.DeleteNotebookRequest) + private static final net.metacircular.engpad.proto.v1.DeleteNotebookRequest DEFAULT_INSTANCE; + static { + DeleteNotebookRequest defaultInstance = new DeleteNotebookRequest(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + DeleteNotebookRequest.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.DeleteNotebookRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookRequestKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookRequestKt.kt new file mode 100644 index 0000000..3950f57 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookRequestKt.kt @@ -0,0 +1,45 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializedeleteNotebookRequest") +public inline fun deleteNotebookRequest(block: net.metacircular.engpad.proto.v1.DeleteNotebookRequestKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.DeleteNotebookRequest = + net.metacircular.engpad.proto.v1.DeleteNotebookRequestKt.Dsl._create(net.metacircular.engpad.proto.v1.DeleteNotebookRequest.newBuilder()).apply { block() }._build() +public object DeleteNotebookRequestKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.DeleteNotebookRequest.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.DeleteNotebookRequest.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.DeleteNotebookRequest = _builder.build() + + /** + * int64 notebook_id = 1; + */ + public var notebookId: kotlin.Long + @JvmName("getNotebookId") + get() = _builder.getNotebookId() + @JvmName("setNotebookId") + set(value) { + _builder.setNotebookId(value) + } + /** + * int64 notebook_id = 1; + */ + public fun clearNotebookId() { + _builder.clearNotebookId() + } + } +} +public inline fun net.metacircular.engpad.proto.v1.DeleteNotebookRequest.copy(block: net.metacircular.engpad.proto.v1.DeleteNotebookRequestKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.DeleteNotebookRequest = + net.metacircular.engpad.proto.v1.DeleteNotebookRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookRequestOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookRequestOrBuilder.java new file mode 100644 index 0000000..27d632f --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookRequestOrBuilder.java @@ -0,0 +1,15 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface DeleteNotebookRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.DeleteNotebookRequest) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * int64 notebook_id = 1; + * @return The notebookId. + */ + long getNotebookId(); +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookResponse.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookResponse.java new file mode 100644 index 0000000..dc7223b --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookResponse.java @@ -0,0 +1,181 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.DeleteNotebookResponse} + */ +public final class DeleteNotebookResponse extends + com.google.protobuf.GeneratedMessageLite< + DeleteNotebookResponse, DeleteNotebookResponse.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.DeleteNotebookResponse) + DeleteNotebookResponseOrBuilder { + private DeleteNotebookResponse() { + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.DeleteNotebookResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.DeleteNotebookResponse prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.DeleteNotebookResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.DeleteNotebookResponse, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.DeleteNotebookResponse) + net.metacircular.engpad.proto.v1.DeleteNotebookResponseOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.DeleteNotebookResponse.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + // @@protoc_insertion_point(builder_scope:engpad.v1.DeleteNotebookResponse) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.DeleteNotebookResponse(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = null;java.lang.String info = + "\u0000\u0000"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.DeleteNotebookResponse.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.DeleteNotebookResponse) + private static final net.metacircular.engpad.proto.v1.DeleteNotebookResponse DEFAULT_INSTANCE; + static { + DeleteNotebookResponse defaultInstance = new DeleteNotebookResponse(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + DeleteNotebookResponse.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.DeleteNotebookResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookResponseKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookResponseKt.kt new file mode 100644 index 0000000..08260be --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookResponseKt.kt @@ -0,0 +1,28 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializedeleteNotebookResponse") +public inline fun deleteNotebookResponse(block: net.metacircular.engpad.proto.v1.DeleteNotebookResponseKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.DeleteNotebookResponse = + net.metacircular.engpad.proto.v1.DeleteNotebookResponseKt.Dsl._create(net.metacircular.engpad.proto.v1.DeleteNotebookResponse.newBuilder()).apply { block() }._build() +public object DeleteNotebookResponseKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.DeleteNotebookResponse.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.DeleteNotebookResponse.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.DeleteNotebookResponse = _builder.build() + } +} +public inline fun net.metacircular.engpad.proto.v1.DeleteNotebookResponse.copy(block: net.metacircular.engpad.proto.v1.DeleteNotebookResponseKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.DeleteNotebookResponse = + net.metacircular.engpad.proto.v1.DeleteNotebookResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookResponseOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookResponseOrBuilder.java new file mode 100644 index 0000000..a51fdfb --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/DeleteNotebookResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface DeleteNotebookResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.DeleteNotebookResponse) + com.google.protobuf.MessageLiteOrBuilder { +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/EngPadSyncServiceGrpc.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/EngPadSyncServiceGrpc.java new file mode 100644 index 0000000..362f3ad --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/EngPadSyncServiceGrpc.java @@ -0,0 +1,621 @@ +package net.metacircular.engpad.proto.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.69.0)", + comments = "Source: engpad/v1/sync.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class EngPadSyncServiceGrpc { + + private EngPadSyncServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = "engpad.v1.EngPadSyncService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getSyncNotebookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SyncNotebook", + requestType = net.metacircular.engpad.proto.v1.SyncNotebookRequest.class, + responseType = net.metacircular.engpad.proto.v1.SyncNotebookResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSyncNotebookMethod() { + io.grpc.MethodDescriptor getSyncNotebookMethod; + if ((getSyncNotebookMethod = EngPadSyncServiceGrpc.getSyncNotebookMethod) == null) { + synchronized (EngPadSyncServiceGrpc.class) { + if ((getSyncNotebookMethod = EngPadSyncServiceGrpc.getSyncNotebookMethod) == null) { + EngPadSyncServiceGrpc.getSyncNotebookMethod = getSyncNotebookMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SyncNotebook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( + net.metacircular.engpad.proto.v1.SyncNotebookRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( + net.metacircular.engpad.proto.v1.SyncNotebookResponse.getDefaultInstance())) + .build(); + } + } + } + return getSyncNotebookMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteNotebookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNotebook", + requestType = net.metacircular.engpad.proto.v1.DeleteNotebookRequest.class, + responseType = net.metacircular.engpad.proto.v1.DeleteNotebookResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteNotebookMethod() { + io.grpc.MethodDescriptor getDeleteNotebookMethod; + if ((getDeleteNotebookMethod = EngPadSyncServiceGrpc.getDeleteNotebookMethod) == null) { + synchronized (EngPadSyncServiceGrpc.class) { + if ((getDeleteNotebookMethod = EngPadSyncServiceGrpc.getDeleteNotebookMethod) == null) { + EngPadSyncServiceGrpc.getDeleteNotebookMethod = getDeleteNotebookMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNotebook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( + net.metacircular.engpad.proto.v1.DeleteNotebookRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( + net.metacircular.engpad.proto.v1.DeleteNotebookResponse.getDefaultInstance())) + .build(); + } + } + } + return getDeleteNotebookMethod; + } + + private static volatile io.grpc.MethodDescriptor getListNotebooksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNotebooks", + requestType = net.metacircular.engpad.proto.v1.ListNotebooksRequest.class, + responseType = net.metacircular.engpad.proto.v1.ListNotebooksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListNotebooksMethod() { + io.grpc.MethodDescriptor getListNotebooksMethod; + if ((getListNotebooksMethod = EngPadSyncServiceGrpc.getListNotebooksMethod) == null) { + synchronized (EngPadSyncServiceGrpc.class) { + if ((getListNotebooksMethod = EngPadSyncServiceGrpc.getListNotebooksMethod) == null) { + EngPadSyncServiceGrpc.getListNotebooksMethod = getListNotebooksMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNotebooks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( + net.metacircular.engpad.proto.v1.ListNotebooksRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( + net.metacircular.engpad.proto.v1.ListNotebooksResponse.getDefaultInstance())) + .build(); + } + } + } + return getListNotebooksMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateShareLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateShareLink", + requestType = net.metacircular.engpad.proto.v1.CreateShareLinkRequest.class, + responseType = net.metacircular.engpad.proto.v1.CreateShareLinkResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateShareLinkMethod() { + io.grpc.MethodDescriptor getCreateShareLinkMethod; + if ((getCreateShareLinkMethod = EngPadSyncServiceGrpc.getCreateShareLinkMethod) == null) { + synchronized (EngPadSyncServiceGrpc.class) { + if ((getCreateShareLinkMethod = EngPadSyncServiceGrpc.getCreateShareLinkMethod) == null) { + EngPadSyncServiceGrpc.getCreateShareLinkMethod = getCreateShareLinkMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateShareLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( + net.metacircular.engpad.proto.v1.CreateShareLinkRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( + net.metacircular.engpad.proto.v1.CreateShareLinkResponse.getDefaultInstance())) + .build(); + } + } + } + return getCreateShareLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor getRevokeShareLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RevokeShareLink", + requestType = net.metacircular.engpad.proto.v1.RevokeShareLinkRequest.class, + responseType = net.metacircular.engpad.proto.v1.RevokeShareLinkResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRevokeShareLinkMethod() { + io.grpc.MethodDescriptor getRevokeShareLinkMethod; + if ((getRevokeShareLinkMethod = EngPadSyncServiceGrpc.getRevokeShareLinkMethod) == null) { + synchronized (EngPadSyncServiceGrpc.class) { + if ((getRevokeShareLinkMethod = EngPadSyncServiceGrpc.getRevokeShareLinkMethod) == null) { + EngPadSyncServiceGrpc.getRevokeShareLinkMethod = getRevokeShareLinkMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RevokeShareLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( + net.metacircular.engpad.proto.v1.RevokeShareLinkRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( + net.metacircular.engpad.proto.v1.RevokeShareLinkResponse.getDefaultInstance())) + .build(); + } + } + } + return getRevokeShareLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor getListShareLinksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListShareLinks", + requestType = net.metacircular.engpad.proto.v1.ListShareLinksRequest.class, + responseType = net.metacircular.engpad.proto.v1.ListShareLinksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListShareLinksMethod() { + io.grpc.MethodDescriptor getListShareLinksMethod; + if ((getListShareLinksMethod = EngPadSyncServiceGrpc.getListShareLinksMethod) == null) { + synchronized (EngPadSyncServiceGrpc.class) { + if ((getListShareLinksMethod = EngPadSyncServiceGrpc.getListShareLinksMethod) == null) { + EngPadSyncServiceGrpc.getListShareLinksMethod = getListShareLinksMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListShareLinks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( + net.metacircular.engpad.proto.v1.ListShareLinksRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller( + net.metacircular.engpad.proto.v1.ListShareLinksResponse.getDefaultInstance())) + .build(); + } + } + } + return getListShareLinksMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static EngPadSyncServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EngPadSyncServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EngPadSyncServiceStub(channel, callOptions); + } + }; + return EngPadSyncServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static EngPadSyncServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EngPadSyncServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EngPadSyncServiceBlockingStub(channel, callOptions); + } + }; + return EngPadSyncServiceBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static EngPadSyncServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EngPadSyncServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EngPadSyncServiceFutureStub(channel, callOptions); + } + }; + return EngPadSyncServiceFutureStub.newStub(factory, channel); + } + + /** + */ + public interface AsyncService { + + /** + */ + default void syncNotebook(net.metacircular.engpad.proto.v1.SyncNotebookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSyncNotebookMethod(), responseObserver); + } + + /** + */ + default void deleteNotebook(net.metacircular.engpad.proto.v1.DeleteNotebookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNotebookMethod(), responseObserver); + } + + /** + */ + default void listNotebooks(net.metacircular.engpad.proto.v1.ListNotebooksRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNotebooksMethod(), responseObserver); + } + + /** + */ + default void createShareLink(net.metacircular.engpad.proto.v1.CreateShareLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateShareLinkMethod(), responseObserver); + } + + /** + */ + default void revokeShareLink(net.metacircular.engpad.proto.v1.RevokeShareLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRevokeShareLinkMethod(), responseObserver); + } + + /** + */ + default void listShareLinks(net.metacircular.engpad.proto.v1.ListShareLinksRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListShareLinksMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service EngPadSyncService. + */ + public static abstract class EngPadSyncServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return EngPadSyncServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service EngPadSyncService. + */ + public static final class EngPadSyncServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private EngPadSyncServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EngPadSyncServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EngPadSyncServiceStub(channel, callOptions); + } + + /** + */ + public void syncNotebook(net.metacircular.engpad.proto.v1.SyncNotebookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSyncNotebookMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void deleteNotebook(net.metacircular.engpad.proto.v1.DeleteNotebookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNotebookMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listNotebooks(net.metacircular.engpad.proto.v1.ListNotebooksRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNotebooksMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void createShareLink(net.metacircular.engpad.proto.v1.CreateShareLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateShareLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void revokeShareLink(net.metacircular.engpad.proto.v1.RevokeShareLinkRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRevokeShareLinkMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listShareLinks(net.metacircular.engpad.proto.v1.ListShareLinksRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListShareLinksMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service EngPadSyncService. + */ + public static final class EngPadSyncServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private EngPadSyncServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EngPadSyncServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EngPadSyncServiceBlockingStub(channel, callOptions); + } + + /** + */ + public net.metacircular.engpad.proto.v1.SyncNotebookResponse syncNotebook(net.metacircular.engpad.proto.v1.SyncNotebookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSyncNotebookMethod(), getCallOptions(), request); + } + + /** + */ + public net.metacircular.engpad.proto.v1.DeleteNotebookResponse deleteNotebook(net.metacircular.engpad.proto.v1.DeleteNotebookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNotebookMethod(), getCallOptions(), request); + } + + /** + */ + public net.metacircular.engpad.proto.v1.ListNotebooksResponse listNotebooks(net.metacircular.engpad.proto.v1.ListNotebooksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNotebooksMethod(), getCallOptions(), request); + } + + /** + */ + public net.metacircular.engpad.proto.v1.CreateShareLinkResponse createShareLink(net.metacircular.engpad.proto.v1.CreateShareLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateShareLinkMethod(), getCallOptions(), request); + } + + /** + */ + public net.metacircular.engpad.proto.v1.RevokeShareLinkResponse revokeShareLink(net.metacircular.engpad.proto.v1.RevokeShareLinkRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRevokeShareLinkMethod(), getCallOptions(), request); + } + + /** + */ + public net.metacircular.engpad.proto.v1.ListShareLinksResponse listShareLinks(net.metacircular.engpad.proto.v1.ListShareLinksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListShareLinksMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service EngPadSyncService. + */ + public static final class EngPadSyncServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private EngPadSyncServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EngPadSyncServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EngPadSyncServiceFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture syncNotebook( + net.metacircular.engpad.proto.v1.SyncNotebookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSyncNotebookMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteNotebook( + net.metacircular.engpad.proto.v1.DeleteNotebookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNotebookMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture listNotebooks( + net.metacircular.engpad.proto.v1.ListNotebooksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNotebooksMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture createShareLink( + net.metacircular.engpad.proto.v1.CreateShareLinkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateShareLinkMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture revokeShareLink( + net.metacircular.engpad.proto.v1.RevokeShareLinkRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRevokeShareLinkMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture listShareLinks( + net.metacircular.engpad.proto.v1.ListShareLinksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListShareLinksMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_SYNC_NOTEBOOK = 0; + private static final int METHODID_DELETE_NOTEBOOK = 1; + private static final int METHODID_LIST_NOTEBOOKS = 2; + private static final int METHODID_CREATE_SHARE_LINK = 3; + private static final int METHODID_REVOKE_SHARE_LINK = 4; + private static final int METHODID_LIST_SHARE_LINKS = 5; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_SYNC_NOTEBOOK: + serviceImpl.syncNotebook((net.metacircular.engpad.proto.v1.SyncNotebookRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_NOTEBOOK: + serviceImpl.deleteNotebook((net.metacircular.engpad.proto.v1.DeleteNotebookRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_NOTEBOOKS: + serviceImpl.listNotebooks((net.metacircular.engpad.proto.v1.ListNotebooksRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_SHARE_LINK: + serviceImpl.createShareLink((net.metacircular.engpad.proto.v1.CreateShareLinkRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REVOKE_SHARE_LINK: + serviceImpl.revokeShareLink((net.metacircular.engpad.proto.v1.RevokeShareLinkRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SHARE_LINKS: + serviceImpl.listShareLinks((net.metacircular.engpad.proto.v1.ListShareLinksRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getSyncNotebookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + net.metacircular.engpad.proto.v1.SyncNotebookRequest, + net.metacircular.engpad.proto.v1.SyncNotebookResponse>( + service, METHODID_SYNC_NOTEBOOK))) + .addMethod( + getDeleteNotebookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + net.metacircular.engpad.proto.v1.DeleteNotebookRequest, + net.metacircular.engpad.proto.v1.DeleteNotebookResponse>( + service, METHODID_DELETE_NOTEBOOK))) + .addMethod( + getListNotebooksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + net.metacircular.engpad.proto.v1.ListNotebooksRequest, + net.metacircular.engpad.proto.v1.ListNotebooksResponse>( + service, METHODID_LIST_NOTEBOOKS))) + .addMethod( + getCreateShareLinkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + net.metacircular.engpad.proto.v1.CreateShareLinkRequest, + net.metacircular.engpad.proto.v1.CreateShareLinkResponse>( + service, METHODID_CREATE_SHARE_LINK))) + .addMethod( + getRevokeShareLinkMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + net.metacircular.engpad.proto.v1.RevokeShareLinkRequest, + net.metacircular.engpad.proto.v1.RevokeShareLinkResponse>( + service, METHODID_REVOKE_SHARE_LINK))) + .addMethod( + getListShareLinksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + net.metacircular.engpad.proto.v1.ListShareLinksRequest, + net.metacircular.engpad.proto.v1.ListShareLinksResponse>( + service, METHODID_LIST_SHARE_LINKS))) + .build(); + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (EngPadSyncServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .addMethod(getSyncNotebookMethod()) + .addMethod(getDeleteNotebookMethod()) + .addMethod(getListNotebooksMethod()) + .addMethod(getCreateShareLinkMethod()) + .addMethod(getRevokeShareLinkMethod()) + .addMethod(getListShareLinksMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksRequest.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksRequest.java new file mode 100644 index 0000000..098ccb9 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksRequest.java @@ -0,0 +1,181 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.ListNotebooksRequest} + */ +public final class ListNotebooksRequest extends + com.google.protobuf.GeneratedMessageLite< + ListNotebooksRequest, ListNotebooksRequest.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.ListNotebooksRequest) + ListNotebooksRequestOrBuilder { + private ListNotebooksRequest() { + } + public static net.metacircular.engpad.proto.v1.ListNotebooksRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.ListNotebooksRequest prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.ListNotebooksRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.ListNotebooksRequest, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.ListNotebooksRequest) + net.metacircular.engpad.proto.v1.ListNotebooksRequestOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.ListNotebooksRequest.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + // @@protoc_insertion_point(builder_scope:engpad.v1.ListNotebooksRequest) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.ListNotebooksRequest(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = null;java.lang.String info = + "\u0000\u0000"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.ListNotebooksRequest.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.ListNotebooksRequest) + private static final net.metacircular.engpad.proto.v1.ListNotebooksRequest DEFAULT_INSTANCE; + static { + ListNotebooksRequest defaultInstance = new ListNotebooksRequest(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ListNotebooksRequest.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.ListNotebooksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksRequestKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksRequestKt.kt new file mode 100644 index 0000000..b675d2f --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksRequestKt.kt @@ -0,0 +1,28 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializelistNotebooksRequest") +public inline fun listNotebooksRequest(block: net.metacircular.engpad.proto.v1.ListNotebooksRequestKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.ListNotebooksRequest = + net.metacircular.engpad.proto.v1.ListNotebooksRequestKt.Dsl._create(net.metacircular.engpad.proto.v1.ListNotebooksRequest.newBuilder()).apply { block() }._build() +public object ListNotebooksRequestKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.ListNotebooksRequest.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.ListNotebooksRequest.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.ListNotebooksRequest = _builder.build() + } +} +public inline fun net.metacircular.engpad.proto.v1.ListNotebooksRequest.copy(block: net.metacircular.engpad.proto.v1.ListNotebooksRequestKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.ListNotebooksRequest = + net.metacircular.engpad.proto.v1.ListNotebooksRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksRequestOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksRequestOrBuilder.java new file mode 100644 index 0000000..59d59e0 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksRequestOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface ListNotebooksRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.ListNotebooksRequest) + com.google.protobuf.MessageLiteOrBuilder { +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksResponse.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksResponse.java new file mode 100644 index 0000000..a29ff4a --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksResponse.java @@ -0,0 +1,382 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.ListNotebooksResponse} + */ +public final class ListNotebooksResponse extends + com.google.protobuf.GeneratedMessageLite< + ListNotebooksResponse, ListNotebooksResponse.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.ListNotebooksResponse) + ListNotebooksResponseOrBuilder { + private ListNotebooksResponse() { + notebooks_ = emptyProtobufList(); + } + public static final int NOTEBOOKS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList notebooks_; + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + @java.lang.Override + public java.util.List getNotebooksList() { + return notebooks_; + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + public java.util.List + getNotebooksOrBuilderList() { + return notebooks_; + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + @java.lang.Override + public int getNotebooksCount() { + return notebooks_.size(); + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + @java.lang.Override + public net.metacircular.engpad.proto.v1.NotebookSummary getNotebooks(int index) { + return notebooks_.get(index); + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + public net.metacircular.engpad.proto.v1.NotebookSummaryOrBuilder getNotebooksOrBuilder( + int index) { + return notebooks_.get(index); + } + private void ensureNotebooksIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = notebooks_; + if (!tmp.isModifiable()) { + notebooks_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + private void setNotebooks( + int index, net.metacircular.engpad.proto.v1.NotebookSummary value) { + value.getClass(); + ensureNotebooksIsMutable(); + notebooks_.set(index, value); + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + private void addNotebooks(net.metacircular.engpad.proto.v1.NotebookSummary value) { + value.getClass(); + ensureNotebooksIsMutable(); + notebooks_.add(value); + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + private void addNotebooks( + int index, net.metacircular.engpad.proto.v1.NotebookSummary value) { + value.getClass(); + ensureNotebooksIsMutable(); + notebooks_.add(index, value); + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + private void addAllNotebooks( + java.lang.Iterable values) { + ensureNotebooksIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, notebooks_); + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + private void clearNotebooks() { + notebooks_ = emptyProtobufList(); + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + private void removeNotebooks(int index) { + ensureNotebooksIsMutable(); + notebooks_.remove(index); + } + + public static net.metacircular.engpad.proto.v1.ListNotebooksResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ListNotebooksResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.ListNotebooksResponse prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.ListNotebooksResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.ListNotebooksResponse, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.ListNotebooksResponse) + net.metacircular.engpad.proto.v1.ListNotebooksResponseOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.ListNotebooksResponse.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + @java.lang.Override + public java.util.List getNotebooksList() { + return java.util.Collections.unmodifiableList( + instance.getNotebooksList()); + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + @java.lang.Override + public int getNotebooksCount() { + return instance.getNotebooksCount(); + }/** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + @java.lang.Override + public net.metacircular.engpad.proto.v1.NotebookSummary getNotebooks(int index) { + return instance.getNotebooks(index); + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + public Builder setNotebooks( + int index, net.metacircular.engpad.proto.v1.NotebookSummary value) { + copyOnWrite(); + instance.setNotebooks(index, value); + return this; + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + public Builder setNotebooks( + int index, net.metacircular.engpad.proto.v1.NotebookSummary.Builder builderForValue) { + copyOnWrite(); + instance.setNotebooks(index, + builderForValue.build()); + return this; + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + public Builder addNotebooks(net.metacircular.engpad.proto.v1.NotebookSummary value) { + copyOnWrite(); + instance.addNotebooks(value); + return this; + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + public Builder addNotebooks( + int index, net.metacircular.engpad.proto.v1.NotebookSummary value) { + copyOnWrite(); + instance.addNotebooks(index, value); + return this; + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + public Builder addNotebooks( + net.metacircular.engpad.proto.v1.NotebookSummary.Builder builderForValue) { + copyOnWrite(); + instance.addNotebooks(builderForValue.build()); + return this; + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + public Builder addNotebooks( + int index, net.metacircular.engpad.proto.v1.NotebookSummary.Builder builderForValue) { + copyOnWrite(); + instance.addNotebooks(index, + builderForValue.build()); + return this; + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + public Builder addAllNotebooks( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllNotebooks(values); + return this; + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + public Builder clearNotebooks() { + copyOnWrite(); + instance.clearNotebooks(); + return this; + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + public Builder removeNotebooks(int index) { + copyOnWrite(); + instance.removeNotebooks(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:engpad.v1.ListNotebooksResponse) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.ListNotebooksResponse(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "notebooks_", + net.metacircular.engpad.proto.v1.NotebookSummary.class, + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u001b"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.ListNotebooksResponse.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.ListNotebooksResponse) + private static final net.metacircular.engpad.proto.v1.ListNotebooksResponse DEFAULT_INSTANCE; + static { + ListNotebooksResponse defaultInstance = new ListNotebooksResponse(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ListNotebooksResponse.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.ListNotebooksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksResponseKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksResponseKt.kt new file mode 100644 index 0000000..4f8f15e --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksResponseKt.kt @@ -0,0 +1,99 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializelistNotebooksResponse") +public inline fun listNotebooksResponse(block: net.metacircular.engpad.proto.v1.ListNotebooksResponseKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.ListNotebooksResponse = + net.metacircular.engpad.proto.v1.ListNotebooksResponseKt.Dsl._create(net.metacircular.engpad.proto.v1.ListNotebooksResponse.newBuilder()).apply { block() }._build() +public object ListNotebooksResponseKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.ListNotebooksResponse.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.ListNotebooksResponse.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.ListNotebooksResponse = _builder.build() + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class NotebooksProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + public val notebooks: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getNotebooksList() + ) + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + * @param value The notebooks to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addNotebooks") + public fun com.google.protobuf.kotlin.DslList.add(value: net.metacircular.engpad.proto.v1.NotebookSummary) { + _builder.addNotebooks(value) + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + * @param value The notebooks to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignNotebooks") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: net.metacircular.engpad.proto.v1.NotebookSummary) { + add(value) + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + * @param values The notebooks to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllNotebooks") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllNotebooks(values) + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + * @param values The notebooks to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllNotebooks") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + * @param index The index to set the value at. + * @param value The notebooks to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setNotebooks") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: net.metacircular.engpad.proto.v1.NotebookSummary) { + _builder.setNotebooks(index, value) + } + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearNotebooks") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearNotebooks() + } + } +} +public inline fun net.metacircular.engpad.proto.v1.ListNotebooksResponse.copy(block: net.metacircular.engpad.proto.v1.ListNotebooksResponseKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.ListNotebooksResponse = + net.metacircular.engpad.proto.v1.ListNotebooksResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksResponseOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksResponseOrBuilder.java new file mode 100644 index 0000000..cc0997a --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListNotebooksResponseOrBuilder.java @@ -0,0 +1,23 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface ListNotebooksResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.ListNotebooksResponse) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + java.util.List + getNotebooksList(); + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + net.metacircular.engpad.proto.v1.NotebookSummary getNotebooks(int index); + /** + * repeated .engpad.v1.NotebookSummary notebooks = 1; + */ + int getNotebooksCount(); +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksRequest.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksRequest.java new file mode 100644 index 0000000..68312e5 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksRequest.java @@ -0,0 +1,238 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.ListShareLinksRequest} + */ +public final class ListShareLinksRequest extends + com.google.protobuf.GeneratedMessageLite< + ListShareLinksRequest, ListShareLinksRequest.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.ListShareLinksRequest) + ListShareLinksRequestOrBuilder { + private ListShareLinksRequest() { + } + public static final int NOTEBOOK_ID_FIELD_NUMBER = 1; + private long notebookId_; + /** + * int64 notebook_id = 1; + * @return The notebookId. + */ + @java.lang.Override + public long getNotebookId() { + return notebookId_; + } + /** + * int64 notebook_id = 1; + * @param value The notebookId to set. + */ + private void setNotebookId(long value) { + + notebookId_ = value; + } + /** + * int64 notebook_id = 1; + */ + private void clearNotebookId() { + + notebookId_ = 0L; + } + + public static net.metacircular.engpad.proto.v1.ListShareLinksRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.ListShareLinksRequest prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.ListShareLinksRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.ListShareLinksRequest, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.ListShareLinksRequest) + net.metacircular.engpad.proto.v1.ListShareLinksRequestOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.ListShareLinksRequest.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * int64 notebook_id = 1; + * @return The notebookId. + */ + @java.lang.Override + public long getNotebookId() { + return instance.getNotebookId(); + } + /** + * int64 notebook_id = 1; + * @param value The notebookId to set. + * @return This builder for chaining. + */ + public Builder setNotebookId(long value) { + copyOnWrite(); + instance.setNotebookId(value); + return this; + } + /** + * int64 notebook_id = 1; + * @return This builder for chaining. + */ + public Builder clearNotebookId() { + copyOnWrite(); + instance.clearNotebookId(); + return this; + } + + // @@protoc_insertion_point(builder_scope:engpad.v1.ListShareLinksRequest) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.ListShareLinksRequest(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "notebookId_", + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\u0002"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.ListShareLinksRequest.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.ListShareLinksRequest) + private static final net.metacircular.engpad.proto.v1.ListShareLinksRequest DEFAULT_INSTANCE; + static { + ListShareLinksRequest defaultInstance = new ListShareLinksRequest(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ListShareLinksRequest.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.ListShareLinksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksRequestKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksRequestKt.kt new file mode 100644 index 0000000..5b381e8 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksRequestKt.kt @@ -0,0 +1,45 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializelistShareLinksRequest") +public inline fun listShareLinksRequest(block: net.metacircular.engpad.proto.v1.ListShareLinksRequestKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.ListShareLinksRequest = + net.metacircular.engpad.proto.v1.ListShareLinksRequestKt.Dsl._create(net.metacircular.engpad.proto.v1.ListShareLinksRequest.newBuilder()).apply { block() }._build() +public object ListShareLinksRequestKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.ListShareLinksRequest.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.ListShareLinksRequest.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.ListShareLinksRequest = _builder.build() + + /** + * int64 notebook_id = 1; + */ + public var notebookId: kotlin.Long + @JvmName("getNotebookId") + get() = _builder.getNotebookId() + @JvmName("setNotebookId") + set(value) { + _builder.setNotebookId(value) + } + /** + * int64 notebook_id = 1; + */ + public fun clearNotebookId() { + _builder.clearNotebookId() + } + } +} +public inline fun net.metacircular.engpad.proto.v1.ListShareLinksRequest.copy(block: net.metacircular.engpad.proto.v1.ListShareLinksRequestKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.ListShareLinksRequest = + net.metacircular.engpad.proto.v1.ListShareLinksRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksRequestOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksRequestOrBuilder.java new file mode 100644 index 0000000..5cc36ae --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksRequestOrBuilder.java @@ -0,0 +1,15 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface ListShareLinksRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.ListShareLinksRequest) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * int64 notebook_id = 1; + * @return The notebookId. + */ + long getNotebookId(); +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksResponse.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksResponse.java new file mode 100644 index 0000000..6ad13c6 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksResponse.java @@ -0,0 +1,382 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.ListShareLinksResponse} + */ +public final class ListShareLinksResponse extends + com.google.protobuf.GeneratedMessageLite< + ListShareLinksResponse, ListShareLinksResponse.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.ListShareLinksResponse) + ListShareLinksResponseOrBuilder { + private ListShareLinksResponse() { + links_ = emptyProtobufList(); + } + public static final int LINKS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList links_; + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + @java.lang.Override + public java.util.List getLinksList() { + return links_; + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + public java.util.List + getLinksOrBuilderList() { + return links_; + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + @java.lang.Override + public int getLinksCount() { + return links_.size(); + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + @java.lang.Override + public net.metacircular.engpad.proto.v1.ShareLinkInfo getLinks(int index) { + return links_.get(index); + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + public net.metacircular.engpad.proto.v1.ShareLinkInfoOrBuilder getLinksOrBuilder( + int index) { + return links_.get(index); + } + private void ensureLinksIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = links_; + if (!tmp.isModifiable()) { + links_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + private void setLinks( + int index, net.metacircular.engpad.proto.v1.ShareLinkInfo value) { + value.getClass(); + ensureLinksIsMutable(); + links_.set(index, value); + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + private void addLinks(net.metacircular.engpad.proto.v1.ShareLinkInfo value) { + value.getClass(); + ensureLinksIsMutable(); + links_.add(value); + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + private void addLinks( + int index, net.metacircular.engpad.proto.v1.ShareLinkInfo value) { + value.getClass(); + ensureLinksIsMutable(); + links_.add(index, value); + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + private void addAllLinks( + java.lang.Iterable values) { + ensureLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, links_); + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + private void clearLinks() { + links_ = emptyProtobufList(); + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + private void removeLinks(int index) { + ensureLinksIsMutable(); + links_.remove(index); + } + + public static net.metacircular.engpad.proto.v1.ListShareLinksResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ListShareLinksResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.ListShareLinksResponse prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.ListShareLinksResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.ListShareLinksResponse, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.ListShareLinksResponse) + net.metacircular.engpad.proto.v1.ListShareLinksResponseOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.ListShareLinksResponse.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + @java.lang.Override + public java.util.List getLinksList() { + return java.util.Collections.unmodifiableList( + instance.getLinksList()); + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + @java.lang.Override + public int getLinksCount() { + return instance.getLinksCount(); + }/** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + @java.lang.Override + public net.metacircular.engpad.proto.v1.ShareLinkInfo getLinks(int index) { + return instance.getLinks(index); + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + public Builder setLinks( + int index, net.metacircular.engpad.proto.v1.ShareLinkInfo value) { + copyOnWrite(); + instance.setLinks(index, value); + return this; + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + public Builder setLinks( + int index, net.metacircular.engpad.proto.v1.ShareLinkInfo.Builder builderForValue) { + copyOnWrite(); + instance.setLinks(index, + builderForValue.build()); + return this; + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + public Builder addLinks(net.metacircular.engpad.proto.v1.ShareLinkInfo value) { + copyOnWrite(); + instance.addLinks(value); + return this; + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + public Builder addLinks( + int index, net.metacircular.engpad.proto.v1.ShareLinkInfo value) { + copyOnWrite(); + instance.addLinks(index, value); + return this; + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + public Builder addLinks( + net.metacircular.engpad.proto.v1.ShareLinkInfo.Builder builderForValue) { + copyOnWrite(); + instance.addLinks(builderForValue.build()); + return this; + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + public Builder addLinks( + int index, net.metacircular.engpad.proto.v1.ShareLinkInfo.Builder builderForValue) { + copyOnWrite(); + instance.addLinks(index, + builderForValue.build()); + return this; + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + public Builder addAllLinks( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllLinks(values); + return this; + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + public Builder clearLinks() { + copyOnWrite(); + instance.clearLinks(); + return this; + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + public Builder removeLinks(int index) { + copyOnWrite(); + instance.removeLinks(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:engpad.v1.ListShareLinksResponse) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.ListShareLinksResponse(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "links_", + net.metacircular.engpad.proto.v1.ShareLinkInfo.class, + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u001b"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.ListShareLinksResponse.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.ListShareLinksResponse) + private static final net.metacircular.engpad.proto.v1.ListShareLinksResponse DEFAULT_INSTANCE; + static { + ListShareLinksResponse defaultInstance = new ListShareLinksResponse(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ListShareLinksResponse.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.ListShareLinksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksResponseKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksResponseKt.kt new file mode 100644 index 0000000..e3c15d3 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksResponseKt.kt @@ -0,0 +1,99 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializelistShareLinksResponse") +public inline fun listShareLinksResponse(block: net.metacircular.engpad.proto.v1.ListShareLinksResponseKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.ListShareLinksResponse = + net.metacircular.engpad.proto.v1.ListShareLinksResponseKt.Dsl._create(net.metacircular.engpad.proto.v1.ListShareLinksResponse.newBuilder()).apply { block() }._build() +public object ListShareLinksResponseKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.ListShareLinksResponse.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.ListShareLinksResponse.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.ListShareLinksResponse = _builder.build() + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class LinksProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + public val links: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getLinksList() + ) + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + * @param value The links to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addLinks") + public fun com.google.protobuf.kotlin.DslList.add(value: net.metacircular.engpad.proto.v1.ShareLinkInfo) { + _builder.addLinks(value) + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + * @param value The links to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignLinks") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: net.metacircular.engpad.proto.v1.ShareLinkInfo) { + add(value) + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + * @param values The links to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllLinks") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllLinks(values) + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + * @param values The links to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllLinks") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + * @param index The index to set the value at. + * @param value The links to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setLinks") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: net.metacircular.engpad.proto.v1.ShareLinkInfo) { + _builder.setLinks(index, value) + } + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearLinks") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearLinks() + } + } +} +public inline fun net.metacircular.engpad.proto.v1.ListShareLinksResponse.copy(block: net.metacircular.engpad.proto.v1.ListShareLinksResponseKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.ListShareLinksResponse = + net.metacircular.engpad.proto.v1.ListShareLinksResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksResponseOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksResponseOrBuilder.java new file mode 100644 index 0000000..13a8b15 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ListShareLinksResponseOrBuilder.java @@ -0,0 +1,23 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface ListShareLinksResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.ListShareLinksResponse) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + java.util.List + getLinksList(); + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + net.metacircular.engpad.proto.v1.ShareLinkInfo getLinks(int index); + /** + * repeated .engpad.v1.ShareLinkInfo links = 1; + */ + int getLinksCount(); +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/NotebookSummary.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/NotebookSummary.java new file mode 100644 index 0000000..50bafdb --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/NotebookSummary.java @@ -0,0 +1,639 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.NotebookSummary} + */ +public final class NotebookSummary extends + com.google.protobuf.GeneratedMessageLite< + NotebookSummary, NotebookSummary.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.NotebookSummary) + NotebookSummaryOrBuilder { + private NotebookSummary() { + title_ = ""; + pageSize_ = ""; + } + public static final int SERVER_ID_FIELD_NUMBER = 1; + private long serverId_; + /** + * int64 server_id = 1; + * @return The serverId. + */ + @java.lang.Override + public long getServerId() { + return serverId_; + } + /** + * int64 server_id = 1; + * @param value The serverId to set. + */ + private void setServerId(long value) { + + serverId_ = value; + } + /** + * int64 server_id = 1; + */ + private void clearServerId() { + + serverId_ = 0L; + } + + public static final int REMOTE_ID_FIELD_NUMBER = 2; + private long remoteId_; + /** + * int64 remote_id = 2; + * @return The remoteId. + */ + @java.lang.Override + public long getRemoteId() { + return remoteId_; + } + /** + * int64 remote_id = 2; + * @param value The remoteId to set. + */ + private void setRemoteId(long value) { + + remoteId_ = value; + } + /** + * int64 remote_id = 2; + */ + private void clearRemoteId() { + + remoteId_ = 0L; + } + + public static final int TITLE_FIELD_NUMBER = 3; + private java.lang.String title_; + /** + * string title = 3; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + return title_; + } + /** + * string title = 3; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(title_); + } + /** + * string title = 3; + * @param value The title to set. + */ + private void setTitle( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + title_ = value; + } + /** + * string title = 3; + */ + private void clearTitle() { + + title_ = getDefaultInstance().getTitle(); + } + /** + * string title = 3; + * @param value The bytes for title to set. + */ + private void setTitleBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + title_ = value.toStringUtf8(); + + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private java.lang.String pageSize_; + /** + * string page_size = 4; + * @return The pageSize. + */ + @java.lang.Override + public java.lang.String getPageSize() { + return pageSize_; + } + /** + * string page_size = 4; + * @return The bytes for pageSize. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageSizeBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(pageSize_); + } + /** + * string page_size = 4; + * @param value The pageSize to set. + */ + private void setPageSize( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + pageSize_ = value; + } + /** + * string page_size = 4; + */ + private void clearPageSize() { + + pageSize_ = getDefaultInstance().getPageSize(); + } + /** + * string page_size = 4; + * @param value The bytes for pageSize to set. + */ + private void setPageSizeBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + pageSize_ = value.toStringUtf8(); + + } + + public static final int PAGE_COUNT_FIELD_NUMBER = 5; + private int pageCount_; + /** + * int32 page_count = 5; + * @return The pageCount. + */ + @java.lang.Override + public int getPageCount() { + return pageCount_; + } + /** + * int32 page_count = 5; + * @param value The pageCount to set. + */ + private void setPageCount(int value) { + + pageCount_ = value; + } + /** + * int32 page_count = 5; + */ + private void clearPageCount() { + + pageCount_ = 0; + } + + public static final int SYNCED_AT_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp syncedAt_; + /** + * .google.protobuf.Timestamp synced_at = 6; + */ + @java.lang.Override + public boolean hasSyncedAt() { + return syncedAt_ != null; + } + /** + * .google.protobuf.Timestamp synced_at = 6; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSyncedAt() { + return syncedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : syncedAt_; + } + /** + * .google.protobuf.Timestamp synced_at = 6; + */ + private void setSyncedAt(com.google.protobuf.Timestamp value) { + value.getClass(); + syncedAt_ = value; + + } + /** + * .google.protobuf.Timestamp synced_at = 6; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeSyncedAt(com.google.protobuf.Timestamp value) { + value.getClass(); + if (syncedAt_ != null && + syncedAt_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + syncedAt_ = + com.google.protobuf.Timestamp.newBuilder(syncedAt_).mergeFrom(value).buildPartial(); + } else { + syncedAt_ = value; + } + + } + /** + * .google.protobuf.Timestamp synced_at = 6; + */ + private void clearSyncedAt() { syncedAt_ = null; + + } + + public static net.metacircular.engpad.proto.v1.NotebookSummary parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.NotebookSummary parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.NotebookSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.NotebookSummary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.NotebookSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.NotebookSummary parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.NotebookSummary parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.NotebookSummary parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.NotebookSummary parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.NotebookSummary parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.NotebookSummary parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.NotebookSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.NotebookSummary prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.NotebookSummary} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.NotebookSummary, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.NotebookSummary) + net.metacircular.engpad.proto.v1.NotebookSummaryOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.NotebookSummary.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * int64 server_id = 1; + * @return The serverId. + */ + @java.lang.Override + public long getServerId() { + return instance.getServerId(); + } + /** + * int64 server_id = 1; + * @param value The serverId to set. + * @return This builder for chaining. + */ + public Builder setServerId(long value) { + copyOnWrite(); + instance.setServerId(value); + return this; + } + /** + * int64 server_id = 1; + * @return This builder for chaining. + */ + public Builder clearServerId() { + copyOnWrite(); + instance.clearServerId(); + return this; + } + + /** + * int64 remote_id = 2; + * @return The remoteId. + */ + @java.lang.Override + public long getRemoteId() { + return instance.getRemoteId(); + } + /** + * int64 remote_id = 2; + * @param value The remoteId to set. + * @return This builder for chaining. + */ + public Builder setRemoteId(long value) { + copyOnWrite(); + instance.setRemoteId(value); + return this; + } + /** + * int64 remote_id = 2; + * @return This builder for chaining. + */ + public Builder clearRemoteId() { + copyOnWrite(); + instance.clearRemoteId(); + return this; + } + + /** + * string title = 3; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + return instance.getTitle(); + } + /** + * string title = 3; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + return instance.getTitleBytes(); + } + /** + * string title = 3; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + copyOnWrite(); + instance.setTitle(value); + return this; + } + /** + * string title = 3; + * @return This builder for chaining. + */ + public Builder clearTitle() { + copyOnWrite(); + instance.clearTitle(); + return this; + } + /** + * string title = 3; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setTitleBytes(value); + return this; + } + + /** + * string page_size = 4; + * @return The pageSize. + */ + @java.lang.Override + public java.lang.String getPageSize() { + return instance.getPageSize(); + } + /** + * string page_size = 4; + * @return The bytes for pageSize. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageSizeBytes() { + return instance.getPageSizeBytes(); + } + /** + * string page_size = 4; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize( + java.lang.String value) { + copyOnWrite(); + instance.setPageSize(value); + return this; + } + /** + * string page_size = 4; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + copyOnWrite(); + instance.clearPageSize(); + return this; + } + /** + * string page_size = 4; + * @param value The bytes for pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSizeBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setPageSizeBytes(value); + return this; + } + + /** + * int32 page_count = 5; + * @return The pageCount. + */ + @java.lang.Override + public int getPageCount() { + return instance.getPageCount(); + } + /** + * int32 page_count = 5; + * @param value The pageCount to set. + * @return This builder for chaining. + */ + public Builder setPageCount(int value) { + copyOnWrite(); + instance.setPageCount(value); + return this; + } + /** + * int32 page_count = 5; + * @return This builder for chaining. + */ + public Builder clearPageCount() { + copyOnWrite(); + instance.clearPageCount(); + return this; + } + + /** + * .google.protobuf.Timestamp synced_at = 6; + */ + @java.lang.Override + public boolean hasSyncedAt() { + return instance.hasSyncedAt(); + } + /** + * .google.protobuf.Timestamp synced_at = 6; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSyncedAt() { + return instance.getSyncedAt(); + } + /** + * .google.protobuf.Timestamp synced_at = 6; + */ + public Builder setSyncedAt(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.setSyncedAt(value); + return this; + } + /** + * .google.protobuf.Timestamp synced_at = 6; + */ + public Builder setSyncedAt( + com.google.protobuf.Timestamp.Builder builderForValue) { + copyOnWrite(); + instance.setSyncedAt(builderForValue.build()); + return this; + } + /** + * .google.protobuf.Timestamp synced_at = 6; + */ + public Builder mergeSyncedAt(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.mergeSyncedAt(value); + return this; + } + /** + * .google.protobuf.Timestamp synced_at = 6; + */ + public Builder clearSyncedAt() { copyOnWrite(); + instance.clearSyncedAt(); + return this; + } + + // @@protoc_insertion_point(builder_scope:engpad.v1.NotebookSummary) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.NotebookSummary(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "serverId_", + "remoteId_", + "title_", + "pageSize_", + "pageCount_", + "syncedAt_", + }; + java.lang.String info = + "\u0000\u0006\u0000\u0000\u0001\u0006\u0006\u0000\u0000\u0000\u0001\u0002\u0002\u0002" + + "\u0003\u0208\u0004\u0208\u0005\u0004\u0006\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.NotebookSummary.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.NotebookSummary) + private static final net.metacircular.engpad.proto.v1.NotebookSummary DEFAULT_INSTANCE; + static { + NotebookSummary defaultInstance = new NotebookSummary(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + NotebookSummary.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.NotebookSummary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/NotebookSummaryKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/NotebookSummaryKt.kt new file mode 100644 index 0000000..e83aa81 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/NotebookSummaryKt.kt @@ -0,0 +1,140 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializenotebookSummary") +public inline fun notebookSummary(block: net.metacircular.engpad.proto.v1.NotebookSummaryKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.NotebookSummary = + net.metacircular.engpad.proto.v1.NotebookSummaryKt.Dsl._create(net.metacircular.engpad.proto.v1.NotebookSummary.newBuilder()).apply { block() }._build() +public object NotebookSummaryKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.NotebookSummary.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.NotebookSummary.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.NotebookSummary = _builder.build() + + /** + * int64 server_id = 1; + */ + public var serverId: kotlin.Long + @JvmName("getServerId") + get() = _builder.getServerId() + @JvmName("setServerId") + set(value) { + _builder.setServerId(value) + } + /** + * int64 server_id = 1; + */ + public fun clearServerId() { + _builder.clearServerId() + } + + /** + * int64 remote_id = 2; + */ + public var remoteId: kotlin.Long + @JvmName("getRemoteId") + get() = _builder.getRemoteId() + @JvmName("setRemoteId") + set(value) { + _builder.setRemoteId(value) + } + /** + * int64 remote_id = 2; + */ + public fun clearRemoteId() { + _builder.clearRemoteId() + } + + /** + * string title = 3; + */ + public var title: kotlin.String + @JvmName("getTitle") + get() = _builder.getTitle() + @JvmName("setTitle") + set(value) { + _builder.setTitle(value) + } + /** + * string title = 3; + */ + public fun clearTitle() { + _builder.clearTitle() + } + + /** + * string page_size = 4; + */ + public var pageSize: kotlin.String + @JvmName("getPageSize") + get() = _builder.getPageSize() + @JvmName("setPageSize") + set(value) { + _builder.setPageSize(value) + } + /** + * string page_size = 4; + */ + public fun clearPageSize() { + _builder.clearPageSize() + } + + /** + * int32 page_count = 5; + */ + public var pageCount: kotlin.Int + @JvmName("getPageCount") + get() = _builder.getPageCount() + @JvmName("setPageCount") + set(value) { + _builder.setPageCount(value) + } + /** + * int32 page_count = 5; + */ + public fun clearPageCount() { + _builder.clearPageCount() + } + + /** + * .google.protobuf.Timestamp synced_at = 6; + */ + public var syncedAt: com.google.protobuf.Timestamp + @JvmName("getSyncedAt") + get() = _builder.getSyncedAt() + @JvmName("setSyncedAt") + set(value) { + _builder.setSyncedAt(value) + } + /** + * .google.protobuf.Timestamp synced_at = 6; + */ + public fun clearSyncedAt() { + _builder.clearSyncedAt() + } + /** + * .google.protobuf.Timestamp synced_at = 6; + * @return Whether the syncedAt field is set. + */ + public fun hasSyncedAt(): kotlin.Boolean { + return _builder.hasSyncedAt() + } + } +} +public inline fun net.metacircular.engpad.proto.v1.NotebookSummary.copy(block: net.metacircular.engpad.proto.v1.NotebookSummaryKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.NotebookSummary = + net.metacircular.engpad.proto.v1.NotebookSummaryKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +val net.metacircular.engpad.proto.v1.NotebookSummaryOrBuilder.syncedAtOrNull: com.google.protobuf.Timestamp? + get() = if (hasSyncedAt()) getSyncedAt() else null + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/NotebookSummaryOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/NotebookSummaryOrBuilder.java new file mode 100644 index 0000000..542f59c --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/NotebookSummaryOrBuilder.java @@ -0,0 +1,62 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface NotebookSummaryOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.NotebookSummary) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * int64 server_id = 1; + * @return The serverId. + */ + long getServerId(); + + /** + * int64 remote_id = 2; + * @return The remoteId. + */ + long getRemoteId(); + + /** + * string title = 3; + * @return The title. + */ + java.lang.String getTitle(); + /** + * string title = 3; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + * string page_size = 4; + * @return The pageSize. + */ + java.lang.String getPageSize(); + /** + * string page_size = 4; + * @return The bytes for pageSize. + */ + com.google.protobuf.ByteString + getPageSizeBytes(); + + /** + * int32 page_count = 5; + * @return The pageCount. + */ + int getPageCount(); + + /** + * .google.protobuf.Timestamp synced_at = 6; + * @return Whether the syncedAt field is set. + */ + boolean hasSyncedAt(); + /** + * .google.protobuf.Timestamp synced_at = 6; + * @return The syncedAt. + */ + com.google.protobuf.Timestamp getSyncedAt(); +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/PageData.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/PageData.java new file mode 100644 index 0000000..389bada --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/PageData.java @@ -0,0 +1,493 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.PageData} + */ +public final class PageData extends + com.google.protobuf.GeneratedMessageLite< + PageData, PageData.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.PageData) + PageDataOrBuilder { + private PageData() { + strokes_ = emptyProtobufList(); + } + public static final int PAGE_ID_FIELD_NUMBER = 1; + private long pageId_; + /** + * int64 page_id = 1; + * @return The pageId. + */ + @java.lang.Override + public long getPageId() { + return pageId_; + } + /** + * int64 page_id = 1; + * @param value The pageId to set. + */ + private void setPageId(long value) { + + pageId_ = value; + } + /** + * int64 page_id = 1; + */ + private void clearPageId() { + + pageId_ = 0L; + } + + public static final int PAGE_NUMBER_FIELD_NUMBER = 2; + private int pageNumber_; + /** + * int32 page_number = 2; + * @return The pageNumber. + */ + @java.lang.Override + public int getPageNumber() { + return pageNumber_; + } + /** + * int32 page_number = 2; + * @param value The pageNumber to set. + */ + private void setPageNumber(int value) { + + pageNumber_ = value; + } + /** + * int32 page_number = 2; + */ + private void clearPageNumber() { + + pageNumber_ = 0; + } + + public static final int STROKES_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.ProtobufList strokes_; + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + @java.lang.Override + public java.util.List getStrokesList() { + return strokes_; + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + public java.util.List + getStrokesOrBuilderList() { + return strokes_; + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + @java.lang.Override + public int getStrokesCount() { + return strokes_.size(); + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + @java.lang.Override + public net.metacircular.engpad.proto.v1.StrokeData getStrokes(int index) { + return strokes_.get(index); + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + public net.metacircular.engpad.proto.v1.StrokeDataOrBuilder getStrokesOrBuilder( + int index) { + return strokes_.get(index); + } + private void ensureStrokesIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = strokes_; + if (!tmp.isModifiable()) { + strokes_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + private void setStrokes( + int index, net.metacircular.engpad.proto.v1.StrokeData value) { + value.getClass(); + ensureStrokesIsMutable(); + strokes_.set(index, value); + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + private void addStrokes(net.metacircular.engpad.proto.v1.StrokeData value) { + value.getClass(); + ensureStrokesIsMutable(); + strokes_.add(value); + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + private void addStrokes( + int index, net.metacircular.engpad.proto.v1.StrokeData value) { + value.getClass(); + ensureStrokesIsMutable(); + strokes_.add(index, value); + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + private void addAllStrokes( + java.lang.Iterable values) { + ensureStrokesIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, strokes_); + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + private void clearStrokes() { + strokes_ = emptyProtobufList(); + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + private void removeStrokes(int index) { + ensureStrokesIsMutable(); + strokes_.remove(index); + } + + public static net.metacircular.engpad.proto.v1.PageData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.PageData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.PageData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.PageData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.PageData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.PageData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.PageData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.PageData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.PageData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.PageData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.PageData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.PageData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.PageData prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.PageData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.PageData, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.PageData) + net.metacircular.engpad.proto.v1.PageDataOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.PageData.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * int64 page_id = 1; + * @return The pageId. + */ + @java.lang.Override + public long getPageId() { + return instance.getPageId(); + } + /** + * int64 page_id = 1; + * @param value The pageId to set. + * @return This builder for chaining. + */ + public Builder setPageId(long value) { + copyOnWrite(); + instance.setPageId(value); + return this; + } + /** + * int64 page_id = 1; + * @return This builder for chaining. + */ + public Builder clearPageId() { + copyOnWrite(); + instance.clearPageId(); + return this; + } + + /** + * int32 page_number = 2; + * @return The pageNumber. + */ + @java.lang.Override + public int getPageNumber() { + return instance.getPageNumber(); + } + /** + * int32 page_number = 2; + * @param value The pageNumber to set. + * @return This builder for chaining. + */ + public Builder setPageNumber(int value) { + copyOnWrite(); + instance.setPageNumber(value); + return this; + } + /** + * int32 page_number = 2; + * @return This builder for chaining. + */ + public Builder clearPageNumber() { + copyOnWrite(); + instance.clearPageNumber(); + return this; + } + + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + @java.lang.Override + public java.util.List getStrokesList() { + return java.util.Collections.unmodifiableList( + instance.getStrokesList()); + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + @java.lang.Override + public int getStrokesCount() { + return instance.getStrokesCount(); + }/** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + @java.lang.Override + public net.metacircular.engpad.proto.v1.StrokeData getStrokes(int index) { + return instance.getStrokes(index); + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + public Builder setStrokes( + int index, net.metacircular.engpad.proto.v1.StrokeData value) { + copyOnWrite(); + instance.setStrokes(index, value); + return this; + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + public Builder setStrokes( + int index, net.metacircular.engpad.proto.v1.StrokeData.Builder builderForValue) { + copyOnWrite(); + instance.setStrokes(index, + builderForValue.build()); + return this; + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + public Builder addStrokes(net.metacircular.engpad.proto.v1.StrokeData value) { + copyOnWrite(); + instance.addStrokes(value); + return this; + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + public Builder addStrokes( + int index, net.metacircular.engpad.proto.v1.StrokeData value) { + copyOnWrite(); + instance.addStrokes(index, value); + return this; + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + public Builder addStrokes( + net.metacircular.engpad.proto.v1.StrokeData.Builder builderForValue) { + copyOnWrite(); + instance.addStrokes(builderForValue.build()); + return this; + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + public Builder addStrokes( + int index, net.metacircular.engpad.proto.v1.StrokeData.Builder builderForValue) { + copyOnWrite(); + instance.addStrokes(index, + builderForValue.build()); + return this; + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + public Builder addAllStrokes( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllStrokes(values); + return this; + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + public Builder clearStrokes() { + copyOnWrite(); + instance.clearStrokes(); + return this; + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + public Builder removeStrokes(int index) { + copyOnWrite(); + instance.removeStrokes(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:engpad.v1.PageData) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.PageData(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "pageId_", + "pageNumber_", + "strokes_", + net.metacircular.engpad.proto.v1.StrokeData.class, + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0001\u0000\u0001\u0002\u0002\u0004" + + "\u0003\u001b"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.PageData.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.PageData) + private static final net.metacircular.engpad.proto.v1.PageData DEFAULT_INSTANCE; + static { + PageData defaultInstance = new PageData(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + PageData.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.PageData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/PageDataKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/PageDataKt.kt new file mode 100644 index 0000000..09cfebe --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/PageDataKt.kt @@ -0,0 +1,133 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializepageData") +public inline fun pageData(block: net.metacircular.engpad.proto.v1.PageDataKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.PageData = + net.metacircular.engpad.proto.v1.PageDataKt.Dsl._create(net.metacircular.engpad.proto.v1.PageData.newBuilder()).apply { block() }._build() +public object PageDataKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.PageData.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.PageData.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.PageData = _builder.build() + + /** + * int64 page_id = 1; + */ + public var pageId: kotlin.Long + @JvmName("getPageId") + get() = _builder.getPageId() + @JvmName("setPageId") + set(value) { + _builder.setPageId(value) + } + /** + * int64 page_id = 1; + */ + public fun clearPageId() { + _builder.clearPageId() + } + + /** + * int32 page_number = 2; + */ + public var pageNumber: kotlin.Int + @JvmName("getPageNumber") + get() = _builder.getPageNumber() + @JvmName("setPageNumber") + set(value) { + _builder.setPageNumber(value) + } + /** + * int32 page_number = 2; + */ + public fun clearPageNumber() { + _builder.clearPageNumber() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class StrokesProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + public val strokes: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getStrokesList() + ) + /** + * repeated .engpad.v1.StrokeData strokes = 3; + * @param value The strokes to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addStrokes") + public fun com.google.protobuf.kotlin.DslList.add(value: net.metacircular.engpad.proto.v1.StrokeData) { + _builder.addStrokes(value) + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + * @param value The strokes to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignStrokes") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: net.metacircular.engpad.proto.v1.StrokeData) { + add(value) + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + * @param values The strokes to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllStrokes") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllStrokes(values) + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + * @param values The strokes to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllStrokes") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + * @param index The index to set the value at. + * @param value The strokes to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setStrokes") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: net.metacircular.engpad.proto.v1.StrokeData) { + _builder.setStrokes(index, value) + } + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearStrokes") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearStrokes() + } + } +} +public inline fun net.metacircular.engpad.proto.v1.PageData.copy(block: net.metacircular.engpad.proto.v1.PageDataKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.PageData = + net.metacircular.engpad.proto.v1.PageDataKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/PageDataOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/PageDataOrBuilder.java new file mode 100644 index 0000000..d7508f5 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/PageDataOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface PageDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.PageData) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * int64 page_id = 1; + * @return The pageId. + */ + long getPageId(); + + /** + * int32 page_number = 2; + * @return The pageNumber. + */ + int getPageNumber(); + + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + java.util.List + getStrokesList(); + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + net.metacircular.engpad.proto.v1.StrokeData getStrokes(int index); + /** + * repeated .engpad.v1.StrokeData strokes = 3; + */ + int getStrokesCount(); +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkRequest.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkRequest.java new file mode 100644 index 0000000..5d525f2 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkRequest.java @@ -0,0 +1,281 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.RevokeShareLinkRequest} + */ +public final class RevokeShareLinkRequest extends + com.google.protobuf.GeneratedMessageLite< + RevokeShareLinkRequest, RevokeShareLinkRequest.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.RevokeShareLinkRequest) + RevokeShareLinkRequestOrBuilder { + private RevokeShareLinkRequest() { + token_ = ""; + } + public static final int TOKEN_FIELD_NUMBER = 1; + private java.lang.String token_; + /** + * string token = 1; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + return token_; + } + /** + * string token = 1; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(token_); + } + /** + * string token = 1; + * @param value The token to set. + */ + private void setToken( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + token_ = value; + } + /** + * string token = 1; + */ + private void clearToken() { + + token_ = getDefaultInstance().getToken(); + } + /** + * string token = 1; + * @param value The bytes for token to set. + */ + private void setTokenBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + token_ = value.toStringUtf8(); + + } + + public static net.metacircular.engpad.proto.v1.RevokeShareLinkRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.RevokeShareLinkRequest prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.RevokeShareLinkRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.RevokeShareLinkRequest, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.RevokeShareLinkRequest) + net.metacircular.engpad.proto.v1.RevokeShareLinkRequestOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.RevokeShareLinkRequest.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * string token = 1; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + return instance.getToken(); + } + /** + * string token = 1; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + return instance.getTokenBytes(); + } + /** + * string token = 1; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + copyOnWrite(); + instance.setToken(value); + return this; + } + /** + * string token = 1; + * @return This builder for chaining. + */ + public Builder clearToken() { + copyOnWrite(); + instance.clearToken(); + return this; + } + /** + * string token = 1; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setTokenBytes(value); + return this; + } + + // @@protoc_insertion_point(builder_scope:engpad.v1.RevokeShareLinkRequest) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.RevokeShareLinkRequest(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "token_", + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\u0208"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.RevokeShareLinkRequest.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.RevokeShareLinkRequest) + private static final net.metacircular.engpad.proto.v1.RevokeShareLinkRequest DEFAULT_INSTANCE; + static { + RevokeShareLinkRequest defaultInstance = new RevokeShareLinkRequest(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + RevokeShareLinkRequest.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.RevokeShareLinkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkRequestKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkRequestKt.kt new file mode 100644 index 0000000..87b1313 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkRequestKt.kt @@ -0,0 +1,45 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializerevokeShareLinkRequest") +public inline fun revokeShareLinkRequest(block: net.metacircular.engpad.proto.v1.RevokeShareLinkRequestKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.RevokeShareLinkRequest = + net.metacircular.engpad.proto.v1.RevokeShareLinkRequestKt.Dsl._create(net.metacircular.engpad.proto.v1.RevokeShareLinkRequest.newBuilder()).apply { block() }._build() +public object RevokeShareLinkRequestKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.RevokeShareLinkRequest.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.RevokeShareLinkRequest.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.RevokeShareLinkRequest = _builder.build() + + /** + * string token = 1; + */ + public var token: kotlin.String + @JvmName("getToken") + get() = _builder.getToken() + @JvmName("setToken") + set(value) { + _builder.setToken(value) + } + /** + * string token = 1; + */ + public fun clearToken() { + _builder.clearToken() + } + } +} +public inline fun net.metacircular.engpad.proto.v1.RevokeShareLinkRequest.copy(block: net.metacircular.engpad.proto.v1.RevokeShareLinkRequestKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.RevokeShareLinkRequest = + net.metacircular.engpad.proto.v1.RevokeShareLinkRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkRequestOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkRequestOrBuilder.java new file mode 100644 index 0000000..85ebdbc --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkRequestOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface RevokeShareLinkRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.RevokeShareLinkRequest) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * string token = 1; + * @return The token. + */ + java.lang.String getToken(); + /** + * string token = 1; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkResponse.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkResponse.java new file mode 100644 index 0000000..f0447da --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkResponse.java @@ -0,0 +1,181 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.RevokeShareLinkResponse} + */ +public final class RevokeShareLinkResponse extends + com.google.protobuf.GeneratedMessageLite< + RevokeShareLinkResponse, RevokeShareLinkResponse.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.RevokeShareLinkResponse) + RevokeShareLinkResponseOrBuilder { + private RevokeShareLinkResponse() { + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.RevokeShareLinkResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.RevokeShareLinkResponse prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.RevokeShareLinkResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.RevokeShareLinkResponse, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.RevokeShareLinkResponse) + net.metacircular.engpad.proto.v1.RevokeShareLinkResponseOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.RevokeShareLinkResponse.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + // @@protoc_insertion_point(builder_scope:engpad.v1.RevokeShareLinkResponse) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.RevokeShareLinkResponse(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = null;java.lang.String info = + "\u0000\u0000"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.RevokeShareLinkResponse.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.RevokeShareLinkResponse) + private static final net.metacircular.engpad.proto.v1.RevokeShareLinkResponse DEFAULT_INSTANCE; + static { + RevokeShareLinkResponse defaultInstance = new RevokeShareLinkResponse(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + RevokeShareLinkResponse.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.RevokeShareLinkResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkResponseKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkResponseKt.kt new file mode 100644 index 0000000..abdfb7d --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkResponseKt.kt @@ -0,0 +1,28 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializerevokeShareLinkResponse") +public inline fun revokeShareLinkResponse(block: net.metacircular.engpad.proto.v1.RevokeShareLinkResponseKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.RevokeShareLinkResponse = + net.metacircular.engpad.proto.v1.RevokeShareLinkResponseKt.Dsl._create(net.metacircular.engpad.proto.v1.RevokeShareLinkResponse.newBuilder()).apply { block() }._build() +public object RevokeShareLinkResponseKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.RevokeShareLinkResponse.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.RevokeShareLinkResponse.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.RevokeShareLinkResponse = _builder.build() + } +} +public inline fun net.metacircular.engpad.proto.v1.RevokeShareLinkResponse.copy(block: net.metacircular.engpad.proto.v1.RevokeShareLinkResponseKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.RevokeShareLinkResponse = + net.metacircular.engpad.proto.v1.RevokeShareLinkResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkResponseOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkResponseOrBuilder.java new file mode 100644 index 0000000..c97faf9 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/RevokeShareLinkResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface RevokeShareLinkResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.RevokeShareLinkResponse) + com.google.protobuf.MessageLiteOrBuilder { +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ShareLinkInfo.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ShareLinkInfo.java new file mode 100644 index 0000000..23bab17 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ShareLinkInfo.java @@ -0,0 +1,568 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.ShareLinkInfo} + */ +public final class ShareLinkInfo extends + com.google.protobuf.GeneratedMessageLite< + ShareLinkInfo, ShareLinkInfo.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.ShareLinkInfo) + ShareLinkInfoOrBuilder { + private ShareLinkInfo() { + token_ = ""; + url_ = ""; + } + public static final int TOKEN_FIELD_NUMBER = 1; + private java.lang.String token_; + /** + * string token = 1; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + return token_; + } + /** + * string token = 1; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(token_); + } + /** + * string token = 1; + * @param value The token to set. + */ + private void setToken( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + token_ = value; + } + /** + * string token = 1; + */ + private void clearToken() { + + token_ = getDefaultInstance().getToken(); + } + /** + * string token = 1; + * @param value The bytes for token to set. + */ + private void setTokenBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + token_ = value.toStringUtf8(); + + } + + public static final int URL_FIELD_NUMBER = 2; + private java.lang.String url_; + /** + * string url = 2; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + return url_; + } + /** + * string url = 2; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(url_); + } + /** + * string url = 2; + * @param value The url to set. + */ + private void setUrl( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + url_ = value; + } + /** + * string url = 2; + */ + private void clearUrl() { + + url_ = getDefaultInstance().getUrl(); + } + /** + * string url = 2; + * @param value The bytes for url to set. + */ + private void setUrlBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + url_ = value.toStringUtf8(); + + } + + public static final int CREATED_AT_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createdAt_; + /** + * .google.protobuf.Timestamp created_at = 3; + */ + @java.lang.Override + public boolean hasCreatedAt() { + return createdAt_ != null; + } + /** + * .google.protobuf.Timestamp created_at = 3; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreatedAt() { + return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_; + } + /** + * .google.protobuf.Timestamp created_at = 3; + */ + private void setCreatedAt(com.google.protobuf.Timestamp value) { + value.getClass(); + createdAt_ = value; + + } + /** + * .google.protobuf.Timestamp created_at = 3; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeCreatedAt(com.google.protobuf.Timestamp value) { + value.getClass(); + if (createdAt_ != null && + createdAt_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + createdAt_ = + com.google.protobuf.Timestamp.newBuilder(createdAt_).mergeFrom(value).buildPartial(); + } else { + createdAt_ = value; + } + + } + /** + * .google.protobuf.Timestamp created_at = 3; + */ + private void clearCreatedAt() { createdAt_ = null; + + } + + public static final int EXPIRES_AT_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp expiresAt_; + /** + * .google.protobuf.Timestamp expires_at = 4; + */ + @java.lang.Override + public boolean hasExpiresAt() { + return expiresAt_ != null; + } + /** + * .google.protobuf.Timestamp expires_at = 4; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpiresAt() { + return expiresAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expiresAt_; + } + /** + * .google.protobuf.Timestamp expires_at = 4; + */ + private void setExpiresAt(com.google.protobuf.Timestamp value) { + value.getClass(); + expiresAt_ = value; + + } + /** + * .google.protobuf.Timestamp expires_at = 4; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeExpiresAt(com.google.protobuf.Timestamp value) { + value.getClass(); + if (expiresAt_ != null && + expiresAt_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + expiresAt_ = + com.google.protobuf.Timestamp.newBuilder(expiresAt_).mergeFrom(value).buildPartial(); + } else { + expiresAt_ = value; + } + + } + /** + * .google.protobuf.Timestamp expires_at = 4; + */ + private void clearExpiresAt() { expiresAt_ = null; + + } + + public static net.metacircular.engpad.proto.v1.ShareLinkInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ShareLinkInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ShareLinkInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ShareLinkInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ShareLinkInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.ShareLinkInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ShareLinkInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ShareLinkInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ShareLinkInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ShareLinkInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.ShareLinkInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.ShareLinkInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.ShareLinkInfo prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.ShareLinkInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.ShareLinkInfo, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.ShareLinkInfo) + net.metacircular.engpad.proto.v1.ShareLinkInfoOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.ShareLinkInfo.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * string token = 1; + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + return instance.getToken(); + } + /** + * string token = 1; + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + return instance.getTokenBytes(); + } + /** + * string token = 1; + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + copyOnWrite(); + instance.setToken(value); + return this; + } + /** + * string token = 1; + * @return This builder for chaining. + */ + public Builder clearToken() { + copyOnWrite(); + instance.clearToken(); + return this; + } + /** + * string token = 1; + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setTokenBytes(value); + return this; + } + + /** + * string url = 2; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + return instance.getUrl(); + } + /** + * string url = 2; + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + return instance.getUrlBytes(); + } + /** + * string url = 2; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + copyOnWrite(); + instance.setUrl(value); + return this; + } + /** + * string url = 2; + * @return This builder for chaining. + */ + public Builder clearUrl() { + copyOnWrite(); + instance.clearUrl(); + return this; + } + /** + * string url = 2; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setUrlBytes(value); + return this; + } + + /** + * .google.protobuf.Timestamp created_at = 3; + */ + @java.lang.Override + public boolean hasCreatedAt() { + return instance.hasCreatedAt(); + } + /** + * .google.protobuf.Timestamp created_at = 3; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreatedAt() { + return instance.getCreatedAt(); + } + /** + * .google.protobuf.Timestamp created_at = 3; + */ + public Builder setCreatedAt(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.setCreatedAt(value); + return this; + } + /** + * .google.protobuf.Timestamp created_at = 3; + */ + public Builder setCreatedAt( + com.google.protobuf.Timestamp.Builder builderForValue) { + copyOnWrite(); + instance.setCreatedAt(builderForValue.build()); + return this; + } + /** + * .google.protobuf.Timestamp created_at = 3; + */ + public Builder mergeCreatedAt(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.mergeCreatedAt(value); + return this; + } + /** + * .google.protobuf.Timestamp created_at = 3; + */ + public Builder clearCreatedAt() { copyOnWrite(); + instance.clearCreatedAt(); + return this; + } + + /** + * .google.protobuf.Timestamp expires_at = 4; + */ + @java.lang.Override + public boolean hasExpiresAt() { + return instance.hasExpiresAt(); + } + /** + * .google.protobuf.Timestamp expires_at = 4; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpiresAt() { + return instance.getExpiresAt(); + } + /** + * .google.protobuf.Timestamp expires_at = 4; + */ + public Builder setExpiresAt(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.setExpiresAt(value); + return this; + } + /** + * .google.protobuf.Timestamp expires_at = 4; + */ + public Builder setExpiresAt( + com.google.protobuf.Timestamp.Builder builderForValue) { + copyOnWrite(); + instance.setExpiresAt(builderForValue.build()); + return this; + } + /** + * .google.protobuf.Timestamp expires_at = 4; + */ + public Builder mergeExpiresAt(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.mergeExpiresAt(value); + return this; + } + /** + * .google.protobuf.Timestamp expires_at = 4; + */ + public Builder clearExpiresAt() { copyOnWrite(); + instance.clearExpiresAt(); + return this; + } + + // @@protoc_insertion_point(builder_scope:engpad.v1.ShareLinkInfo) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.ShareLinkInfo(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "token_", + "url_", + "createdAt_", + "expiresAt_", + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\u0208\u0002\u0208" + + "\u0003\t\u0004\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.ShareLinkInfo.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.ShareLinkInfo) + private static final net.metacircular.engpad.proto.v1.ShareLinkInfo DEFAULT_INSTANCE; + static { + ShareLinkInfo defaultInstance = new ShareLinkInfo(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ShareLinkInfo.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.ShareLinkInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ShareLinkInfoKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ShareLinkInfoKt.kt new file mode 100644 index 0000000..c374717 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ShareLinkInfoKt.kt @@ -0,0 +1,116 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializeshareLinkInfo") +public inline fun shareLinkInfo(block: net.metacircular.engpad.proto.v1.ShareLinkInfoKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.ShareLinkInfo = + net.metacircular.engpad.proto.v1.ShareLinkInfoKt.Dsl._create(net.metacircular.engpad.proto.v1.ShareLinkInfo.newBuilder()).apply { block() }._build() +public object ShareLinkInfoKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.ShareLinkInfo.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.ShareLinkInfo.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.ShareLinkInfo = _builder.build() + + /** + * string token = 1; + */ + public var token: kotlin.String + @JvmName("getToken") + get() = _builder.getToken() + @JvmName("setToken") + set(value) { + _builder.setToken(value) + } + /** + * string token = 1; + */ + public fun clearToken() { + _builder.clearToken() + } + + /** + * string url = 2; + */ + public var url: kotlin.String + @JvmName("getUrl") + get() = _builder.getUrl() + @JvmName("setUrl") + set(value) { + _builder.setUrl(value) + } + /** + * string url = 2; + */ + public fun clearUrl() { + _builder.clearUrl() + } + + /** + * .google.protobuf.Timestamp created_at = 3; + */ + public var createdAt: com.google.protobuf.Timestamp + @JvmName("getCreatedAt") + get() = _builder.getCreatedAt() + @JvmName("setCreatedAt") + set(value) { + _builder.setCreatedAt(value) + } + /** + * .google.protobuf.Timestamp created_at = 3; + */ + public fun clearCreatedAt() { + _builder.clearCreatedAt() + } + /** + * .google.protobuf.Timestamp created_at = 3; + * @return Whether the createdAt field is set. + */ + public fun hasCreatedAt(): kotlin.Boolean { + return _builder.hasCreatedAt() + } + + /** + * .google.protobuf.Timestamp expires_at = 4; + */ + public var expiresAt: com.google.protobuf.Timestamp + @JvmName("getExpiresAt") + get() = _builder.getExpiresAt() + @JvmName("setExpiresAt") + set(value) { + _builder.setExpiresAt(value) + } + /** + * .google.protobuf.Timestamp expires_at = 4; + */ + public fun clearExpiresAt() { + _builder.clearExpiresAt() + } + /** + * .google.protobuf.Timestamp expires_at = 4; + * @return Whether the expiresAt field is set. + */ + public fun hasExpiresAt(): kotlin.Boolean { + return _builder.hasExpiresAt() + } + } +} +public inline fun net.metacircular.engpad.proto.v1.ShareLinkInfo.copy(block: net.metacircular.engpad.proto.v1.ShareLinkInfoKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.ShareLinkInfo = + net.metacircular.engpad.proto.v1.ShareLinkInfoKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +val net.metacircular.engpad.proto.v1.ShareLinkInfoOrBuilder.createdAtOrNull: com.google.protobuf.Timestamp? + get() = if (hasCreatedAt()) getCreatedAt() else null + +val net.metacircular.engpad.proto.v1.ShareLinkInfoOrBuilder.expiresAtOrNull: com.google.protobuf.Timestamp? + get() = if (hasExpiresAt()) getExpiresAt() else null + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ShareLinkInfoOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ShareLinkInfoOrBuilder.java new file mode 100644 index 0000000..f09870e --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/ShareLinkInfoOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface ShareLinkInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.ShareLinkInfo) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * string token = 1; + * @return The token. + */ + java.lang.String getToken(); + /** + * string token = 1; + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + * string url = 2; + * @return The url. + */ + java.lang.String getUrl(); + /** + * string url = 2; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + * .google.protobuf.Timestamp created_at = 3; + * @return Whether the createdAt field is set. + */ + boolean hasCreatedAt(); + /** + * .google.protobuf.Timestamp created_at = 3; + * @return The createdAt. + */ + com.google.protobuf.Timestamp getCreatedAt(); + + /** + * .google.protobuf.Timestamp expires_at = 4; + * @return Whether the expiresAt field is set. + */ + boolean hasExpiresAt(); + /** + * .google.protobuf.Timestamp expires_at = 4; + * @return The expiresAt. + */ + com.google.protobuf.Timestamp getExpiresAt(); +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/StrokeData.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/StrokeData.java new file mode 100644 index 0000000..57136f9 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/StrokeData.java @@ -0,0 +1,504 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.StrokeData} + */ +public final class StrokeData extends + com.google.protobuf.GeneratedMessageLite< + StrokeData, StrokeData.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.StrokeData) + StrokeDataOrBuilder { + private StrokeData() { + style_ = ""; + pointData_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int PEN_SIZE_FIELD_NUMBER = 1; + private float penSize_; + /** + * float pen_size = 1; + * @return The penSize. + */ + @java.lang.Override + public float getPenSize() { + return penSize_; + } + /** + * float pen_size = 1; + * @param value The penSize to set. + */ + private void setPenSize(float value) { + + penSize_ = value; + } + /** + * float pen_size = 1; + */ + private void clearPenSize() { + + penSize_ = 0F; + } + + public static final int COLOR_FIELD_NUMBER = 2; + private int color_; + /** + * int32 color = 2; + * @return The color. + */ + @java.lang.Override + public int getColor() { + return color_; + } + /** + * int32 color = 2; + * @param value The color to set. + */ + private void setColor(int value) { + + color_ = value; + } + /** + * int32 color = 2; + */ + private void clearColor() { + + color_ = 0; + } + + public static final int STYLE_FIELD_NUMBER = 3; + private java.lang.String style_; + /** + * string style = 3; + * @return The style. + */ + @java.lang.Override + public java.lang.String getStyle() { + return style_; + } + /** + * string style = 3; + * @return The bytes for style. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStyleBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(style_); + } + /** + * string style = 3; + * @param value The style to set. + */ + private void setStyle( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + style_ = value; + } + /** + * string style = 3; + */ + private void clearStyle() { + + style_ = getDefaultInstance().getStyle(); + } + /** + * string style = 3; + * @param value The bytes for style to set. + */ + private void setStyleBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + style_ = value.toStringUtf8(); + + } + + public static final int POINT_DATA_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString pointData_; + /** + * bytes point_data = 4; + * @return The pointData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPointData() { + return pointData_; + } + /** + * bytes point_data = 4; + * @param value The pointData to set. + */ + private void setPointData(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + pointData_ = value; + } + /** + * bytes point_data = 4; + */ + private void clearPointData() { + + pointData_ = getDefaultInstance().getPointData(); + } + + public static final int STROKE_ORDER_FIELD_NUMBER = 5; + private int strokeOrder_; + /** + * int32 stroke_order = 5; + * @return The strokeOrder. + */ + @java.lang.Override + public int getStrokeOrder() { + return strokeOrder_; + } + /** + * int32 stroke_order = 5; + * @param value The strokeOrder to set. + */ + private void setStrokeOrder(int value) { + + strokeOrder_ = value; + } + /** + * int32 stroke_order = 5; + */ + private void clearStrokeOrder() { + + strokeOrder_ = 0; + } + + public static net.metacircular.engpad.proto.v1.StrokeData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.StrokeData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.StrokeData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.StrokeData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.StrokeData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.StrokeData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.StrokeData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.StrokeData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.StrokeData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.StrokeData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.StrokeData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.StrokeData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.StrokeData prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.StrokeData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.StrokeData, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.StrokeData) + net.metacircular.engpad.proto.v1.StrokeDataOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.StrokeData.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * float pen_size = 1; + * @return The penSize. + */ + @java.lang.Override + public float getPenSize() { + return instance.getPenSize(); + } + /** + * float pen_size = 1; + * @param value The penSize to set. + * @return This builder for chaining. + */ + public Builder setPenSize(float value) { + copyOnWrite(); + instance.setPenSize(value); + return this; + } + /** + * float pen_size = 1; + * @return This builder for chaining. + */ + public Builder clearPenSize() { + copyOnWrite(); + instance.clearPenSize(); + return this; + } + + /** + * int32 color = 2; + * @return The color. + */ + @java.lang.Override + public int getColor() { + return instance.getColor(); + } + /** + * int32 color = 2; + * @param value The color to set. + * @return This builder for chaining. + */ + public Builder setColor(int value) { + copyOnWrite(); + instance.setColor(value); + return this; + } + /** + * int32 color = 2; + * @return This builder for chaining. + */ + public Builder clearColor() { + copyOnWrite(); + instance.clearColor(); + return this; + } + + /** + * string style = 3; + * @return The style. + */ + @java.lang.Override + public java.lang.String getStyle() { + return instance.getStyle(); + } + /** + * string style = 3; + * @return The bytes for style. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStyleBytes() { + return instance.getStyleBytes(); + } + /** + * string style = 3; + * @param value The style to set. + * @return This builder for chaining. + */ + public Builder setStyle( + java.lang.String value) { + copyOnWrite(); + instance.setStyle(value); + return this; + } + /** + * string style = 3; + * @return This builder for chaining. + */ + public Builder clearStyle() { + copyOnWrite(); + instance.clearStyle(); + return this; + } + /** + * string style = 3; + * @param value The bytes for style to set. + * @return This builder for chaining. + */ + public Builder setStyleBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setStyleBytes(value); + return this; + } + + /** + * bytes point_data = 4; + * @return The pointData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPointData() { + return instance.getPointData(); + } + /** + * bytes point_data = 4; + * @param value The pointData to set. + * @return This builder for chaining. + */ + public Builder setPointData(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setPointData(value); + return this; + } + /** + * bytes point_data = 4; + * @return This builder for chaining. + */ + public Builder clearPointData() { + copyOnWrite(); + instance.clearPointData(); + return this; + } + + /** + * int32 stroke_order = 5; + * @return The strokeOrder. + */ + @java.lang.Override + public int getStrokeOrder() { + return instance.getStrokeOrder(); + } + /** + * int32 stroke_order = 5; + * @param value The strokeOrder to set. + * @return This builder for chaining. + */ + public Builder setStrokeOrder(int value) { + copyOnWrite(); + instance.setStrokeOrder(value); + return this; + } + /** + * int32 stroke_order = 5; + * @return This builder for chaining. + */ + public Builder clearStrokeOrder() { + copyOnWrite(); + instance.clearStrokeOrder(); + return this; + } + + // @@protoc_insertion_point(builder_scope:engpad.v1.StrokeData) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.StrokeData(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "penSize_", + "color_", + "style_", + "pointData_", + "strokeOrder_", + }; + java.lang.String info = + "\u0000\u0005\u0000\u0000\u0001\u0005\u0005\u0000\u0000\u0000\u0001\u0001\u0002\u0004" + + "\u0003\u0208\u0004\n\u0005\u0004"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.StrokeData.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.StrokeData) + private static final net.metacircular.engpad.proto.v1.StrokeData DEFAULT_INSTANCE; + static { + StrokeData defaultInstance = new StrokeData(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + StrokeData.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.StrokeData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/StrokeDataKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/StrokeDataKt.kt new file mode 100644 index 0000000..62fb270 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/StrokeDataKt.kt @@ -0,0 +1,113 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializestrokeData") +public inline fun strokeData(block: net.metacircular.engpad.proto.v1.StrokeDataKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.StrokeData = + net.metacircular.engpad.proto.v1.StrokeDataKt.Dsl._create(net.metacircular.engpad.proto.v1.StrokeData.newBuilder()).apply { block() }._build() +public object StrokeDataKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.StrokeData.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.StrokeData.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.StrokeData = _builder.build() + + /** + * float pen_size = 1; + */ + public var penSize: kotlin.Float + @JvmName("getPenSize") + get() = _builder.getPenSize() + @JvmName("setPenSize") + set(value) { + _builder.setPenSize(value) + } + /** + * float pen_size = 1; + */ + public fun clearPenSize() { + _builder.clearPenSize() + } + + /** + * int32 color = 2; + */ + public var color: kotlin.Int + @JvmName("getColor") + get() = _builder.getColor() + @JvmName("setColor") + set(value) { + _builder.setColor(value) + } + /** + * int32 color = 2; + */ + public fun clearColor() { + _builder.clearColor() + } + + /** + * string style = 3; + */ + public var style: kotlin.String + @JvmName("getStyle") + get() = _builder.getStyle() + @JvmName("setStyle") + set(value) { + _builder.setStyle(value) + } + /** + * string style = 3; + */ + public fun clearStyle() { + _builder.clearStyle() + } + + /** + * bytes point_data = 4; + */ + public var pointData: com.google.protobuf.ByteString + @JvmName("getPointData") + get() = _builder.getPointData() + @JvmName("setPointData") + set(value) { + _builder.setPointData(value) + } + /** + * bytes point_data = 4; + */ + public fun clearPointData() { + _builder.clearPointData() + } + + /** + * int32 stroke_order = 5; + */ + public var strokeOrder: kotlin.Int + @JvmName("getStrokeOrder") + get() = _builder.getStrokeOrder() + @JvmName("setStrokeOrder") + set(value) { + _builder.setStrokeOrder(value) + } + /** + * int32 stroke_order = 5; + */ + public fun clearStrokeOrder() { + _builder.clearStrokeOrder() + } + } +} +public inline fun net.metacircular.engpad.proto.v1.StrokeData.copy(block: net.metacircular.engpad.proto.v1.StrokeDataKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.StrokeData = + net.metacircular.engpad.proto.v1.StrokeDataKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/StrokeDataOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/StrokeDataOrBuilder.java new file mode 100644 index 0000000..db10857 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/StrokeDataOrBuilder.java @@ -0,0 +1,45 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface StrokeDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.StrokeData) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * float pen_size = 1; + * @return The penSize. + */ + float getPenSize(); + + /** + * int32 color = 2; + * @return The color. + */ + int getColor(); + + /** + * string style = 3; + * @return The style. + */ + java.lang.String getStyle(); + /** + * string style = 3; + * @return The bytes for style. + */ + com.google.protobuf.ByteString + getStyleBytes(); + + /** + * bytes point_data = 4; + * @return The pointData. + */ + com.google.protobuf.ByteString getPointData(); + + /** + * int32 stroke_order = 5; + * @return The strokeOrder. + */ + int getStrokeOrder(); +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/Sync.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/Sync.java new file mode 100644 index 0000000..b034b46 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/Sync.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public final class Sync { + private Sync() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncGrpcKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncGrpcKt.kt new file mode 100644 index 0000000..6610ffc --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncGrpcKt.kt @@ -0,0 +1,332 @@ +package net.metacircular.engpad.proto.v1 + +import io.grpc.CallOptions +import io.grpc.CallOptions.DEFAULT +import io.grpc.Channel +import io.grpc.Metadata +import io.grpc.MethodDescriptor +import io.grpc.ServerServiceDefinition +import io.grpc.ServerServiceDefinition.builder +import io.grpc.ServiceDescriptor +import io.grpc.Status.UNIMPLEMENTED +import io.grpc.StatusException +import io.grpc.kotlin.AbstractCoroutineServerImpl +import io.grpc.kotlin.AbstractCoroutineStub +import io.grpc.kotlin.ClientCalls.unaryRpc +import io.grpc.kotlin.ServerCalls.unaryServerMethodDefinition +import io.grpc.kotlin.StubFor +import kotlin.String +import kotlin.coroutines.CoroutineContext +import kotlin.coroutines.EmptyCoroutineContext +import kotlin.jvm.JvmOverloads +import kotlin.jvm.JvmStatic +import net.metacircular.engpad.proto.v1.EngPadSyncServiceGrpc.getServiceDescriptor + +/** + * Holder for Kotlin coroutine-based client and server APIs for engpad.v1.EngPadSyncService. + */ +public object EngPadSyncServiceGrpcKt { + public const val SERVICE_NAME: String = EngPadSyncServiceGrpc.SERVICE_NAME + + @JvmStatic + public val serviceDescriptor: ServiceDescriptor + get() = getServiceDescriptor() + + public val syncNotebookMethod: MethodDescriptor + @JvmStatic + get() = EngPadSyncServiceGrpc.getSyncNotebookMethod() + + public val deleteNotebookMethod: MethodDescriptor + @JvmStatic + get() = EngPadSyncServiceGrpc.getDeleteNotebookMethod() + + public val listNotebooksMethod: MethodDescriptor + @JvmStatic + get() = EngPadSyncServiceGrpc.getListNotebooksMethod() + + public val createShareLinkMethod: + MethodDescriptor + @JvmStatic + get() = EngPadSyncServiceGrpc.getCreateShareLinkMethod() + + public val revokeShareLinkMethod: + MethodDescriptor + @JvmStatic + get() = EngPadSyncServiceGrpc.getRevokeShareLinkMethod() + + public val listShareLinksMethod: MethodDescriptor + @JvmStatic + get() = EngPadSyncServiceGrpc.getListShareLinksMethod() + + /** + * A stub for issuing RPCs to a(n) engpad.v1.EngPadSyncService service as suspending coroutines. + */ + @StubFor(EngPadSyncServiceGrpc::class) + public class EngPadSyncServiceCoroutineStub @JvmOverloads constructor( + channel: Channel, + callOptions: CallOptions = DEFAULT, + ) : AbstractCoroutineStub(channel, callOptions) { + override fun build(channel: Channel, callOptions: CallOptions): EngPadSyncServiceCoroutineStub = + EngPadSyncServiceCoroutineStub(channel, callOptions) + + /** + * Executes this RPC and returns the response message, suspending until the RPC completes + * with [`Status.OK`][io.grpc.Status]. If the RPC completes with another status, a + * corresponding + * [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled + * with the corresponding exception as a cause. + * + * @param request The request message to send to the server. + * + * @param headers Metadata to attach to the request. Most users will not need this. + * + * @return The single response from the server. + */ + public suspend fun syncNotebook(request: SyncNotebookRequest, headers: Metadata = Metadata()): + SyncNotebookResponse = unaryRpc( + channel, + EngPadSyncServiceGrpc.getSyncNotebookMethod(), + request, + callOptions, + headers + ) + + /** + * Executes this RPC and returns the response message, suspending until the RPC completes + * with [`Status.OK`][io.grpc.Status]. If the RPC completes with another status, a + * corresponding + * [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled + * with the corresponding exception as a cause. + * + * @param request The request message to send to the server. + * + * @param headers Metadata to attach to the request. Most users will not need this. + * + * @return The single response from the server. + */ + public suspend fun deleteNotebook(request: DeleteNotebookRequest, headers: Metadata = + Metadata()): DeleteNotebookResponse = unaryRpc( + channel, + EngPadSyncServiceGrpc.getDeleteNotebookMethod(), + request, + callOptions, + headers + ) + + /** + * Executes this RPC and returns the response message, suspending until the RPC completes + * with [`Status.OK`][io.grpc.Status]. If the RPC completes with another status, a + * corresponding + * [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled + * with the corresponding exception as a cause. + * + * @param request The request message to send to the server. + * + * @param headers Metadata to attach to the request. Most users will not need this. + * + * @return The single response from the server. + */ + public suspend fun listNotebooks(request: ListNotebooksRequest, headers: Metadata = Metadata()): + ListNotebooksResponse = unaryRpc( + channel, + EngPadSyncServiceGrpc.getListNotebooksMethod(), + request, + callOptions, + headers + ) + + /** + * Executes this RPC and returns the response message, suspending until the RPC completes + * with [`Status.OK`][io.grpc.Status]. If the RPC completes with another status, a + * corresponding + * [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled + * with the corresponding exception as a cause. + * + * @param request The request message to send to the server. + * + * @param headers Metadata to attach to the request. Most users will not need this. + * + * @return The single response from the server. + */ + public suspend fun createShareLink(request: CreateShareLinkRequest, headers: Metadata = + Metadata()): CreateShareLinkResponse = unaryRpc( + channel, + EngPadSyncServiceGrpc.getCreateShareLinkMethod(), + request, + callOptions, + headers + ) + + /** + * Executes this RPC and returns the response message, suspending until the RPC completes + * with [`Status.OK`][io.grpc.Status]. If the RPC completes with another status, a + * corresponding + * [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled + * with the corresponding exception as a cause. + * + * @param request The request message to send to the server. + * + * @param headers Metadata to attach to the request. Most users will not need this. + * + * @return The single response from the server. + */ + public suspend fun revokeShareLink(request: RevokeShareLinkRequest, headers: Metadata = + Metadata()): RevokeShareLinkResponse = unaryRpc( + channel, + EngPadSyncServiceGrpc.getRevokeShareLinkMethod(), + request, + callOptions, + headers + ) + + /** + * Executes this RPC and returns the response message, suspending until the RPC completes + * with [`Status.OK`][io.grpc.Status]. If the RPC completes with another status, a + * corresponding + * [StatusException] is thrown. If this coroutine is cancelled, the RPC is also cancelled + * with the corresponding exception as a cause. + * + * @param request The request message to send to the server. + * + * @param headers Metadata to attach to the request. Most users will not need this. + * + * @return The single response from the server. + */ + public suspend fun listShareLinks(request: ListShareLinksRequest, headers: Metadata = + Metadata()): ListShareLinksResponse = unaryRpc( + channel, + EngPadSyncServiceGrpc.getListShareLinksMethod(), + request, + callOptions, + headers + ) + } + + /** + * Skeletal implementation of the engpad.v1.EngPadSyncService service based on Kotlin coroutines. + */ + public abstract class EngPadSyncServiceCoroutineImplBase( + coroutineContext: CoroutineContext = EmptyCoroutineContext, + ) : AbstractCoroutineServerImpl(coroutineContext) { + /** + * Returns the response to an RPC for engpad.v1.EngPadSyncService.SyncNotebook. + * + * If this method fails with a [StatusException], the RPC will fail with the corresponding + * [io.grpc.Status]. If this method fails with a [java.util.concurrent.CancellationException], + * the RPC will fail + * with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will + * fail with `Status.UNKNOWN` with the exception as a cause. + * + * @param request The request from the client. + */ + public open suspend fun syncNotebook(request: SyncNotebookRequest): SyncNotebookResponse = throw + StatusException(UNIMPLEMENTED.withDescription("Method engpad.v1.EngPadSyncService.SyncNotebook is unimplemented")) + + /** + * Returns the response to an RPC for engpad.v1.EngPadSyncService.DeleteNotebook. + * + * If this method fails with a [StatusException], the RPC will fail with the corresponding + * [io.grpc.Status]. If this method fails with a [java.util.concurrent.CancellationException], + * the RPC will fail + * with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will + * fail with `Status.UNKNOWN` with the exception as a cause. + * + * @param request The request from the client. + */ + public open suspend fun deleteNotebook(request: DeleteNotebookRequest): DeleteNotebookResponse = + throw + StatusException(UNIMPLEMENTED.withDescription("Method engpad.v1.EngPadSyncService.DeleteNotebook is unimplemented")) + + /** + * Returns the response to an RPC for engpad.v1.EngPadSyncService.ListNotebooks. + * + * If this method fails with a [StatusException], the RPC will fail with the corresponding + * [io.grpc.Status]. If this method fails with a [java.util.concurrent.CancellationException], + * the RPC will fail + * with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will + * fail with `Status.UNKNOWN` with the exception as a cause. + * + * @param request The request from the client. + */ + public open suspend fun listNotebooks(request: ListNotebooksRequest): ListNotebooksResponse = + throw + StatusException(UNIMPLEMENTED.withDescription("Method engpad.v1.EngPadSyncService.ListNotebooks is unimplemented")) + + /** + * Returns the response to an RPC for engpad.v1.EngPadSyncService.CreateShareLink. + * + * If this method fails with a [StatusException], the RPC will fail with the corresponding + * [io.grpc.Status]. If this method fails with a [java.util.concurrent.CancellationException], + * the RPC will fail + * with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will + * fail with `Status.UNKNOWN` with the exception as a cause. + * + * @param request The request from the client. + */ + public open suspend fun createShareLink(request: CreateShareLinkRequest): + CreateShareLinkResponse = throw + StatusException(UNIMPLEMENTED.withDescription("Method engpad.v1.EngPadSyncService.CreateShareLink is unimplemented")) + + /** + * Returns the response to an RPC for engpad.v1.EngPadSyncService.RevokeShareLink. + * + * If this method fails with a [StatusException], the RPC will fail with the corresponding + * [io.grpc.Status]. If this method fails with a [java.util.concurrent.CancellationException], + * the RPC will fail + * with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will + * fail with `Status.UNKNOWN` with the exception as a cause. + * + * @param request The request from the client. + */ + public open suspend fun revokeShareLink(request: RevokeShareLinkRequest): + RevokeShareLinkResponse = throw + StatusException(UNIMPLEMENTED.withDescription("Method engpad.v1.EngPadSyncService.RevokeShareLink is unimplemented")) + + /** + * Returns the response to an RPC for engpad.v1.EngPadSyncService.ListShareLinks. + * + * If this method fails with a [StatusException], the RPC will fail with the corresponding + * [io.grpc.Status]. If this method fails with a [java.util.concurrent.CancellationException], + * the RPC will fail + * with status `Status.CANCELLED`. If this method fails for any other reason, the RPC will + * fail with `Status.UNKNOWN` with the exception as a cause. + * + * @param request The request from the client. + */ + public open suspend fun listShareLinks(request: ListShareLinksRequest): ListShareLinksResponse = + throw + StatusException(UNIMPLEMENTED.withDescription("Method engpad.v1.EngPadSyncService.ListShareLinks is unimplemented")) + + final override fun bindService(): ServerServiceDefinition = builder(getServiceDescriptor()) + .addMethod(unaryServerMethodDefinition( + context = this.context, + descriptor = EngPadSyncServiceGrpc.getSyncNotebookMethod(), + implementation = ::syncNotebook + )) + .addMethod(unaryServerMethodDefinition( + context = this.context, + descriptor = EngPadSyncServiceGrpc.getDeleteNotebookMethod(), + implementation = ::deleteNotebook + )) + .addMethod(unaryServerMethodDefinition( + context = this.context, + descriptor = EngPadSyncServiceGrpc.getListNotebooksMethod(), + implementation = ::listNotebooks + )) + .addMethod(unaryServerMethodDefinition( + context = this.context, + descriptor = EngPadSyncServiceGrpc.getCreateShareLinkMethod(), + implementation = ::createShareLink + )) + .addMethod(unaryServerMethodDefinition( + context = this.context, + descriptor = EngPadSyncServiceGrpc.getRevokeShareLinkMethod(), + implementation = ::revokeShareLink + )) + .addMethod(unaryServerMethodDefinition( + context = this.context, + descriptor = EngPadSyncServiceGrpc.getListShareLinksMethod(), + implementation = ::listShareLinks + )).build() + } +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncKt.kt new file mode 100644 index 0000000..e69de29 diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookRequest.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookRequest.java new file mode 100644 index 0000000..6bc2e53 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookRequest.java @@ -0,0 +1,634 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.SyncNotebookRequest} + */ +public final class SyncNotebookRequest extends + com.google.protobuf.GeneratedMessageLite< + SyncNotebookRequest, SyncNotebookRequest.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.SyncNotebookRequest) + SyncNotebookRequestOrBuilder { + private SyncNotebookRequest() { + title_ = ""; + pageSize_ = ""; + pages_ = emptyProtobufList(); + } + public static final int NOTEBOOK_ID_FIELD_NUMBER = 1; + private long notebookId_; + /** + * int64 notebook_id = 1; + * @return The notebookId. + */ + @java.lang.Override + public long getNotebookId() { + return notebookId_; + } + /** + * int64 notebook_id = 1; + * @param value The notebookId to set. + */ + private void setNotebookId(long value) { + + notebookId_ = value; + } + /** + * int64 notebook_id = 1; + */ + private void clearNotebookId() { + + notebookId_ = 0L; + } + + public static final int TITLE_FIELD_NUMBER = 2; + private java.lang.String title_; + /** + * string title = 2; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + return title_; + } + /** + * string title = 2; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(title_); + } + /** + * string title = 2; + * @param value The title to set. + */ + private void setTitle( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + title_ = value; + } + /** + * string title = 2; + */ + private void clearTitle() { + + title_ = getDefaultInstance().getTitle(); + } + /** + * string title = 2; + * @param value The bytes for title to set. + */ + private void setTitleBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + title_ = value.toStringUtf8(); + + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private java.lang.String pageSize_; + /** + * string page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public java.lang.String getPageSize() { + return pageSize_; + } + /** + * string page_size = 3; + * @return The bytes for pageSize. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageSizeBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(pageSize_); + } + /** + * string page_size = 3; + * @param value The pageSize to set. + */ + private void setPageSize( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + pageSize_ = value; + } + /** + * string page_size = 3; + */ + private void clearPageSize() { + + pageSize_ = getDefaultInstance().getPageSize(); + } + /** + * string page_size = 3; + * @param value The bytes for pageSize to set. + */ + private void setPageSizeBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + pageSize_ = value.toStringUtf8(); + + } + + public static final int PAGES_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.ProtobufList pages_; + /** + * repeated .engpad.v1.PageData pages = 4; + */ + @java.lang.Override + public java.util.List getPagesList() { + return pages_; + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + public java.util.List + getPagesOrBuilderList() { + return pages_; + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + @java.lang.Override + public int getPagesCount() { + return pages_.size(); + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + @java.lang.Override + public net.metacircular.engpad.proto.v1.PageData getPages(int index) { + return pages_.get(index); + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + public net.metacircular.engpad.proto.v1.PageDataOrBuilder getPagesOrBuilder( + int index) { + return pages_.get(index); + } + private void ensurePagesIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = pages_; + if (!tmp.isModifiable()) { + pages_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .engpad.v1.PageData pages = 4; + */ + private void setPages( + int index, net.metacircular.engpad.proto.v1.PageData value) { + value.getClass(); + ensurePagesIsMutable(); + pages_.set(index, value); + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + private void addPages(net.metacircular.engpad.proto.v1.PageData value) { + value.getClass(); + ensurePagesIsMutable(); + pages_.add(value); + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + private void addPages( + int index, net.metacircular.engpad.proto.v1.PageData value) { + value.getClass(); + ensurePagesIsMutable(); + pages_.add(index, value); + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + private void addAllPages( + java.lang.Iterable values) { + ensurePagesIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, pages_); + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + private void clearPages() { + pages_ = emptyProtobufList(); + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + private void removePages(int index) { + ensurePagesIsMutable(); + pages_.remove(index); + } + + public static net.metacircular.engpad.proto.v1.SyncNotebookRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.SyncNotebookRequest prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.SyncNotebookRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.SyncNotebookRequest, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.SyncNotebookRequest) + net.metacircular.engpad.proto.v1.SyncNotebookRequestOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.SyncNotebookRequest.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * int64 notebook_id = 1; + * @return The notebookId. + */ + @java.lang.Override + public long getNotebookId() { + return instance.getNotebookId(); + } + /** + * int64 notebook_id = 1; + * @param value The notebookId to set. + * @return This builder for chaining. + */ + public Builder setNotebookId(long value) { + copyOnWrite(); + instance.setNotebookId(value); + return this; + } + /** + * int64 notebook_id = 1; + * @return This builder for chaining. + */ + public Builder clearNotebookId() { + copyOnWrite(); + instance.clearNotebookId(); + return this; + } + + /** + * string title = 2; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + return instance.getTitle(); + } + /** + * string title = 2; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + return instance.getTitleBytes(); + } + /** + * string title = 2; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + copyOnWrite(); + instance.setTitle(value); + return this; + } + /** + * string title = 2; + * @return This builder for chaining. + */ + public Builder clearTitle() { + copyOnWrite(); + instance.clearTitle(); + return this; + } + /** + * string title = 2; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setTitleBytes(value); + return this; + } + + /** + * string page_size = 3; + * @return The pageSize. + */ + @java.lang.Override + public java.lang.String getPageSize() { + return instance.getPageSize(); + } + /** + * string page_size = 3; + * @return The bytes for pageSize. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageSizeBytes() { + return instance.getPageSizeBytes(); + } + /** + * string page_size = 3; + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize( + java.lang.String value) { + copyOnWrite(); + instance.setPageSize(value); + return this; + } + /** + * string page_size = 3; + * @return This builder for chaining. + */ + public Builder clearPageSize() { + copyOnWrite(); + instance.clearPageSize(); + return this; + } + /** + * string page_size = 3; + * @param value The bytes for pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSizeBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setPageSizeBytes(value); + return this; + } + + /** + * repeated .engpad.v1.PageData pages = 4; + */ + @java.lang.Override + public java.util.List getPagesList() { + return java.util.Collections.unmodifiableList( + instance.getPagesList()); + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + @java.lang.Override + public int getPagesCount() { + return instance.getPagesCount(); + }/** + * repeated .engpad.v1.PageData pages = 4; + */ + @java.lang.Override + public net.metacircular.engpad.proto.v1.PageData getPages(int index) { + return instance.getPages(index); + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + public Builder setPages( + int index, net.metacircular.engpad.proto.v1.PageData value) { + copyOnWrite(); + instance.setPages(index, value); + return this; + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + public Builder setPages( + int index, net.metacircular.engpad.proto.v1.PageData.Builder builderForValue) { + copyOnWrite(); + instance.setPages(index, + builderForValue.build()); + return this; + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + public Builder addPages(net.metacircular.engpad.proto.v1.PageData value) { + copyOnWrite(); + instance.addPages(value); + return this; + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + public Builder addPages( + int index, net.metacircular.engpad.proto.v1.PageData value) { + copyOnWrite(); + instance.addPages(index, value); + return this; + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + public Builder addPages( + net.metacircular.engpad.proto.v1.PageData.Builder builderForValue) { + copyOnWrite(); + instance.addPages(builderForValue.build()); + return this; + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + public Builder addPages( + int index, net.metacircular.engpad.proto.v1.PageData.Builder builderForValue) { + copyOnWrite(); + instance.addPages(index, + builderForValue.build()); + return this; + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + public Builder addAllPages( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllPages(values); + return this; + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + public Builder clearPages() { + copyOnWrite(); + instance.clearPages(); + return this; + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + public Builder removePages(int index) { + copyOnWrite(); + instance.removePages(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:engpad.v1.SyncNotebookRequest) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.SyncNotebookRequest(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "notebookId_", + "title_", + "pageSize_", + "pages_", + net.metacircular.engpad.proto.v1.PageData.class, + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0001\u0000\u0001\u0002\u0002\u0208" + + "\u0003\u0208\u0004\u001b"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.SyncNotebookRequest.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.SyncNotebookRequest) + private static final net.metacircular.engpad.proto.v1.SyncNotebookRequest DEFAULT_INSTANCE; + static { + SyncNotebookRequest defaultInstance = new SyncNotebookRequest(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + SyncNotebookRequest.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.SyncNotebookRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookRequestKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookRequestKt.kt new file mode 100644 index 0000000..0fdf48c --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookRequestKt.kt @@ -0,0 +1,150 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializesyncNotebookRequest") +public inline fun syncNotebookRequest(block: net.metacircular.engpad.proto.v1.SyncNotebookRequestKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.SyncNotebookRequest = + net.metacircular.engpad.proto.v1.SyncNotebookRequestKt.Dsl._create(net.metacircular.engpad.proto.v1.SyncNotebookRequest.newBuilder()).apply { block() }._build() +public object SyncNotebookRequestKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.SyncNotebookRequest.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.SyncNotebookRequest.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.SyncNotebookRequest = _builder.build() + + /** + * int64 notebook_id = 1; + */ + public var notebookId: kotlin.Long + @JvmName("getNotebookId") + get() = _builder.getNotebookId() + @JvmName("setNotebookId") + set(value) { + _builder.setNotebookId(value) + } + /** + * int64 notebook_id = 1; + */ + public fun clearNotebookId() { + _builder.clearNotebookId() + } + + /** + * string title = 2; + */ + public var title: kotlin.String + @JvmName("getTitle") + get() = _builder.getTitle() + @JvmName("setTitle") + set(value) { + _builder.setTitle(value) + } + /** + * string title = 2; + */ + public fun clearTitle() { + _builder.clearTitle() + } + + /** + * string page_size = 3; + */ + public var pageSize: kotlin.String + @JvmName("getPageSize") + get() = _builder.getPageSize() + @JvmName("setPageSize") + set(value) { + _builder.setPageSize(value) + } + /** + * string page_size = 3; + */ + public fun clearPageSize() { + _builder.clearPageSize() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class PagesProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * repeated .engpad.v1.PageData pages = 4; + */ + public val pages: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getPagesList() + ) + /** + * repeated .engpad.v1.PageData pages = 4; + * @param value The pages to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addPages") + public fun com.google.protobuf.kotlin.DslList.add(value: net.metacircular.engpad.proto.v1.PageData) { + _builder.addPages(value) + } + /** + * repeated .engpad.v1.PageData pages = 4; + * @param value The pages to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignPages") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: net.metacircular.engpad.proto.v1.PageData) { + add(value) + } + /** + * repeated .engpad.v1.PageData pages = 4; + * @param values The pages to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllPages") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllPages(values) + } + /** + * repeated .engpad.v1.PageData pages = 4; + * @param values The pages to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllPages") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * repeated .engpad.v1.PageData pages = 4; + * @param index The index to set the value at. + * @param value The pages to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setPages") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: net.metacircular.engpad.proto.v1.PageData) { + _builder.setPages(index, value) + } + /** + * repeated .engpad.v1.PageData pages = 4; + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearPages") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearPages() + } + } +} +public inline fun net.metacircular.engpad.proto.v1.SyncNotebookRequest.copy(block: net.metacircular.engpad.proto.v1.SyncNotebookRequestKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.SyncNotebookRequest = + net.metacircular.engpad.proto.v1.SyncNotebookRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookRequestOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookRequestOrBuilder.java new file mode 100644 index 0000000..5452d13 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookRequestOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface SyncNotebookRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.SyncNotebookRequest) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * int64 notebook_id = 1; + * @return The notebookId. + */ + long getNotebookId(); + + /** + * string title = 2; + * @return The title. + */ + java.lang.String getTitle(); + /** + * string title = 2; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + * string page_size = 3; + * @return The pageSize. + */ + java.lang.String getPageSize(); + /** + * string page_size = 3; + * @return The bytes for pageSize. + */ + com.google.protobuf.ByteString + getPageSizeBytes(); + + /** + * repeated .engpad.v1.PageData pages = 4; + */ + java.util.List + getPagesList(); + /** + * repeated .engpad.v1.PageData pages = 4; + */ + net.metacircular.engpad.proto.v1.PageData getPages(int index); + /** + * repeated .engpad.v1.PageData pages = 4; + */ + int getPagesCount(); +} diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookResponse.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookResponse.java new file mode 100644 index 0000000..22d1a6e --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookResponse.java @@ -0,0 +1,333 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +/** + * Protobuf type {@code engpad.v1.SyncNotebookResponse} + */ +public final class SyncNotebookResponse extends + com.google.protobuf.GeneratedMessageLite< + SyncNotebookResponse, SyncNotebookResponse.Builder> implements + // @@protoc_insertion_point(message_implements:engpad.v1.SyncNotebookResponse) + SyncNotebookResponseOrBuilder { + private SyncNotebookResponse() { + } + public static final int SERVER_NOTEBOOK_ID_FIELD_NUMBER = 1; + private long serverNotebookId_; + /** + * int64 server_notebook_id = 1; + * @return The serverNotebookId. + */ + @java.lang.Override + public long getServerNotebookId() { + return serverNotebookId_; + } + /** + * int64 server_notebook_id = 1; + * @param value The serverNotebookId to set. + */ + private void setServerNotebookId(long value) { + + serverNotebookId_ = value; + } + /** + * int64 server_notebook_id = 1; + */ + private void clearServerNotebookId() { + + serverNotebookId_ = 0L; + } + + public static final int SYNCED_AT_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp syncedAt_; + /** + * .google.protobuf.Timestamp synced_at = 2; + */ + @java.lang.Override + public boolean hasSyncedAt() { + return syncedAt_ != null; + } + /** + * .google.protobuf.Timestamp synced_at = 2; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSyncedAt() { + return syncedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : syncedAt_; + } + /** + * .google.protobuf.Timestamp synced_at = 2; + */ + private void setSyncedAt(com.google.protobuf.Timestamp value) { + value.getClass(); + syncedAt_ = value; + + } + /** + * .google.protobuf.Timestamp synced_at = 2; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeSyncedAt(com.google.protobuf.Timestamp value) { + value.getClass(); + if (syncedAt_ != null && + syncedAt_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + syncedAt_ = + com.google.protobuf.Timestamp.newBuilder(syncedAt_).mergeFrom(value).buildPartial(); + } else { + syncedAt_ = value; + } + + } + /** + * .google.protobuf.Timestamp synced_at = 2; + */ + private void clearSyncedAt() { syncedAt_ = null; + + } + + public static net.metacircular.engpad.proto.v1.SyncNotebookResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static net.metacircular.engpad.proto.v1.SyncNotebookResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(net.metacircular.engpad.proto.v1.SyncNotebookResponse prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code engpad.v1.SyncNotebookResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + net.metacircular.engpad.proto.v1.SyncNotebookResponse, Builder> implements + // @@protoc_insertion_point(builder_implements:engpad.v1.SyncNotebookResponse) + net.metacircular.engpad.proto.v1.SyncNotebookResponseOrBuilder { + // Construct using net.metacircular.engpad.proto.v1.SyncNotebookResponse.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * int64 server_notebook_id = 1; + * @return The serverNotebookId. + */ + @java.lang.Override + public long getServerNotebookId() { + return instance.getServerNotebookId(); + } + /** + * int64 server_notebook_id = 1; + * @param value The serverNotebookId to set. + * @return This builder for chaining. + */ + public Builder setServerNotebookId(long value) { + copyOnWrite(); + instance.setServerNotebookId(value); + return this; + } + /** + * int64 server_notebook_id = 1; + * @return This builder for chaining. + */ + public Builder clearServerNotebookId() { + copyOnWrite(); + instance.clearServerNotebookId(); + return this; + } + + /** + * .google.protobuf.Timestamp synced_at = 2; + */ + @java.lang.Override + public boolean hasSyncedAt() { + return instance.hasSyncedAt(); + } + /** + * .google.protobuf.Timestamp synced_at = 2; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSyncedAt() { + return instance.getSyncedAt(); + } + /** + * .google.protobuf.Timestamp synced_at = 2; + */ + public Builder setSyncedAt(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.setSyncedAt(value); + return this; + } + /** + * .google.protobuf.Timestamp synced_at = 2; + */ + public Builder setSyncedAt( + com.google.protobuf.Timestamp.Builder builderForValue) { + copyOnWrite(); + instance.setSyncedAt(builderForValue.build()); + return this; + } + /** + * .google.protobuf.Timestamp synced_at = 2; + */ + public Builder mergeSyncedAt(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.mergeSyncedAt(value); + return this; + } + /** + * .google.protobuf.Timestamp synced_at = 2; + */ + public Builder clearSyncedAt() { copyOnWrite(); + instance.clearSyncedAt(); + return this; + } + + // @@protoc_insertion_point(builder_scope:engpad.v1.SyncNotebookResponse) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new net.metacircular.engpad.proto.v1.SyncNotebookResponse(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "serverNotebookId_", + "syncedAt_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0002\u0002\t" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (net.metacircular.engpad.proto.v1.SyncNotebookResponse.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:engpad.v1.SyncNotebookResponse) + private static final net.metacircular.engpad.proto.v1.SyncNotebookResponse DEFAULT_INSTANCE; + static { + SyncNotebookResponse defaultInstance = new SyncNotebookResponse(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + SyncNotebookResponse.class, defaultInstance); + } + + public static net.metacircular.engpad.proto.v1.SyncNotebookResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookResponseKt.kt b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookResponseKt.kt new file mode 100644 index 0000000..ccf1878 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookResponseKt.kt @@ -0,0 +1,72 @@ +//Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +@kotlin.jvm.JvmName("-initializesyncNotebookResponse") +public inline fun syncNotebookResponse(block: net.metacircular.engpad.proto.v1.SyncNotebookResponseKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.SyncNotebookResponse = + net.metacircular.engpad.proto.v1.SyncNotebookResponseKt.Dsl._create(net.metacircular.engpad.proto.v1.SyncNotebookResponse.newBuilder()).apply { block() }._build() +public object SyncNotebookResponseKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.metacircular.engpad.proto.v1.SyncNotebookResponse.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.metacircular.engpad.proto.v1.SyncNotebookResponse.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.metacircular.engpad.proto.v1.SyncNotebookResponse = _builder.build() + + /** + * int64 server_notebook_id = 1; + */ + public var serverNotebookId: kotlin.Long + @JvmName("getServerNotebookId") + get() = _builder.getServerNotebookId() + @JvmName("setServerNotebookId") + set(value) { + _builder.setServerNotebookId(value) + } + /** + * int64 server_notebook_id = 1; + */ + public fun clearServerNotebookId() { + _builder.clearServerNotebookId() + } + + /** + * .google.protobuf.Timestamp synced_at = 2; + */ + public var syncedAt: com.google.protobuf.Timestamp + @JvmName("getSyncedAt") + get() = _builder.getSyncedAt() + @JvmName("setSyncedAt") + set(value) { + _builder.setSyncedAt(value) + } + /** + * .google.protobuf.Timestamp synced_at = 2; + */ + public fun clearSyncedAt() { + _builder.clearSyncedAt() + } + /** + * .google.protobuf.Timestamp synced_at = 2; + * @return Whether the syncedAt field is set. + */ + public fun hasSyncedAt(): kotlin.Boolean { + return _builder.hasSyncedAt() + } + } +} +public inline fun net.metacircular.engpad.proto.v1.SyncNotebookResponse.copy(block: net.metacircular.engpad.proto.v1.SyncNotebookResponseKt.Dsl.() -> kotlin.Unit): net.metacircular.engpad.proto.v1.SyncNotebookResponse = + net.metacircular.engpad.proto.v1.SyncNotebookResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +val net.metacircular.engpad.proto.v1.SyncNotebookResponseOrBuilder.syncedAtOrNull: com.google.protobuf.Timestamp? + get() = if (hasSyncedAt()) getSyncedAt() else null + diff --git a/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookResponseOrBuilder.java b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookResponseOrBuilder.java new file mode 100644 index 0000000..18a0758 --- /dev/null +++ b/app/src/main/java/gen/net/metacircular/engpad/proto/v1/SyncNotebookResponseOrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: engpad/v1/sync.proto + +package net.metacircular.engpad.proto.v1; + +public interface SyncNotebookResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:engpad.v1.SyncNotebookResponse) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * int64 server_notebook_id = 1; + * @return The serverNotebookId. + */ + long getServerNotebookId(); + + /** + * .google.protobuf.Timestamp synced_at = 2; + * @return Whether the syncedAt field is set. + */ + boolean hasSyncedAt(); + /** + * .google.protobuf.Timestamp synced_at = 2; + * @return The syncedAt. + */ + com.google.protobuf.Timestamp getSyncedAt(); +} diff --git a/app/src/main/kotlin/net/metacircular/engpad/data/sync/SyncClient.kt b/app/src/main/kotlin/net/metacircular/engpad/data/sync/SyncClient.kt index b1c0990..29e45b2 100644 --- a/app/src/main/kotlin/net/metacircular/engpad/data/sync/SyncClient.kt +++ b/app/src/main/kotlin/net/metacircular/engpad/data/sync/SyncClient.kt @@ -9,7 +9,7 @@ import io.grpc.ManagedChannel import io.grpc.Metadata import io.grpc.MethodDescriptor import io.grpc.okhttp.OkHttpChannelBuilder -import net.metacircular.engpad.proto.v1.EngPadSyncGrpcKt +import net.metacircular.engpad.proto.v1.EngPadSyncServiceGrpcKt import java.util.concurrent.TimeUnit import javax.net.ssl.SSLContext import javax.net.ssl.TrustManagerFactory @@ -33,8 +33,8 @@ class SyncClient( .intercept(AuthInterceptor(username, password)) .build() - val stub: EngPadSyncGrpcKt.EngPadSyncCoroutineStub = - EngPadSyncGrpcKt.EngPadSyncCoroutineStub(channel) + val stub: EngPadSyncServiceGrpcKt.EngPadSyncServiceCoroutineStub = + EngPadSyncServiceGrpcKt.EngPadSyncServiceCoroutineStub(channel) fun shutdown() { channel.shutdown().awaitTermination(5, TimeUnit.SECONDS) diff --git a/app/src/main/kotlin/net/metacircular/engpad/data/sync/SyncManager.kt b/app/src/main/kotlin/net/metacircular/engpad/data/sync/SyncManager.kt index ef52c1f..7e02289 100644 --- a/app/src/main/kotlin/net/metacircular/engpad/data/sync/SyncManager.kt +++ b/app/src/main/kotlin/net/metacircular/engpad/data/sync/SyncManager.kt @@ -1,25 +1,19 @@ package net.metacircular.engpad.data.sync import com.google.protobuf.ByteString -import com.google.protobuf.timestamp import net.metacircular.engpad.data.db.NotebookDao import net.metacircular.engpad.data.db.PageDao import net.metacircular.engpad.data.db.StrokeDao -import net.metacircular.engpad.data.db.toFloatArray -import net.metacircular.engpad.proto.v1.DeleteNotebookRequestKt -import net.metacircular.engpad.proto.v1.ListNotebooksRequestKt import net.metacircular.engpad.proto.v1.NotebookSummary import net.metacircular.engpad.proto.v1.deleteNotebookRequest import net.metacircular.engpad.proto.v1.listNotebooksRequest -import net.metacircular.engpad.proto.v1.notebook -import net.metacircular.engpad.proto.v1.page -import net.metacircular.engpad.proto.v1.stroke +import net.metacircular.engpad.proto.v1.pageData +import net.metacircular.engpad.proto.v1.strokeData import net.metacircular.engpad.proto.v1.syncNotebookRequest -import java.nio.ByteBuffer -import java.nio.ByteOrder /** - * Coordinates syncing local notebook data to the remote eng-pad sync service. + * Coordinates syncing local notebook data to the remote eng-pad-server. + * Serializes Room entities to protobuf and calls the gRPC sync service. */ class SyncManager( private val client: SyncClient, @@ -27,71 +21,43 @@ class SyncManager( private val pageDao: PageDao, private val strokeDao: StrokeDao, ) { - /** - * Upload a notebook with all its pages and strokes to the sync server. - */ suspend fun syncNotebook(notebookId: Long) { - val localNotebook = notebookDao.getById(notebookId) + val notebook = notebookDao.getById(notebookId) ?: throw IllegalArgumentException("Notebook $notebookId not found") val localPages = pageDao.getByNotebookIdList(notebookId) - val protoNotebook = notebook { - id = localNotebook.id - title = localNotebook.title - pageSize = localNotebook.pageSize - createdAt = millisToTimestamp(localNotebook.createdAt) - updatedAt = millisToTimestamp(localNotebook.updatedAt) - lastPageId = localNotebook.lastPageId + val request = syncNotebookRequest { + this.notebookId = notebook.id + title = notebook.title + pageSize = notebook.pageSize for (localPage in localPages) { val localStrokes = strokeDao.getByPageId(localPage.id) - pages += page { - id = localPage.id - notebookId = localPage.notebookId + pages += pageData { + pageId = localPage.id pageNumber = localPage.pageNumber - createdAt = millisToTimestamp(localPage.createdAt) for (localStroke in localStrokes) { - strokes += stroke { - id = localStroke.id - pageId = localStroke.pageId + strokes += strokeData { penSize = localStroke.penSize color = localStroke.color + style = localStroke.style pointData = ByteString.copyFrom(localStroke.pointData) strokeOrder = localStroke.strokeOrder - createdAt = millisToTimestamp(localStroke.createdAt) - style = localStroke.style } } } } } - - val request = syncNotebookRequest { - notebook = protoNotebook - } client.stub.syncNotebook(request) } - /** - * Delete a notebook on the sync server. - */ suspend fun deleteNotebook(notebookId: Long) { - val request = deleteNotebookRequest { + client.stub.deleteNotebook(deleteNotebookRequest { this.notebookId = notebookId - } - client.stub.deleteNotebook(request) + }) } - /** - * List all notebooks available on the sync server. - */ suspend fun listRemoteNotebooks(): List { - val request = listNotebooksRequest {} - val response = client.stub.listNotebooks(request) + val response = client.stub.listNotebooks(listNotebooksRequest {}) return response.notebooksList } } - -private fun millisToTimestamp(millis: Long) = timestamp { - seconds = millis / 1000 - nanos = ((millis % 1000) * 1_000_000).toInt() -} diff --git a/app/src/main/proto/engpad/v1/sync.proto b/app/src/main/proto/engpad/v1/sync.proto index 41e71e0..9a36203 100644 --- a/app/src/main/proto/engpad/v1/sync.proto +++ b/app/src/main/proto/engpad/v1/sync.proto @@ -1,27 +1,49 @@ syntax = "proto3"; - package engpad.v1; -option go_package = "git.wntrmute.dev/kyle/engpad/gen/engpad/v1;engpadv1"; +option go_package = "git.wntrmute.dev/kyle/eng-pad-server/gen/engpad/v1;engpadv1"; option java_package = "net.metacircular.engpad.proto.v1"; option java_multiple_files = true; import "google/protobuf/timestamp.proto"; -service EngPadSync { - rpc SyncNotebook(SyncNotebookRequest) returns (SyncNotebookResponse); - rpc DeleteNotebook(DeleteNotebookRequest) returns (DeleteNotebookResponse); - rpc ListNotebooks(ListNotebooksRequest) returns (ListNotebooksResponse); +service EngPadSyncService { + rpc SyncNotebook(SyncNotebookRequest) returns (SyncNotebookResponse); + rpc DeleteNotebook(DeleteNotebookRequest) returns (DeleteNotebookResponse); + rpc ListNotebooks(ListNotebooksRequest) returns (ListNotebooksResponse); + rpc CreateShareLink(CreateShareLinkRequest) returns (CreateShareLinkResponse); + rpc RevokeShareLink(RevokeShareLinkRequest) returns (RevokeShareLinkResponse); + rpc ListShareLinks(ListShareLinksRequest) returns (ListShareLinksResponse); } message SyncNotebookRequest { - Notebook notebook = 1; + int64 notebook_id = 1; + string title = 2; + string page_size = 3; + repeated PageData pages = 4; } -message SyncNotebookResponse {} +message PageData { + int64 page_id = 1; + int32 page_number = 2; + repeated StrokeData strokes = 3; +} + +message StrokeData { + float pen_size = 1; + int32 color = 2; + string style = 3; + bytes point_data = 4; + int32 stroke_order = 5; +} + +message SyncNotebookResponse { + int64 server_notebook_id = 1; + google.protobuf.Timestamp synced_at = 2; +} message DeleteNotebookRequest { - int64 notebook_id = 1; + int64 notebook_id = 1; } message DeleteNotebookResponse {} @@ -29,42 +51,46 @@ message DeleteNotebookResponse {} message ListNotebooksRequest {} message ListNotebooksResponse { - repeated NotebookSummary notebooks = 1; -} - -message Notebook { - int64 id = 1; - string title = 2; - string page_size = 3; - google.protobuf.Timestamp created_at = 4; - google.protobuf.Timestamp updated_at = 5; - int64 last_page_id = 6; - repeated Page pages = 7; + repeated NotebookSummary notebooks = 1; } message NotebookSummary { - int64 id = 1; - string title = 2; - string page_size = 3; - google.protobuf.Timestamp updated_at = 4; - int32 page_count = 5; + int64 server_id = 1; + int64 remote_id = 2; + string title = 3; + string page_size = 4; + int32 page_count = 5; + google.protobuf.Timestamp synced_at = 6; } -message Page { - int64 id = 1; - int64 notebook_id = 2; - int32 page_number = 3; - google.protobuf.Timestamp created_at = 4; - repeated Stroke strokes = 5; +message CreateShareLinkRequest { + int64 notebook_id = 1; + int64 expires_in_seconds = 2; } -message Stroke { - int64 id = 1; - int64 page_id = 2; - float pen_size = 3; - int32 color = 4; - bytes point_data = 5; - int32 stroke_order = 6; - google.protobuf.Timestamp created_at = 7; - string style = 8; +message CreateShareLinkResponse { + string token = 1; + string url = 2; + google.protobuf.Timestamp expires_at = 3; +} + +message RevokeShareLinkRequest { + string token = 1; +} + +message RevokeShareLinkResponse {} + +message ListShareLinksRequest { + int64 notebook_id = 1; +} + +message ListShareLinksResponse { + repeated ShareLinkInfo links = 1; +} + +message ShareLinkInfo { + string token = 1; + string url = 2; + google.protobuf.Timestamp created_at = 3; + google.protobuf.Timestamp expires_at = 4; } diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 0000000..5027e68 --- /dev/null +++ b/buf.yaml @@ -0,0 +1,12 @@ +version: v2 + +modules: + - path: app/src/main/proto + +lint: + use: + - STANDARD + +breaking: + use: + - FILE diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 286aff4..703159d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,9 +11,9 @@ core-ktx = "1.18.0" activity-compose = "1.13.0" junit = "4.13.2" reorderable = "3.0.0" -protobuf = "4.29.3" -grpc = "1.69.0" -grpcKotlin = "1.4.1" +protobuf = "4.34.1" +grpc = "1.80.0" +grpcKotlin = "1.5.0" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core-ktx" }