diff --git a/.circleci/config.yml b/.circleci/config.yml index c0b2ae9cb..2877492b7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,8 @@ version: 2.1 +orbs: + node: circleci/node@5.0.2 + parameters: benchmarks: type: boolean @@ -16,7 +19,7 @@ executors: - image: alvrme/alpine-android:android-31-jdk<> environment: GRADLE_OPTS: "-Dorg.gradle.daemon=false" - resource_class: medium+ + resource_class: large commands: read_cache: @@ -43,6 +46,22 @@ jobs: steps: - checkout - read_cache + - node/install + + - run: + name: Install protobufjs + command: | + npm install protobufjs@6.11.3 + + - run: + name: Install long.js + command: | + npm install long@5.2.0 + + - run: + name: Install Firefox + command: | + apk add firefox - run: name: Build and test @@ -72,6 +91,7 @@ jobs: - store_test_results: path: ~/test-results + - store_artifacts: path: ~/test-results/junit @@ -89,13 +109,42 @@ jobs: steps: - checkout - read_cache + - node/install + + - run: + name: Install protobufjs + command: | + npm install protobufjs@6.11.3 + + - run: + name: Install long.js + command: | + npm install long@5.2.0 + + - run: + name: Install Firefox + command: | + apk add firefox - attach_workspace: at: build/repos - run: name: Integration tests - command: cd gradle-plugin-integration-test && ./gradlew clean build -Dkotlin.version=<> --stacktrace + command: cd gradle-plugin-integration-test && ./gradlew clean build -Dkotlin-integration.version=<> -Djava-integration.version=<> --stacktrace + + - run: + name: Save test results + command: | + mkdir -p ~/test-results/junit/ + find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/junit/ \; + when: always + + - store_test_results: + path: ~/test-results + + - store_artifacts: + path: ~/test-results/junit release: executor: builder @@ -103,8 +152,8 @@ jobs: - checkout - read_cache - run: - name: Publish release - command: "./gradlew build -x test publishToRemote publishPlugins -Dorg.gradle.internal.http.socketTimeout=120000 -Dorg.gradle.internal.network.retry.max.attempts=1 -Dorg.gradle.internal.publish.checksums.insecure=true" + name: Publish release + command: "./gradlew publish publishPlugins -Dorg.gradle.internal.http.socketTimeout=120000 -Dorg.gradle.internal.network.retry.max.attempts=1 -Dorg.gradle.internal.publish.checksums.insecure=true" - run: name: Finalize release command: "./gradlew closeAndReleaseRepository -Dorg.gradle.internal.http.socketTimeout=120000 -Dorg.gradle.internal.network.retry.max.attempts=1 -Dorg.gradle.internal.publish.checksums.insecure=true" @@ -121,8 +170,8 @@ workflows: - build matrix: parameters: - jdk: ["8", "11", "17"] - kotlin: ["1.6.21", "1.7.21", "1.8.22"] + jdk: ["11", "17"] + kotlin: ["1.8.22", "1.9.10"] - release: context: OSS filters: diff --git a/.gitignore b/.gitignore index 3e0ec966e..7fdb7dcbb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,8 @@ out .idea *.iml -testing/conformance-driver/failing_tests.txt -protokt-codegen/src/test/resources/com/toasttab/protokt/test-proto-bin-request.bin +testing/conformance/runner/failing_tests.txt +protokt-codegen/src/test/resources/protokt/v1/codegen/test-proto-bin-request.bin +node_modules/ +package-lock.json +package.json diff --git a/README.md b/README.md index 1f5a864b8..eaf06df81 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,11 @@ Supports only version 3 of the Protocol Buffers language. + [BytesSlice](#bytesslice) * [gRPC code generation](#grpc-code-generation) + [Generated gRPC code](#generated-grpc-code) - + [Integrating with gRPC's Java API](#integrating-with-grpcs-java-api) - + [Integrating with gRPC's Kotlin API](#integrating-with-grpcs-kotlin-api) + - [`grpcDescriptors`](#grpcdescriptors) + - [`grpcKotlinStubs` and gRPC's Kotlin API](#grpckotlinstubs-and-grpcs-kotlin-api) + - [Integrating with gRPC's Java API](#integrating-with-grpcs-java-api) + - [Integrating with gRPC's Kotlin API](#integrating-with-grpcs-kotlin-api) + - [Integrating with gRPC's NodeJS API](#integrating-with-grpcs-nodejs-api) * [IntelliJ integration](#intellij-integration) * [Command line code generation](#command-line-code-generation) * [Contribution](#contribution) @@ -49,16 +52,18 @@ Supports only version 3 of the Protocol Buffers language. and more - Representation of the well-known types as Kotlin nullable types: `StringValue` is represented as `String?`, etc. -- Built on Protobuf's Java library: usage of CodedInputStream and +- Multiplatform support for Kotlin JS (beta) +- (JVM) Built on Protobuf's Java library: usage of CodedInputStream and CodedOutputStream for best performance +- (JS) Built on protobufJS for best performance - gRPC [method descriptor and service descriptor generation](#grpc-code-generation) -for use with [grpc-java](#integrating-with-grpcs-java-api) or -[grpc-kotlin](#integrating-with-grpcs-kotlin-api) (see examples in [examples](examples)) +for use with [grpc-java](#integrating-with-grpcs-java-api), +[grpc-kotlin](#integrating-with-grpcs-kotlin-api), and +[grpc-node](#integrating-with-grpcs-nodejs-api) (experimental) (see examples in [examples](examples)) ### Not yet implemented - Kotlin/Native support -- Kotlin/JS support - Protobuf JSON support ### Compatibility @@ -66,7 +71,7 @@ for use with [grpc-java](#integrating-with-grpcs-java-api) or The Gradle plugin requires Java 8+ and Gradle 5.6+. It runs on recent versions of MacOS, Linux, and Windows. -The runtime and generated code are compatible with Kotlin 1.4+, Java 8+, and Android 4.4+. +The runtime and generated code are compatible with Kotlin 1.8+, Java 8+, and Android 4.4+. ## Usage @@ -76,7 +81,7 @@ See examples in [testing](testing). ```groovy plugins { - id "com.toasttab.protokt" version "" + id "com.toasttab.protokt.v1" version "" } ``` or @@ -88,13 +93,13 @@ buildscript { } } -apply plugin: 'com.toasttab.protokt' +apply plugin: 'com.toasttab.protokt.v1' ``` This will automatically download and install protokt, apply the Google protobuf plugin, and configure all the necessary boilerplate. By default it will also add -`protokt-core` to the `api` scope of the project. You must explicitly choose to -depend on `protobuf-java` or `protobuf-javalite`: +`protokt-core` to the `api` scope of the project. On the JVM you must explicitly +choose to depend on `protobuf-java` or `protobuf-javalite`: ```groovy dependencies { @@ -133,7 +138,7 @@ compileJava.enabled = false ### Generated Code -Generated code is placed in `/generated-sources//protokt`. +Generated code is placed in `/generated//protokt`. A simple example: @@ -150,106 +155,141 @@ message Sample { will produce: ```kotlin -/* - * Generated by protokt version . Do not modify. - * Source: toasttab/protokt/sample/sample.proto - */ - -package toasttab.protokt.sample - -import com.toasttab.protokt.rt.KtDeserializer -import com.toasttab.protokt.rt.KtGeneratedMessage -import com.toasttab.protokt.rt.KtMessage -import com.toasttab.protokt.rt.KtMessageDeserializer -import com.toasttab.protokt.rt.KtMessageSerializer -import com.toasttab.protokt.rt.Tag -import com.toasttab.protokt.rt.UnknownFieldSet -import com.toasttab.protokt.rt.sizeof - -@KtGeneratedMessage("toasttab.protokt.sample.Sample") -class Sample -private constructor( - val sampleField: String, - val unknownFields: UnknownFieldSet = UnknownFieldSet.empty() -) : KtMessage { - override val messageSize by lazy { messageSize() } - - override fun serialize(serializer: KtMessageSerializer) { - if (sampleField.isNotEmpty()) { - serializer.write(Tag(10)).write(sampleField) - } - serializer.writeUnknown(unknownFields) +// Generated by protokt version 0.11.8-SNAPSHOT. Do not modify. +// Source: protokt/v1/sample/sample.proto +@file:Suppress("DEPRECATION") + +package protokt.v1.sample + +import protokt.v1.AbstractKtDeserializer +import protokt.v1.AbstractKtMessage +import protokt.v1.KtDsl +import protokt.v1.KtMessageDeserializer +import protokt.v1.KtMessageSerializer +import protokt.v1.UnknownFieldSet +import protokt.v1.google.protobuf.Descriptor +import protokt.v1.google.protobuf.FileDescriptor +import protokt.v1.sizeOf +import kotlin.Any +import kotlin.Boolean +import kotlin.Deprecated +import kotlin.DeprecationLevel.HIDDEN +import kotlin.Int +import kotlin.String +import kotlin.Suppress +import kotlin.Unit +import com.toasttab.protokt.rt.KtGeneratedFileDescriptor as RtKtGeneratedFileDescriptor +import com.toasttab.protokt.rt.KtGeneratedMessage as RtKtGeneratedMessage +import protokt.v1.KtGeneratedFileDescriptor as V1KtGeneratedFileDescriptor +import protokt.v1.KtGeneratedMessage as V1KtGeneratedMessage + +@V1KtGeneratedMessage("protokt.v1.sample.Sample") +@RtKtGeneratedMessage("protokt.v1.sample.Sample") +class Sample private constructor( + val sampleField: String, + val unknownFields: UnknownFieldSet = UnknownFieldSet.empty(), +) : AbstractKtMessage() { + override val messageSize: Int by lazy { messageSize() } + + private fun messageSize(): Int { + var result = 0 + if (sampleField.isNotEmpty()) { + result += sizeOf(10u) + sizeOf(sampleField) } + result += unknownFields.size() + return result + } - private fun messageSize(): Int { - var res = 0 - if (sampleField.isNotEmpty()) { - res += sizeof(Tag(1)) + sizeof(sampleField) - } - res += unknownFields.size() - return res + override fun serialize(serializer: KtMessageSerializer): Unit { + if (sampleField.isNotEmpty()) { + serializer.writeTag(10u).write(sampleField) } + serializer.writeUnknown(unknownFields) + } - override fun equals(other: Any?): Boolean = - other is Sample && + override fun equals(other: Any?): Boolean = + other is Sample && other.sampleField == sampleField && other.unknownFields == unknownFields - override fun hashCode(): Int { - var result = unknownFields.hashCode() - result = 31 * result + sampleField.hashCode() - return result - } + override fun hashCode(): Int { + var result = unknownFields.hashCode() + result = 31 * result + sampleField.hashCode() + return result + } - override fun toString(): String = - "Sample(" + - "sampleField=$sampleField, " + - "unknownFields=$unknownFields)" + override fun toString(): String = "Sample(" + + "sampleField=$sampleField" + + if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)" - fun copy(dsl: SampleDsl.() -> Unit) = - Sample { - sampleField = this@Sample.sampleField - unknownFields = this@Sample.unknownFields - dsl() - } + fun copy(dsl: SampleDsl.() -> Unit): Sample = SampleDsl().apply { + sampleField = this@Sample.sampleField + unknownFields = this@Sample.unknownFields + dsl() + }.build() - class SampleDsl { - var sampleField = "" - var unknownFields = UnknownFieldSet.empty() + @KtDsl + class SampleDsl { + var sampleField: String = "" - fun build() = - Sample( - sampleField, - unknownFields - ) - } + var unknownFields: UnknownFieldSet = UnknownFieldSet.empty() - companion object Deserializer : KtDeserializer, (SampleDsl.() -> Unit) -> Sample { - override fun deserialize(deserializer: KtMessageDeserializer): Sample { - var sampleField = "" - var unknownFields: UnknownFieldSet.Builder? = null - - while (true) { - when (deserializer.readTag()) { - 0 -> - return Sample( - sampleField, - UnknownFieldSet.from(unknownFields) - ) - 10 -> sampleField = - deserializer.readString() - else -> unknownFields = - (unknownFields ?: UnknownFieldSet.Builder()).also { - it.add(deserializer.readUnknown()) - } - } - } - } + fun build(): Sample = Sample( + sampleField, + unknownFields, + ) + } - override fun invoke(dsl: SampleDsl.() -> Unit) = - SampleDsl().apply(dsl).build() + companion object Deserializer : AbstractKtDeserializer() { + override fun deserialize(deserializer: KtMessageDeserializer): Sample { + var sampleField = "" + var unknownFields: UnknownFieldSet.Builder? = null + + while (true) { + when (deserializer.readTag()) { + 0 -> return Sample( + sampleField, + UnknownFieldSet.from(unknownFields), + ) + 10 -> sampleField = deserializer.readString() + else -> + unknownFields = + (unknownFields ?: UnknownFieldSet.Builder()).also { + it.add(deserializer.readUnknown()) + } + } + } } + + @Deprecated( + "for ABI backwards compatibility only", + level = HIDDEN, + ) + fun invoke(dsl: SampleDsl.() -> Unit): Sample = SampleDsl().apply(dsl).build() + } +} + +fun Sample(dsl: Sample.SampleDsl.() -> Unit): Sample = Sample.SampleDsl().apply(dsl).build() + +@V1KtGeneratedFileDescriptor +@RtKtGeneratedFileDescriptor +object sample_file_descriptor { + val descriptor: FileDescriptor by lazy { + val descriptorData = arrayOf( + "\nprotokt/v1/sample/sample.protoprotok" + + "t.v1.sample\"\nSample\n sample_field " + + "(\tbproto3", + ) + + FileDescriptor.buildFrom( + descriptorData, + listOf(), + ) + } } + +val Sample.Deserializer.descriptor: Descriptor + get() = sample_file_descriptor.descriptor.messageTypes[0] ``` Construct your protokt object like so: @@ -285,34 +325,9 @@ builder and not assignment. Mutating the builder does a similar copy operation. ### Package -By default, the Kotlin package of a generated file is the same as the protobuf -package. Second in precedence is the declared `java_package` option, which can -be disabled by setting the `respectJavaPackage` property to `false` in the -Gradle configuration block: - -```groovy -protokt { - respectJavaPackage = false -} -``` - -Disabling this option at the code-generator level can be helpful when migrating -a codebase already using third-party protobuf with the `java_package` option in -use to prevent duplicate class issues. - -Highest precedence is given to the `(protokt.file).kotlin_package` option: - -```protobuf -syntax = "proto3"; - -import "protokt/protokt.proto"; - -package example; - -option (protokt.file).kotlin_package = "com.example"; - -... -``` +The Kotlin package of a generated file is the protobuf package prefixed with +`protokt.v1`. This scheme allows protokt-generated files to coexist on the +classpath with files generated by other compilers. ### Message @@ -381,8 +396,11 @@ akin to `protobuf-java`'s `ByteString`. ## Extensions +See extension options defined in +[protokt.proto](extensions/protokt-extensions-lite/src/main/proto/protokt/v1/protokt.proto). + See examples of each option in the [options](testing/options/src/main/proto) -project. All protokt-specific options require importing `protokt/protokt.proto` +project. All protokt-specific options require importing `protokt/v1/protokt.proto` in the protocol file. ### Wrapper Types @@ -393,18 +411,19 @@ transformation, but the protokt wrapper type option allows specification of a converter that will automatically encode and decode custom types to protobuf types. Some standard types are implemented in [extensions](extensions). -Wrap a field by invoking the `(protokt.property).wrap` option: +Wrap a field by invoking the `(protokt.v1.property).wrap` option: ```protobuf message WrapperMessage { google.protobuf.Timestamp instant = 1 [ - (protokt.property).wrap = "java.time.Instant" + (protokt.v1.property).wrap = "java.time.Instant" + (protokt.v1.property).non_null = true ]; } ``` Converters implement the -[Converter](extensions/protokt-extensions-api/src/main/kotlin/com/toasttab/protokt/ext/Converter.kt) +[Converter](extensions/protokt-extensions-api/src/commonMain/kotlin/com/toasttab/protokt/v1/Converter.kt) interface: ```kotlin @@ -440,40 +459,89 @@ object InstantConverter : Converter { ``` ```kotlin -class WrapperModel -private constructor( - val instant: Instant?, - ... -) : KtMessage { - ... - override fun serialize(serializer: KtMessageSerializer) { - if (instant != null) { - serializer.write(Tag(42)).write(InstantConverter.unwrap(instant)) - } - ... - } +class Wrappers private constructor( + val instant: Instant, + val unknownFields: UnknownFieldSet = UnknownFieldSet.empty(), +) : AbstractKtMessage() { + override val messageSize: Int by lazy { messageSize() } + + private fun messageSize(): Int { + var result = 0 + result += sizeOf(50u) + sizeOf(InstantConverter.unwrap(instant)) + result += unknownFields.size() + return result + } - override fun deserialize(deserializer: KtMessageDeserializer): WrapperModel { - var instant: Instant? = null - ... - while (true) { - when (deserializer.readTag()) { - 0 -> - return WrapperModel( - instant, - ... - ) - 8 -> instant = - InstantConverter.wrap(deserializer.readMessage(Timestamp)) - ... - } + override fun serialize(serializer: KtMessageSerializer): Unit { + serializer.writeTag(50u).write(InstantConverter.unwrap(instant)) + serializer.writeUnknown(unknownFields) + } + + override fun equals(other: Any?): Boolean = + other is Wrappers && + other.instant == instant && + other.unknownFields == unknownFields + + override fun hashCode(): Int { + var result = unknownFields.hashCode() + result = 31 * result + instant.hashCode() + return result + } + + override fun toString(): String = "Wrappers(" + + "instant=$instant, " + + if (unknownFields.isEmpty()) ")" else ", unknownFields=$unknownFields)" + + fun copy(dsl: WrappersDsl.() -> Unit): Wrappers = WrappersDsl().apply { + instant = this@Wrappers.instant + unknownFields = this@Wrappers.unknownFields + dsl() + }.build() + + @KtDsl + class WrappersDsl { + var instant: Instant? = null + + var unknownFields: UnknownFieldSet = UnknownFieldSet.empty() + + fun build(): Wrappers = Wrappers( + requireNotNull(instant) { + StringBuilder("instant") + .append(" specified nonnull with (protokt.property).non_null but was null") + }, + unknownFields + ) + } + + companion object Deserializer : AbstractKtDeserializer() { + override fun deserialize(deserializer: KtMessageDeserializer): Wrappers { + var instant: Instant? = null + var unknownFields: UnknownFieldSet.Builder? = null + + while (true) { + when (deserializer.readTag()) { + 0 -> return Wrappers( + requireNotNull(instant) { + StringBuilder("instant") + .append(" specified nonnull with (protokt.property).non_null but was null") + }, + UnknownFieldSet.from(unknownFields), + ) + 10 -> instant = InstantConverter.wrap(deserializer.readMessage(Timestamp)) + else -> + unknownFields = + (unknownFields ?: UnknownFieldSet.Builder()).also { + it.add(deserializer.readUnknown()) + } } + } } + } } ``` Each converter must be registered in a -`META-INF/services/com.toasttab.protokt.ext.Converter` +`META-INF/services/protokt.v1.Converter` classpath resource following the standard `ServiceLoader` convention. For example, Google's [AutoService](https://github.com/google/auto/tree/master/service) can register converters with an annotation: @@ -544,12 +612,12 @@ a nullable UUID: ```protobuf google.protobuf.BytesValue uuid = 1 [ - (protokt.property).wrap = "java.util.UUID" + (protokt.v1.property).wrap = "java.util.UUID" ]; // or: optional bytes optional_uuid = 2 [ - (protokt.property).wrap = "java.util.UUID" + (protokt.v1.property).wrap = "java.util.UUID" ]; ``` @@ -557,15 +625,15 @@ Wrapper types can be repeated: ```protobuf repeated bytes uuid = 1 [ - (protokt.property).wrap = "java.util.UUID" + (protokt.v1.property).wrap = "java.util.UUID" ]; ``` And they can also be used for map keys and values: ```protobuf map map_string_socket_address = 1 [ - (protokt.property).key_wrap = "StringBox", - (protokt.property).value_wrap = "java.net.InetSocketAddress" + (protokt.v1.property).key_wrap = "StringBox", + (protokt.v1.property).value_wrap = "java.net.InetSocketAddress" ]; ``` @@ -575,21 +643,21 @@ be referenced by its fully-qualified name and instead can be referenced by its simple name, as done with `StringBox` in the map example above. _N.b. Well-known type nullability is implemented with -[predefined wrapper types](protokt-core/src/main/kotlin/com/toasttab/protokt) +[predefined wrapper types](protokt-core-lite/src/commonMain/kotlin/com/toasttab/protokt/v1) for each message defined in -[wrappers.proto](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/wrappers.proto)._ +[wrappers.proto](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/wrappers.proto)._ ### Non-null fields If a message has no meaning whatsoever when a particular non-scalar field is missing, you can emulate proto2's `required` key word by using the -`(protokt.property).non_null` option: +`(protokt.v1.property).non_null` option: ```protobuf message Sample {} message NonNullSampleMessage { Sample non_null_sample = 1 [ - (protokt.property).non_null = true + (protokt.v1.property).non_null = true ]; } ``` @@ -602,7 +670,7 @@ Oneof fields can also be declared non-null: ```protobuf message NonNullSampleMessage { oneof non_null_oneof { - option (protokt.oneof).non_null = true; + option (protokt.v1.oneof).non_null = true; string message = 1; } @@ -629,10 +697,10 @@ interface Model { ``` ```protobuf -package com.protokt.sample; +package protokt.sample; message ImplementsSampleMessage { - option (protokt.class).implements = "Model"; + option (protokt.v1.class).implements = "Model"; string id = 1; } @@ -656,10 +724,10 @@ protokt requires no inspection of it: ```protobuf message ImplementsWithDelegate { - option (protokt.class).implements = "Model2 by modelTwo"; + option (protokt.v1.class).implements = "Model2 by modelTwo"; ImplementsModel2 model_two = 1 [ - (protokt.property).non_null = true + (protokt.v1.property).non_null = true ]; } ``` @@ -669,7 +737,7 @@ Note that the `by` clause references the field by its lower camel case name. #### Oneof Fields Oneof fields can declare that they implement an interface with the -`(protokt.oneof).implements` option. Each possible field type of the oneof must +`(protokt.v1.oneof).implements` option. Each possible field type of the oneof must also implement the interface. This allows access of common properties without a `when` statement that always ultimately extracts the same property. @@ -703,12 +771,12 @@ import "protokt/protokt.proto"; message MyObjectWithConfig { bytes id = 1 [ - (protokt.property).wrap = "java.util.UUID" + (protokt.v1.property).wrap = "java.util.UUID" ]; oneof Config { - option (protokt.oneof).non_null = true; - option (protokt.oneof).implements = "Config"; + option (protokt.v1.oneof).non_null = true; + option (protokt.v1.oneof).implements = "Config"; ServerSpecified server_specified = 2; ClientResolved client_resolved = 3; @@ -716,7 +784,7 @@ message MyObjectWithConfig { } message ServerSpecified { - option (protokt.class).implements = "Config"; + option (protokt.v1.class).implements = "Config"; int32 version = 1; @@ -725,14 +793,14 @@ message ServerSpecified { } message ClientResolved { - option (protokt.class).implements = "Config by config"; + option (protokt.v1.class).implements = "Config by config"; ServerSpecified config = 1 [ - (protokt.property).non_null = true + (protokt.v1.property).non_null = true ]; bytes last_known_address = 2 [ - (protokt.property).wrap = "java.net.InetAddress" + (protokt.v1.property).wrap = "java.net.InetAddress" ]; } ``` @@ -793,6 +861,12 @@ fun printVersion(config: MyObjectWithConfig.Config) { } ``` +This configuration is dangerous: since the oneof must be marked non-nullable, you +cannot ABI-compatibly add new implementing fields to a producer before a consumer +is updated with the new generated code. The old consumer will attempt to +deserialize the new field as an unknown field and the non-null assertion on the +oneof field during the constructor call will fail. + ### BytesSlice When reading messages that contain other serialized messages as `bytes` fields, @@ -806,35 +880,31 @@ message SliceModel { int64 version = 1; bytes encoded_message = 2 [ - (protokt.property).bytes_slice = true + (protokt.v1.property).bytes_slice = true ]; } ``` ## gRPC code generation -Protokt will generate code for gRPC method and service descriptors when the -`generateGrpc` option is enabled: +Protokt will generate variations of code for gRPC method and service descriptors +when the gRPC generation options are enabled: ```groovy protokt { - generateGrpc = true + generate { + grpcDescriptors = true + grpcKotlinStubs = true + } } ``` -Protokt will _only_ generate gRPC code with the `onlyGenerateGrpc` option: - -```groovy -protokt { - onlyGenerateGrpc = true -} -``` - -Protokt does not yet generate full client and server stubs. It does generate the -components necessary to integrate with gRPC's Java and Kotlin APIs. +The options can be enabled independently of each other. ### Generated gRPC code +#### `grpcDescriptors` + Consider gRPC's canonical Health service: ```protobuf @@ -885,31 +955,17 @@ object HealthGrpc { ``` Both grpc-java and grpc-kotlin expose server stubs for implementation via -abstract classes. Since protokt does not generate full stubs, it does not -dictate implementation approach. An additional style of implementation via -constructor-injected method implementations is included in the examples below. -These two implementation styles can emulate each other, so the choice of which -to use is perhaps a matter of taste. +abstract classes. -### Integrating with gRPC's Java API +#### `grpcKotlinStubs` and gRPC's Kotlin API -A gRPC service using grpc-java (and therefore using StreamObservers for -asynchronous communication): +Protokt uses `grpc-kotlin` to generate Kotlin coroutine-based stubs that compile +against protokt's generated types. -```kotlin -typealias CheckMethod = UnaryMethod - -class HealthCheckService( - private val check: CheckMethod -) : BindableService { - override fun bindService() = - ServerServiceDefinition.builder(HealthGrpc.serviceDescriptor) - .addMethod(HealthGrpc.checkMethod, asyncUnaryCall(check)) - .build() -} -``` +#### Integrating with gRPC's Java API -Or for the abstract class flavor: +A gRPC service using grpc-java (and therefore using StreamObservers for +asynchronous communication): ```kotlin abstract class HealthCheckService : BindableService { @@ -936,51 +992,15 @@ fun checkHealth(): HealthCheckResponse = ) ``` -### Integrating with gRPC's Kotlin API - -To use the coroutine-based implementations provided by grpc-kotlin: - -```kotlin -typealias CheckMethod = suspend (HealthCheckRequest) -> HealthCheckResponse - -class HealthCheckService( - private val check: CheckMethod -) : AbstractCoroutineServerImpl() { - override fun bindService() = - ServerServiceDefinition.builder(serviceDescriptor) - .addMethod(unaryServerMethodDefinition(context, HealthGrpc.checkMethod, check)) - .build() -} -``` +#### Integrating with gRPC's NodeJS API -Or for the abstract class flavor: +Protokt generates complete server and client stub implementations for use with NodeJS. +The generated implementations are nearly the same as those generated by grpc-kotlin and +are supported by an analogous runtime library in ServerCalls and ClientCalls objects. -```kotlin -abstract class HealthCheckService : AbstractCoroutineServerImpl() { - override fun bindService() = - ServerServiceDefinition.builder(serviceDescriptor) - .addMethod(unaryServerMethodDefinition(context, HealthGrpc.checkMethod, ::check)) - .build() - - open suspend fun check(request: HealthCheckRequest): HealthCheckResponse = - throw UNIMPLEMENTED.asException() -} -``` - -Note that extending AbstractCoroutineServerImpl is not necessary if you provide -a custom CoroutineContext. Instead you can implement BindableService directly as -when implementing a server for grpc-java. - -Calling methods from a client: - -```kotlin -suspend fun checkHealth(): HealthCheckResponse = - ClientCalls.unaryRpc( - channel, - HealthGrpc.checkMethod, - HealthCheckRequest { service = "foo" } - ) -``` +These implementations are alpha-quality and for demonstration only. External contributions +to harden the implementation are welcome. They use the same `grpcDescriptors` and +`grpcKotlinStubs` plugin options to control code generation. ## IntelliJ integration @@ -1040,7 +1060,6 @@ to trigger regeneration of the protobuf files with the fresh plugin. [Ben Gordon](mailto:ben.gordon@toasttab.com), [Andrew Parmet](mailto:andrew.parmet@toasttab.com), [Oleg Golberg](mailto:ogolberg@toasttab.com), -[Patty Neckowicz](mailto:pneckowicz@toasttab.com), [Frank Moda](mailto:frank@toasttab.com) and [everyone in the commit history](../../commits/main). diff --git a/benchmarks/benchmarks-util/build.gradle.kts b/benchmarks/benchmarks-util/build.gradle.kts index 48ad7b615..6bbb2c926 100644 --- a/benchmarks/benchmarks-util/build.gradle.kts +++ b/benchmarks/benchmarks-util/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/benchmarks/benchmarks-util/src/main/kotlin/com/toasttab/protokt/benchmarks/BenchmarkUtils.kt b/benchmarks/benchmarks-util/src/main/kotlin/protokt/v1/benchmarks/BenchmarkUtils.kt similarity index 59% rename from benchmarks/benchmarks-util/src/main/kotlin/com/toasttab/protokt/benchmarks/BenchmarkUtils.kt rename to benchmarks/benchmarks-util/src/main/kotlin/protokt/v1/benchmarks/BenchmarkUtils.kt index 38dc88f27..3b82b9c44 100644 --- a/benchmarks/benchmarks-util/src/main/kotlin/com/toasttab/protokt/benchmarks/BenchmarkUtils.kt +++ b/benchmarks/benchmarks-util/src/main/kotlin/protokt/v1/benchmarks/BenchmarkUtils.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * limitations under the License. */ -package com.toasttab.protokt.benchmarks +package protokt.v1.benchmarks import org.openjdk.jmh.results.format.ResultFormatType import org.openjdk.jmh.runner.Runner @@ -21,15 +21,17 @@ import org.openjdk.jmh.runner.options.OptionsBuilder import java.io.File import kotlin.reflect.KClass -fun readData(dataset: String) = File("../build/datasets/dataset-$dataset").inputStream().buffered() +fun readData(dataset: String) = + File("../build/datasets/dataset-$dataset").inputStream().buffered() -fun run(self: KClass<*>) = Runner( - OptionsBuilder() - .include(".*" + self.simpleName + ".*") - .warmupIterations(1) - .measurementIterations(5) - .forks(1) - .resultFormat(ResultFormatType.JSON) - .result("../build/jmh-${self.simpleName}.json") - .build() -).run() +fun run(self: KClass<*>) = + Runner( + OptionsBuilder() + .include(".*" + self.simpleName + ".*") + .warmupIterations(1) + .measurementIterations(5) + .forks(1) + .resultFormat(ResultFormatType.JSON) + .result("../build/jmh-${self.simpleName}.json") + .build() + ).run() diff --git a/benchmarks/build.gradle.kts b/benchmarks/build.gradle.kts index 22b78cbd5..2b24545fd 100644 --- a/benchmarks/build.gradle.kts +++ b/benchmarks/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,25 +16,25 @@ import de.undercouch.gradle.tasks.download.Download plugins { - id("de.undercouch.download") + alias(libs.plugins.download) } -val archive = file("$buildDir/datasets-${versions.datasets}.zip") +val archive = layout.buildDirectory.file("datasets-${libs.versions.datasets.get()}.zip") tasks.register("download") { - enabled = !archive.exists() + enabled = !archive.get().asFile.exists() - src("https://proto-benchmarks.s3.amazonaws.com/datasets-${versions.datasets}.zip") + src("https://proto-benchmarks.s3.amazonaws.com/datasets-${libs.versions.datasets.get()}.zip") tempAndMove(true) - dest(buildDir) + dest(layout.buildDirectory) } tasks.register("datasets") { dependsOn("download") - enabled = !archive.exists() + enabled = !archive.get().asFile.exists() from(zipTree(archive)) - into(file("$buildDir/datasets")) + into(layout.buildDirectory.file("datasets")) } tasks.register("run") { diff --git a/benchmarks/protobuf-java-benchmarks/build.gradle.kts b/benchmarks/protobuf-java-benchmarks/build.gradle.kts index 8b2d3037b..900136921 100644 --- a/benchmarks/protobuf-java-benchmarks/build.gradle.kts +++ b/benchmarks/protobuf-java-benchmarks/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,20 +19,16 @@ plugins { application } +defaultProtoc() + configure { - mainClassName = "com.toasttab.protokt.benchmarks.ProtobufBenchmarksKt" + mainClass.set("com.toasttab.protokt.benchmarks.ProtobufBenchmarksKt") executableDir = ".." } -protobuf { - protoc { - artifact = libraries.protoc - } -} - dependencies { implementation(project(":benchmarks:benchmarks-util")) - implementation(libraries.protobufJava) + implementation(libs.protobuf.java) protobuf(project(":benchmarks:schema")) } diff --git a/benchmarks/protobuf-java-benchmarks/src/main/kotlin/com/toasttab/protokt/benchmarks/ProtobufBenchmarks.kt b/benchmarks/protobuf-java-benchmarks/src/main/kotlin/protokt/v1/benchmarks/ProtobufBenchmarks.kt similarity index 96% rename from benchmarks/protobuf-java-benchmarks/src/main/kotlin/com/toasttab/protokt/benchmarks/ProtobufBenchmarks.kt rename to benchmarks/protobuf-java-benchmarks/src/main/kotlin/protokt/v1/benchmarks/ProtobufBenchmarks.kt index 220816b57..8dcd8c698 100644 --- a/benchmarks/protobuf-java-benchmarks/src/main/kotlin/com/toasttab/protokt/benchmarks/ProtobufBenchmarks.kt +++ b/benchmarks/protobuf-java-benchmarks/src/main/kotlin/protokt/v1/benchmarks/ProtobufBenchmarks.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,9 +13,10 @@ * limitations under the License. */ -package com.toasttab.protokt.benchmarks +package protokt.v1.benchmarks import com.google.protobuf.benchmarks.Benchmarks +import com.toasttab.protokt.v1.benchmarks.GenericMessage import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.BenchmarkMode import org.openjdk.jmh.annotations.Mode diff --git a/benchmarks/protokt-benchmarks/build.gradle.kts b/benchmarks/protokt-benchmarks/build.gradle.kts index e22ae6221..846fd721b 100644 --- a/benchmarks/protokt-benchmarks/build.gradle.kts +++ b/benchmarks/protokt-benchmarks/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ plugins { localProtokt() configure { - mainClass.set("com.toasttab.protokt.benchmarks.ProtoktBenchmarksKt") + mainClass.set("protokt.v1.benchmarks.ProtoktBenchmarksKt") executableDir = ".." } @@ -31,8 +31,9 @@ dependencies { protobuf(project(":benchmarks:schema")) implementation(kotlin("reflect")) - implementation(libraries.protobufJava) implementation(project(":benchmarks:benchmarks-util")) + + runtimeOnly(libs.protobuf.java) } tasks.named("run") { diff --git a/benchmarks/protokt-benchmarks/src/main/kotlin/com/toasttab/protokt/benchmarks/generator/FixtureGenerator.kt b/benchmarks/protokt-benchmarks/src/main/kotlin/protokt/v1/benchmarks/FixtureGenerator.kt similarity index 82% rename from benchmarks/protokt-benchmarks/src/main/kotlin/com/toasttab/protokt/benchmarks/generator/FixtureGenerator.kt rename to benchmarks/protokt-benchmarks/src/main/kotlin/protokt/v1/benchmarks/FixtureGenerator.kt index 7f13ba1eb..a7590bdce 100644 --- a/benchmarks/protokt-benchmarks/src/main/kotlin/com/toasttab/protokt/benchmarks/generator/FixtureGenerator.kt +++ b/benchmarks/protokt-benchmarks/src/main/kotlin/protokt/v1/benchmarks/FixtureGenerator.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,15 +13,10 @@ * limitations under the License. */ -package com.toasttab.protokt.benchmarks.generator +package protokt.v1.benchmarks -import com.google.protobuf.CodedOutputStream -import com.toasttab.protokt.benchmarks.BenchmarkDataset -import com.toasttab.protokt.benchmarks.GenericMessage1 -import com.toasttab.protokt.benchmarks.GenericMessage4 -import com.toasttab.protokt.rt.Bytes -import com.toasttab.protokt.rt.KtMessage -import com.toasttab.protokt.rt.serializer +import protokt.v1.Bytes +import protokt.v1.KtMessage import java.io.File import java.lang.IllegalArgumentException import java.security.SecureRandom @@ -42,8 +37,7 @@ class MessageScalarType(val ktType: KClass) : ScalarType() internal object TypeInspector { fun type(prop: KType): FieldType { - val propType = prop.classifier as KClass<*> - return when (propType) { + return when (val propType = prop.classifier as KClass<*>) { List::class -> RepeatedFieldType(scalarType(typeParam(prop, 0))) Map::class -> MapFieldType(scalarType(typeParam(prop, 0)), scalarType(typeParam(prop, 1))) else -> ScalarFieldType(scalarType(propType)) @@ -72,7 +66,7 @@ class FixtureGenerator(private val weight: Int) { is MapFieldType -> (0..randomSize()).associate { randomValue(fieldType.keyType) to randomValue(fieldType.valueType) } } - fun randomValue(scalarType: ScalarType): Any? = + fun randomValue(scalarType: ScalarType): Any = when (scalarType) { is PrimitiveScalarType -> randomPrimitiveValue(scalarType.ktType) is MessageScalarType -> randomMessageValue(scalarType.ktType) @@ -80,14 +74,17 @@ class FixtureGenerator(private val weight: Int) { fun randomMessageValue(cls: KClass): KtMessage { val params = cls.primaryConstructor!!.parameters.associateWith { p -> - if (p.name == "unknown") emptyMap() - else randomValue(TypeInspector.type(p.type)) + if (p.name == "unknown") { + emptyMap() + } else { + randomValue(TypeInspector.type(p.type)) + } } return cls.primaryConstructor!!.callBy(params) } - fun randomPrimitiveValue(cls: KClass<*>): Any? = + fun randomPrimitiveValue(cls: KClass<*>): Any = when (cls) { Int::class -> random.nextInt() Long::class -> random.nextLong() @@ -112,11 +109,7 @@ class FixtureGenerator(private val weight: Int) { } fun KtMessage.writeToFile(file: String) { - File(file).outputStream().buffered().use { - CodedOutputStream.newInstance(it).apply { - serialize(serializer(this)) - } - } + File(file).outputStream().buffered().use { serialize(it) } } fun main() { diff --git a/benchmarks/protokt-benchmarks/src/main/kotlin/com/toasttab/protokt/benchmarks/ProtoktBenchmarks.kt b/benchmarks/protokt-benchmarks/src/main/kotlin/protokt/v1/benchmarks/ProtoktBenchmarks.kt similarity index 79% rename from benchmarks/protokt-benchmarks/src/main/kotlin/com/toasttab/protokt/benchmarks/ProtoktBenchmarks.kt rename to benchmarks/protokt-benchmarks/src/main/kotlin/protokt/v1/benchmarks/ProtoktBenchmarks.kt index 853cd2141..876defece 100644 --- a/benchmarks/protokt-benchmarks/src/main/kotlin/com/toasttab/protokt/benchmarks/ProtoktBenchmarks.kt +++ b/benchmarks/protokt-benchmarks/src/main/kotlin/protokt/v1/benchmarks/ProtoktBenchmarks.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,10 +13,8 @@ * limitations under the License. */ -package com.toasttab.protokt.benchmarks +package protokt.v1.benchmarks -import com.google.protobuf.CodedInputStream -import com.toasttab.protokt.rt.deserializer import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.BenchmarkMode import org.openjdk.jmh.annotations.Mode @@ -43,17 +41,17 @@ open class ProtoktBenchmarks { @Setup fun setup() { readData("large").use { stream -> - largeDataset = BenchmarkDataset.deserialize(deserializer(CodedInputStream.newInstance(stream))) + largeDataset = BenchmarkDataset.deserialize(stream) } largeParsedDataset = largeDataset.payload.map { GenericMessage1.deserialize(it) } readData("medium").use { stream -> - mediumDataset = BenchmarkDataset.deserialize(deserializer(CodedInputStream.newInstance(stream))) + mediumDataset = BenchmarkDataset.deserialize(stream) } mediumParsedDataset = mediumDataset.payload.map { GenericMessage1.deserialize(it) } readData("small").use { stream -> - smallDataset = BenchmarkDataset.deserialize(deserializer(CodedInputStream.newInstance(stream))) + smallDataset = BenchmarkDataset.deserialize(stream) } smallParsedDataset = smallDataset.payload.map { GenericMessage4.deserialize(it) } } @@ -61,21 +59,21 @@ open class ProtoktBenchmarks { @Benchmark fun deserializeLargeFromMemory(bh: Blackhole) { largeDataset.payload.forEach { bytes -> - bh.consume(GenericMessage1.deserialize(deserializer(bytes))) + bh.consume(GenericMessage1.deserialize(bytes)) } } @Benchmark fun deserializeMediumFromMemory(bh: Blackhole) { mediumDataset.payload.forEach { bytes -> - bh.consume(GenericMessage1.deserialize(deserializer(bytes))) + bh.consume(GenericMessage1.deserialize(bytes)) } } @Benchmark fun deserializeSmallFromMemory(bh: Blackhole) { smallDataset.payload.forEach { bytes -> - bh.consume(GenericMessage4.deserialize(deserializer(bytes))) + bh.consume(GenericMessage4.deserialize(bytes)) } } diff --git a/benchmarks/schema/build.gradle.kts b/benchmarks/schema/build.gradle.kts index 48ad7b615..6bbb2c926 100644 --- a/benchmarks/schema/build.gradle.kts +++ b/benchmarks/schema/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/benchmarks/schema/src/main/resources/schema/generic_message.proto b/benchmarks/schema/src/main/resources/schema/generic_message.proto index 0b1d164ef..686de6a11 100644 --- a/benchmarks/schema/src/main/resources/schema/generic_message.proto +++ b/benchmarks/schema/src/main/resources/schema/generic_message.proto @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,9 @@ syntax = "proto3"; -package com.toasttab.protokt.benchmarks; +package protokt.v1.benchmarks; -option java_package = "com.toasttab.protokt.benchmarks"; +option java_package = "com.toasttab.protokt.v1.benchmarks"; message GenericMessage1 { string field_string1 = 1; diff --git a/benchmarks/wire-benchmarks/build.gradle.kts b/benchmarks/wire-benchmarks/build.gradle.kts index 94c1368c2..0aff7aabf 100644 --- a/benchmarks/wire-benchmarks/build.gradle.kts +++ b/benchmarks/wire-benchmarks/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,25 +13,12 @@ * limitations under the License. */ -import com.squareup.wire.gradle.WireExtension - -buildscript { - repositories { - mavenCentral() - } - - dependencies { - classpath(libraries.wireGradle) - } -} - plugins { id("protokt.benchmarks-conventions") application + alias(libs.plugins.wire) } -apply(plugin = "com.squareup.wire") - application { mainClass.set("com.toasttab.protokt.benchmarks.WireBenchmarksKt") executableDir = ".." @@ -39,20 +26,20 @@ application { dependencies { implementation(project(":benchmarks:benchmarks-util")) - implementation(libraries.wireRuntime) + implementation(libs.wireRuntime) } -configure { +wire { sourcePath("../schema/src/main/resources") kotlin { - out = "$buildDir/generated-sources/proto/main/java" + out = layout.buildDirectory.file("generated-sources/proto/main/java").get().asFile.absolutePath } } sourceSets { main { - java.srcDirs.add(file("$buildDir/generated-sources/proto/main/java")) + java.srcDir(layout.buildDirectory.file("generated-sources/proto/main/java")) } } diff --git a/benchmarks/wire-benchmarks/src/main/kotlin/com/toasttab/protokt/benchmarks/WireBenchmarks.kt b/benchmarks/wire-benchmarks/src/main/kotlin/protokt/v1/benchmarks/WireBenchmarks.kt similarity index 94% rename from benchmarks/wire-benchmarks/src/main/kotlin/com/toasttab/protokt/benchmarks/WireBenchmarks.kt rename to benchmarks/wire-benchmarks/src/main/kotlin/protokt/v1/benchmarks/WireBenchmarks.kt index 4a1f59671..bf09bbc4a 100644 --- a/benchmarks/wire-benchmarks/src/main/kotlin/com/toasttab/protokt/benchmarks/WireBenchmarks.kt +++ b/benchmarks/wire-benchmarks/src/main/kotlin/protokt/v1/benchmarks/WireBenchmarks.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,9 +13,11 @@ * limitations under the License. */ -package com.toasttab.protokt.benchmarks +package protokt.v1.benchmarks import com.google.protobuf.benchmarks.BenchmarkDataset +import com.toasttab.protokt.v1.benchmarks.GenericMessage1 +import com.toasttab.protokt.v1.benchmarks.GenericMessage4 import org.openjdk.jmh.annotations.Benchmark import org.openjdk.jmh.annotations.BenchmarkMode import org.openjdk.jmh.annotations.Mode diff --git a/build.gradle.kts b/build.gradle.kts index 545f6f9fd..733345a94 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,9 +13,7 @@ * limitations under the License. */ -allprojects { - group = "com.toasttab.protokt" - lint() +plugins { + id("protokt.common-conventions") + id("protokt.spotless-conventions") } - -promoteStagingRepo() diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 673cf541a..2df41b5e4 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,23 +15,30 @@ plugins { `kotlin-dsl` + alias(libs.plugins.buildConfig) +} + +buildConfig { + useKotlinOutput { topLevelConstants = true } + packageName.set("protokt.v1.gradle") + buildConfigField("String", "DEFAULT_PROTOBUF_VERSION", "\"${libs.versions.protobuf.java.get()}\"") + buildConfigField("String", "PROTOKT_VERSION", "\"$version\"") } repositories { + mavenCentral() gradlePluginPortal() google() - mavenCentral() } dependencies { - implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21") - implementation("com.android.tools.build:gradle:4.1.0") - - implementation("com.diffplug.spotless:spotless-plugin-gradle:6.5.2") - implementation("com.google.protobuf:protobuf-gradle-plugin:0.9.1") - implementation("io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0") - implementation("com.google.guava:guava:31.1-jre") - implementation("ru.vyarus:gradle-animalsniffer-plugin:1.5.4") - implementation("org.jetbrains.kotlinx:binary-compatibility-validator:0.8.0") + implementation(libs.androidGradlePlugin) + implementation(libs.animalSnifferGradlePlugin) + implementation(libs.binaryCompatibilityValidator) + implementation(libs.gradleMavenPublishPlugin) + implementation(libs.kotlinGradlePlugin) + implementation(libs.protobuf.gradlePlugin) + implementation(libs.spotlessGradlePlugin) implementation(kotlin("gradle-plugin-api")) + implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location)) } diff --git a/buildSrc/semantic-build-versioning.gradle b/buildSrc/semantic-build-versioning.gradle new file mode 120000 index 000000000..82b3e275c --- /dev/null +++ b/buildSrc/semantic-build-versioning.gradle @@ -0,0 +1 @@ +../semantic-build-versioning.gradle \ No newline at end of file diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts new file mode 100644 index 000000000..2cf48dcbd --- /dev/null +++ b/buildSrc/settings.gradle.kts @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +buildscript { + repositories { + maven(url = "https://repo1.maven.org/maven2") + gradlePluginPortal() + } + dependencies { + classpath("gradle.plugin.net.vivin:gradle-semantic-build-versioning:4.0.0") + } +} + +apply(plugin = "net.vivin.gradle-semantic-build-versioning") + +dependencyResolutionManagement { + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} diff --git a/buildSrc/src/main/kotlin/AndroidCompatibility.kt b/buildSrc/src/main/kotlin/AndroidCompatibility.kt index b925aaaf2..785a12fff 100644 --- a/buildSrc/src/main/kotlin/AndroidCompatibility.kt +++ b/buildSrc/src/main/kotlin/AndroidCompatibility.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt deleted file mode 100644 index bb4f6e740..000000000 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import com.toasttab.protokt.gradle.DEFAULT_PROTOBUF_VERSION - -object versions { - const val arrow = "1.1.3" - const val autoService = "1.0.1" - const val grpc = "1.49.1" - const val grpcKotlin = "1.3.0" - const val kotlinPoet = "1.12.0" - const val kotlinxCollections = "0.3.5" - const val kotlinxCoroutines = "1.6.4" - const val protobuf = DEFAULT_PROTOBUF_VERSION - const val protobufPlugin = "0.9.4" - - // Test - const val jackson = "2.13.0" - const val junit = "5.8.2" - const val truth = "1.1.3" - - // Benchmarks - const val datasets = "0.1.0" - const val jmh = "1.26" - const val wire = "4.2.0" - - // Third Party - const val protoGoogleCommonProtos = "2.8.2" -} - -object libraries { - const val arrow = "io.arrow-kt:arrow-core:${versions.arrow}" - - const val autoService = "com.google.auto.service:auto-service:${versions.autoService}" - const val autoServiceAnnotations = "com.google.auto.service:auto-service-annotations:${versions.autoService}" - - const val grpcKotlin = "io.grpc:grpc-kotlin-stub:${versions.grpcKotlin}" - const val grpcKotlinGenerator = "io.grpc:protoc-gen-grpc-kotlin:${versions.grpcKotlin}:jdk8@jar" - const val grpcNetty = "io.grpc:grpc-netty:${versions.grpc}" - const val grpcStub = "io.grpc:grpc-stub:${versions.grpc}" - - const val kotlinPoet = "com.squareup:kotlinpoet:${versions.kotlinPoet}" - const val kotlinxCollections = "org.jetbrains.kotlinx:kotlinx-collections-immutable:${versions.kotlinxCollections}" - const val kotlinxCoroutinesCore = "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.kotlinxCoroutines}" - - const val protobufPlugin = "com.google.protobuf:protobuf-gradle-plugin:${versions.protobufPlugin}" - const val protobufJava = "com.google.protobuf:protobuf-java:${versions.protobuf}" - const val protobufLite = "com.google.protobuf:protobuf-javalite:${versions.protobuf}" - const val protoc = "com.google.protobuf:protoc:${versions.protobuf}" - - // Test - const val jackson = "com.fasterxml.jackson.module:jackson-module-kotlin:${versions.jackson}" - const val junit = "org.junit.jupiter:junit-jupiter:${versions.junit}" - const val truth = "com.google.truth:truth:${versions.truth}" - - // Benchmarks - const val jmhCore = "org.openjdk.jmh:jmh-core:${versions.jmh}" - const val jmhGenerator = "org.openjdk.jmh:jmh-generator-annprocess:${versions.jmh}" - - const val wireGradle = "com.squareup.wire:wire-gradle-plugin:${versions.wire}" - const val wireRuntime = "com.squareup.wire:wire-runtime:${versions.wire}" - - // Third Party - const val protoGoogleCommonProtos = "com.google.api.grpc:proto-google-common-protos:${versions.protoGoogleCommonProtos}" -} diff --git a/buildSrc/src/main/kotlin/DependencyUtils.kt b/buildSrc/src/main/kotlin/DependencyUtils.kt new file mode 100644 index 000000000..2ddbbc395 --- /dev/null +++ b/buildSrc/src/main/kotlin/DependencyUtils.kt @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import com.google.protobuf.gradle.ProtobufExtension +import com.google.protobuf.gradle.protobuf +import org.gradle.accessors.dm.LibrariesForLibs +import org.gradle.api.Project +import org.gradle.api.artifacts.MinimalExternalModuleDependency +import org.gradle.api.provider.Provider +import org.gradle.kotlin.dsl.configure +import org.gradle.kotlin.dsl.dependencies +import org.gradle.kotlin.dsl.exclude +import org.gradle.kotlin.dsl.the + +val Project.libs + get() = the() + +fun Project.protobufExcludingProtobufJava(dependency: Provider) { + dependencies { + protobuf(dependency.get().toString()) { + exclude(group = "com.google.protobuf", module = "protobuf-java") + } + } +} + +fun Project.defaultProtoc() { + configure { + protoc { + artifact = libs.protoc.get().toString() + } + } +} diff --git a/buildSrc/src/main/kotlin/JavaBasedProjectConventions.kt b/buildSrc/src/main/kotlin/JavaBasedProjectConventions.kt index d89d9d164..5adbdb40b 100644 --- a/buildSrc/src/main/kotlin/JavaBasedProjectConventions.kt +++ b/buildSrc/src/main/kotlin/JavaBasedProjectConventions.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,14 +13,14 @@ * limitations under the License. */ -import org.gradle.api.JavaVersion import org.gradle.api.Project import org.gradle.api.plugins.JavaPluginExtension import org.gradle.api.tasks.testing.Test -import org.gradle.kotlin.dsl.configure +import org.gradle.jvm.toolchain.JavaLanguageVersion import org.gradle.kotlin.dsl.dependencies import org.gradle.kotlin.dsl.kotlin import org.gradle.kotlin.dsl.repositories +import org.gradle.kotlin.dsl.the import org.gradle.kotlin.dsl.withType import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -30,19 +30,15 @@ fun Project.javaBasedProjectConventions() { } dependencies { - "api"(kotlin("stdlib", "1.5.32")) + "api"(kotlin("stdlib")) - "testImplementation"(libraries.junit) - "testImplementation"(libraries.truth) + "testImplementation"(libs.junit.jupiter) + "testImplementation"(libs.truth) } tasks.withType { kotlinOptions { allWarningsAsErrors = true - jvmTarget = "1.8" - freeCompilerArgs = listOf("-Xinline-classes") - languageVersion = "1.5" - apiVersion = "1.5" } } @@ -50,8 +46,7 @@ fun Project.javaBasedProjectConventions() { useJUnitPlatform() } - configure { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + the().toolchain { + languageVersion.set(JavaLanguageVersion.of(libs.versions.java.get().toInt())) } } diff --git a/buildSrc/src/main/kotlin/KotlinApiCompatibility.kt b/buildSrc/src/main/kotlin/KotlinApiCompatibility.kt index 8886c3361..1698dbe09 100644 --- a/buildSrc/src/main/kotlin/KotlinApiCompatibility.kt +++ b/buildSrc/src/main/kotlin/KotlinApiCompatibility.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/buildSrc/src/main/kotlin/Lint.kt b/buildSrc/src/main/kotlin/Lint.kt deleted file mode 100644 index 9f54c017d..000000000 --- a/buildSrc/src/main/kotlin/Lint.kt +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2020 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import com.diffplug.gradle.spotless.SpotlessExtension -import org.gradle.api.Project -import org.gradle.kotlin.dsl.apply -import org.gradle.kotlin.dsl.configure -import org.gradle.kotlin.dsl.repositories - -fun Project.lint() { - apply(plugin = "com.diffplug.spotless") - - repositories { - mavenCentral() - } - - configure { - kotlin { - ktlint() - target("**/*.kt") - targetExclude("**/generated-sources/**") - targetExclude("**/generated/source/**") - } - - kotlinGradle { - ktlint() - } - } -} diff --git a/buildSrc/src/main/kotlin/LocalProtoktBuild.kt b/buildSrc/src/main/kotlin/LocalProtoktBuild.kt index 7c5a96520..e77dcc141 100644 --- a/buildSrc/src/main/kotlin/LocalProtoktBuild.kt +++ b/buildSrc/src/main/kotlin/LocalProtoktBuild.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,16 @@ */ import com.google.protobuf.gradle.GenerateProtoTask -import com.toasttab.protokt.gradle.CODEGEN_NAME -import com.toasttab.protokt.gradle.configureProtokt import org.gradle.api.Project import org.gradle.api.tasks.SourceSetContainer import org.gradle.api.tasks.compile.JavaCompile import org.gradle.kotlin.dsl.get import org.gradle.kotlin.dsl.the import org.gradle.kotlin.dsl.withType +import org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsTargetDsl +import protokt.v1.gradle.CODEGEN_NAME +import protokt.v1.gradle.configureProtokt +import java.io.File fun Project.localProtokt() { configureProtokt(this, null) { @@ -35,10 +37,10 @@ fun Project.localProtokt() { } } -fun Project.includeCommonGradleSource(filePattern: String) { +fun Project.includeBuildSrc(vararg filePatterns: String) { the()["main"].java { srcDir(rootProject.file("buildSrc/src/main/kotlin")) - include("com/toasttab/protokt/gradle/$filePattern") + filePatterns.forEach { include(it) } } } @@ -47,3 +49,28 @@ fun Project.pureKotlin() { enabled = false } } + +fun Project.liteOptionTestSourceDir(): File { + val dir = rootProject.file("testing/plugin-options/lite/src/test/kotlin/protokt/v1/testing/lite") + check(dir.exists()) + check(dir.isDirectory) + return dir +} + +fun KotlinJsTargetDsl.configureJsTests() { + browser { + testTask { + useKarma { + useFirefoxHeadless() + } + } + } + + nodejs { + testTask { + useMocha() + } + } + + useCommonJs() +} diff --git a/buildSrc/src/main/kotlin/RemotePublishing.kt b/buildSrc/src/main/kotlin/RemotePublishing.kt index 6be98a125..980eb2dfa 100644 --- a/buildSrc/src/main/kotlin/RemotePublishing.kt +++ b/buildSrc/src/main/kotlin/RemotePublishing.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,17 +13,18 @@ * limitations under the License. */ -import io.codearte.gradle.nexus.NexusStagingExtension +import com.vanniktech.maven.publish.JavadocJar +import com.vanniktech.maven.publish.KotlinJvm +import com.vanniktech.maven.publish.KotlinMultiplatform +import com.vanniktech.maven.publish.MavenPublishBaseExtension +import com.vanniktech.maven.publish.SonatypeHost import org.gradle.api.Project -import org.gradle.api.plugins.JavaPluginExtension import org.gradle.api.publish.PublishingExtension import org.gradle.api.publish.maven.MavenPublication import org.gradle.api.publish.maven.tasks.PublishToMavenRepository import org.gradle.jvm.tasks.Jar import org.gradle.kotlin.dsl.apply import org.gradle.kotlin.dsl.configure -import org.gradle.kotlin.dsl.create -import org.gradle.kotlin.dsl.register import org.gradle.kotlin.dsl.the import org.gradle.kotlin.dsl.withType import org.gradle.plugins.signing.SigningExtension @@ -38,102 +39,63 @@ private object Pgp { } } -private object Remote { - val username by lazy { - System.getenv("OSSRH_USERNAME") - } - - val password by lazy { - System.getenv("OSSRH_PASSWORD") - } - - val url = "https://oss.sonatype.org/service/local/staging/deploy/maven2" -} - object ProtoktProjectInfo { const val name = "Protokt" const val url = "https://github.com/open-toast/protokt" const val description = "Protobuf compiler and runtime for Kotlin" } -fun MavenPublication.standardPom() { - pom { - name.set(ProtoktProjectInfo.name) - description.set(ProtoktProjectInfo.description) - url.set(ProtoktProjectInfo.url) - scm { - url.set(ProtoktProjectInfo.url) - } - licenses { - license { - name.set("The Apache License, Version 2.0") - url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") - } - } - developers { - developer { - id.set("Toast") - name.set("Toast Open Source") - email.set("opensource@toasttab.com") - } - } - } -} - fun Project.isRelease() = !version.toString().endsWith("-SNAPSHOT") fun Project.enablePublishing(defaultJars: Boolean = true) { - apply(plugin = "maven-publish") + apply(plugin = "com.vanniktech.maven.publish.base") configure { repositories { maven { name = "integration" - setUrl("${project.rootProject.buildDir}/repos/integration") - } - - if (isRelease()) { - maven { - name = "remote" - setUrl(Remote.url) - credentials { - username = Remote.username - password = Remote.password - } - } + setUrl("${project.rootProject.layout.buildDirectory.get()}/repos/integration") } } } if (defaultJars) { - configure { - withSourcesJar() + configure { + pluginManager.withPlugin("org.jetbrains.kotlin.mpp") { + configure(KotlinMultiplatform(JavadocJar.Empty())) + } + pluginManager.withPlugin("org.jetbrains.kotlin.jvm") { + configure(KotlinJvm(JavadocJar.Javadoc())) + } + publishToMavenCentral(SonatypeHost.DEFAULT) + pom { + name.set(ProtoktProjectInfo.name) + description.set(ProtoktProjectInfo.description) + url.set(ProtoktProjectInfo.url) + scm { url.set(ProtoktProjectInfo.url) } + licenses { + license { + name.set("The Apache License, Version 2.0") + url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") + } + } + developers { + developer { + id.set("Toast") + name.set("Toast Open Source") + email.set("opensource@toasttab.com") + } + } + } } afterEvaluate { if (tasks.findByName("generateProto") != null) { - tasks.named("sourcesJar").configure { + tasks.withType { dependsOn("generateProto") } } } - - tasks.register("javadocJar") { - from("$rootDir/README.md") - archiveClassifier.set("javadoc") - } - - configure { - publications { - create("sources") { - from(components.getByName("java")) - artifact(tasks.getByName("javadocJar")) - artifactId = project.name - version = "${project.version}" - groupId = "$group" - } - } - } } if (isRelease()) { @@ -142,10 +104,10 @@ fun Project.enablePublishing(defaultJars: Boolean = true) { configure { useInMemoryPgpKeys(Pgp.key, Pgp.password) - project.the().publications.withType { - standardPom() - sign(this) - } + the() + .publications + .withType() + .forEach(::sign) } } @@ -160,34 +122,4 @@ fun Project.enablePublishing(defaultJars: Boolean = true) { } ) } - - tasks.register("publishToRemote") { - enabled = isRelease() - group = "publishing" - - if (enabled) { - val publishingExtension = project.the() - - dependsOn( - tasks.withType().matching { - it.repository == publishingExtension.repositories.getByName("remote") - } - ) - } - } -} - -fun Project.promoteStagingRepo() { - if (isRelease()) { - apply(plugin = "io.codearte.nexus-staging") - - configure { - username = Remote.username - password = Remote.password - packageGroup = "com.toasttab" - numberOfRetries = 50 - } - } else { - tasks.register("closeAndReleaseRepository") - } } diff --git a/buildSrc/src/main/kotlin/com/google/protobuf/gradle/GenerateProtoTaskExt.kt b/buildSrc/src/main/kotlin/com/google/protobuf/gradle/GenerateProtoTaskExt.kt new file mode 100644 index 000000000..7f73f1015 --- /dev/null +++ b/buildSrc/src/main/kotlin/com/google/protobuf/gradle/GenerateProtoTaskExt.kt @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.protobuf.gradle + +internal val GenerateProtoTask.outputSourceDirectoriesHack + get() = outputSourceDirectories diff --git a/buildSrc/src/main/kotlin/com/toasttab/protokt/gradle/ProtoktBuild.kt b/buildSrc/src/main/kotlin/com/toasttab/protokt/gradle/ProtoktBuild.kt deleted file mode 100644 index a879c142f..000000000 --- a/buildSrc/src/main/kotlin/com/toasttab/protokt/gradle/ProtoktBuild.kt +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.gradle - -import org.gradle.api.Project -import org.gradle.api.artifacts.Dependency -import org.gradle.kotlin.dsl.create -import org.gradle.kotlin.dsl.project -import org.gradle.kotlin.dsl.the - -const val CODEGEN_NAME = "protoc-gen-protokt" - -const val EXTENSIONS = "protoktExtensions" - -const val TEST_EXTENSIONS = "testProtoktExtensions" - -fun configureProtokt(project: Project, protoktVersion: String?, resolveBinary: () -> String) { - project.createExtensionConfigurations() - - val ext = project.extensions.create("protokt") - - configureProtobufPlugin(project, ext, resolveBinary()) - - // must wait for extension to resolve - project.afterEvaluate { - project.configurations.named(EXTENSIONS) { - project.resolveProtoktCoreDep(protoktVersion)?.let(dependencies::add) - } - } -} - -private fun Project.createExtensionConfigurations() { - val extensionsConfiguration = configurations.create(EXTENSIONS) - val testExtensionsConfiguration = configurations.create(TEST_EXTENSIONS) - - configurations.getByName("api").extendsFrom(extensionsConfiguration) - configurations.getByName("testApi").extendsFrom(testExtensionsConfiguration) -} - -internal fun Project.resolveProtoktCoreDep(protoktVersion: String?): Dependency? { - if (name in setOf("protokt-core", "protokt-core-lite")) { - return null - } - - val artifactId = - if (the().lite) { - "protokt-core-lite" - } else { - "protokt-core" - } - - return if (protoktVersion == null) { - dependencies.project(":$artifactId") - } else { - dependencies.create("com.toasttab.protokt:$artifactId:$protoktVersion") - } -} diff --git a/buildSrc/src/main/kotlin/com/toasttab/protokt/gradle/ProtoktExtension.kt b/buildSrc/src/main/kotlin/com/toasttab/protokt/gradle/ProtoktExtension.kt deleted file mode 100644 index ef64bd484..000000000 --- a/buildSrc/src/main/kotlin/com/toasttab/protokt/gradle/ProtoktExtension.kt +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.gradle - -const val DEFAULT_PROTOBUF_VERSION = "3.21.7" - -const val MANIFEST_VERSION_PROPERTY = "Implementation-Version" - -const val KOTLIN_EXTRA_CLASSPATH = "kotlin_extra_classpath" -const val RESPECT_JAVA_PACKAGE = "respect_java_package" -const val GENERATE_GRPC = "generate_grpc" -const val ONLY_GENERATE_GRPC = "only_generate_grpc" -const val LITE = "lite" -const val ONLY_GENERATE_DESCRIPTORS = "only_generate_descriptors" - -open class ProtoktExtension { - /** - * The version of protobuf to use for compilation - */ - var protocVersion = DEFAULT_PROTOBUF_VERSION - - /** - * Whether to respect protobuf's `java_package` option while generating code - */ - var respectJavaPackage = true - - /** - * Whether to generate gRPC-specific code such as MethodDescriptors and - * ServiceDescriptors. If enabled, the project will have to import gRPC's - * stub dependency to compile. - */ - var generateGrpc = false - - /** - * Whether to _only_ generate gRPC-specific code. Useful to generate - * libraries that have already had a version compiled with `generateGrpc` - * set to `false`. - */ - var onlyGenerateGrpc = false - - /** - * Whether to generate embedded descriptors for runtime reflective - * access. Beware: if this option is enabled and any generated file depends - * on a file generated in a different run of the code generator in which - * this option was not enabled, the generated code will fail to compile. - */ - var lite = false - - /** - * Whether to _only_ generate descriptor code. Useful to generate - * libraries that have already had a version compiled with `lite` - * set to `true`. - */ - var onlyGenerateDescriptors = false -} diff --git a/buildSrc/src/main/kotlin/protokt.android-conventions.gradle.kts b/buildSrc/src/main/kotlin/protokt.android-conventions.gradle.kts index 049e2cd4d..618f87371 100644 --- a/buildSrc/src/main/kotlin/protokt.android-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/protokt.android-conventions.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ plugins { id("protokt.common-conventions") id("com.android.library") - id("org.jetbrains.kotlin.android") + kotlin("android") } javaBasedProjectConventions() @@ -24,3 +24,16 @@ javaBasedProjectConventions() repositories { google() } + +kotlin { + jvmToolchain(libs.versions.java.get().toInt()) +} + +// remove after AGP 8.1.0 +// https://issuetracker.google.com/issues/260059413 +android { + compileOptions { + sourceCompatibility = JavaVersion.valueOf("VERSION_${libs.versions.java.get().toInt()}") + targetCompatibility = JavaVersion.valueOf("VERSION_${libs.versions.java.get().toInt()}") + } +} diff --git a/buildSrc/src/main/kotlin/protokt.benchmarks-conventions.gradle.kts b/buildSrc/src/main/kotlin/protokt.benchmarks-conventions.gradle.kts index 838992910..b5309b592 100644 --- a/buildSrc/src/main/kotlin/protokt.benchmarks-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/protokt.benchmarks-conventions.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,10 @@ plugins { id("protokt.jvm-conventions") - id("org.jetbrains.kotlin.kapt") + kotlin("kapt") } dependencies { - implementation(libraries.jmhCore) - kapt(libraries.jmhGenerator) + implementation(libs.jmh.core) + kapt(libs.jmh.generator) } diff --git a/buildSrc/src/main/kotlin/protokt.common-conventions.gradle.kts b/buildSrc/src/main/kotlin/protokt.common-conventions.gradle.kts index 98a7cbfe7..798a8f0de 100644 --- a/buildSrc/src/main/kotlin/protokt.common-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/protokt.common-conventions.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,22 +13,7 @@ * limitations under the License. */ -import com.toasttab.protokt.gradle.MANIFEST_VERSION_PROPERTY -import org.gradle.jvm.tasks.Jar -import org.gradle.kotlin.dsl.attributes - -plugins { - idea -} +plugins { idea } version = rootProject.version - -tasks { - withType { - manifest { - attributes( - MANIFEST_VERSION_PROPERTY to "${project.version}" - ) - } - } -} +group = "com.toasttab.protokt" diff --git a/buildSrc/src/main/kotlin/protokt.grpc-examples-conventions.gradle.kts b/buildSrc/src/main/kotlin/protokt.grpc-examples-conventions.gradle.kts index 8483f3ab5..ccff3ceda 100644 --- a/buildSrc/src/main/kotlin/protokt.grpc-examples-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/protokt.grpc-examples-conventions.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,84 +20,86 @@ plugins { dependencies { implementation(project(":protokt-runtime-grpc-lite")) - implementation(libraries.grpcStub) + implementation(libs.grpc.stub) - runtimeOnly(libraries.grpcNetty) + runtimeOnly(libs.grpc.netty) + + testRuntimeOnly(libs.junit.vintage) } tasks.register("HelloWorldServer") { dependsOn("classes") classpath = sourceSets["main"].runtimeClasspath - mainClass.set("io.grpc.examples.helloworld.HelloWorldServerKt") + mainClass.set("protokt.v1.helloworld.HelloWorldServerKt") } tasks.register("RouteGuideServer") { dependsOn("classes") classpath = sourceSets["main"].runtimeClasspath - mainClass.set("io.grpc.examples.routeguide.RouteGuideServerKt") + mainClass.set("protokt.v1.io.grpc.examples.routeguide.RouteGuideServerKt") } tasks.register("AnimalsServer") { dependsOn("classes") classpath = sourceSets["main"].runtimeClasspath - mainClass.set("io.grpc.examples.animals.AnimalsServerKt") + mainClass.set("protokt.v1.animals.AnimalsServerKt") } tasks.register("HelloWorldClient") { dependsOn("classes") classpath = sourceSets["main"].runtimeClasspath - mainClass.set("io.grpc.examples.helloworld.HelloWorldClientKt") + mainClass.set("protokt.v1.helloworld.HelloWorldClientKt") } tasks.register("RouteGuideClient") { dependsOn("classes") classpath = sourceSets["main"].runtimeClasspath - mainClass.set("io.grpc.examples.routeguide.RouteGuideClientKt") + mainClass.set("protokt.v1.io.grpc.examples.routeguide.RouteGuideClientKt") } tasks.register("AnimalsClient") { dependsOn("classes") classpath = sourceSets["main"].runtimeClasspath - mainClass.set("io.grpc.examples.animals.AnimalsClientKt") + mainClass.set("protokt.v1.animals.AnimalsClientKt") } val helloWorldServerStartScripts = tasks.register("helloWorldServerStartScripts") { - mainClass.set("io.grpc.examples.helloworld.HelloWorldServerKt") + mainClass.set("protokt.v1.helloworld.HelloWorldServerKt") applicationName = "hello-world-server" outputDir = tasks.named("startScripts").get().outputDir classpath = tasks.named("startScripts").get().classpath } val routeGuideServerStartScripts = tasks.register("routeGuideServerStartScripts") { - mainClass.set("io.grpc.examples.routeguide.RouteGuideServerKt") + mainClass.set("protokt.v1.io.grpc.examples.routeguide.RouteGuideServerKt") applicationName = "route-guide-server" outputDir = tasks.named("startScripts").get().outputDir classpath = tasks.named("startScripts").get().classpath } val animalsServerStartScripts = tasks.register("animalsServerStartScripts") { - mainClass.set("io.grpc.examples.animals.AnimalsServerKt") + mainClass.set("protokt.v1.animals.AnimalsServerKt") applicationName = "animals-server" outputDir = tasks.named("startScripts").get().outputDir classpath = tasks.named("startScripts").get().classpath } val helloWorldClientStartScripts = tasks.register("helloWorldClientStartScripts") { - mainClass.set("io.grpc.examples.helloworld.HelloWorldClientKt") + mainClass.set("protokt.v1.helloworld.HelloWorldClientKt") applicationName = "hello-world-client" outputDir = tasks.named("startScripts").get().outputDir classpath = tasks.named("startScripts").get().classpath } val routeGuideClientStartScripts = tasks.register("routeGuideClientStartScripts") { - mainClass.set("io.grpc.examples.routeguide.RouteGuideClientKt") + mainClass.set("protokt.v1.io.grpc.examples.routeguide.RouteGuideClientKt") applicationName = "route-guide-client" outputDir = tasks.named("startScripts").get().outputDir classpath = tasks.named("startScripts").get().classpath } val animalsClientStartScripts = tasks.register("animalsClientStartScripts") { - mainClass.set("io.grpc.examples.animals.AnimalsClientKt") + mainClass.set("protokt.v1.animals.AnimalsClientKt") applicationName = "route-guide-client" outputDir = tasks.named("startScripts").get().outputDir classpath = tasks.named("startScripts").get().classpath diff --git a/buildSrc/src/main/kotlin/protokt.jvm-conventions.gradle.kts b/buildSrc/src/main/kotlin/protokt.jvm-conventions.gradle.kts index 46caafaf9..86a73a259 100644 --- a/buildSrc/src/main/kotlin/protokt.jvm-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/protokt.jvm-conventions.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,11 @@ plugins { id("protokt.common-conventions") - id("org.jetbrains.kotlin.jvm") + kotlin("jvm") } javaBasedProjectConventions() + +kotlin { + jvmToolchain(libs.versions.java.get().toInt()) +} diff --git a/buildSrc/src/main/kotlin/protokt.multiplatform-conventions.gradle.kts b/buildSrc/src/main/kotlin/protokt.multiplatform-conventions.gradle.kts new file mode 100644 index 000000000..e195b08fb --- /dev/null +++ b/buildSrc/src/main/kotlin/protokt.multiplatform-conventions.gradle.kts @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + kotlin("multiplatform") + id("protokt.common-conventions") +} + +kotlin { + jvm { + withJava() + } + + js(IR) { + browser {} + nodejs {} + useCommonJs() + } + + sourceSets { + val jvmTest by getting { + dependencies { + implementation(libs.junit.jupiter) + implementation(libs.truth) + } + } + } + + targets { + all { + compilations.all { + kotlinOptions { + allWarningsAsErrors = true + } + } + } + } +} + +tasks.named("jvmTest") { + useJUnitPlatform() +} + +pureKotlin() + +kotlin { + jvmToolchain(libs.versions.java.get().toInt()) +} + +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(libs.versions.java.get().toInt())) + } +} diff --git a/buildSrc/src/main/kotlin/protokt.spotless-conventions.gradle.kts b/buildSrc/src/main/kotlin/protokt.spotless-conventions.gradle.kts new file mode 100644 index 000000000..a86254708 --- /dev/null +++ b/buildSrc/src/main/kotlin/protokt.spotless-conventions.gradle.kts @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import com.diffplug.gradle.spotless.SpotlessExtension + +allprojects { + apply(plugin = "com.diffplug.spotless") + repositories { mavenCentral() } + + configure { + val editorConfigOverride = + mapOf( + "ktlint_standard_trailing-comma-on-call-site" to "disabled", + "ktlint_standard_trailing-comma-on-declaration-site" to "disabled" + ) + + kotlin { + ktlint().editorConfigOverride(editorConfigOverride) + target("**/*.kt") + targetExclude( + "buildSrc/build/generated-sources/**", + "**/generated/**", + "protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/compiler/plugin.kt", + "protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/any.kt", + "protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/api.kt", + "protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/descriptor.kt", + "protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/duration.kt", + "protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/empty.kt", + "protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/field_mask.kt", + "protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/source_context.kt", + "protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/struct.kt", + "protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/timestamp.kt", + "protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/type.kt", + "protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/wrappers.kt", + "extensions/protokt-jvm-extensions-lite/src/main/kotlin/com/toasttab/protokt/ext/inet_socket_address.kt" + ) + } + + kotlinGradle { + ktlint().editorConfigOverride(editorConfigOverride) + target("**/*.kts") + targetExclude("buildSrc/build/**") + licenseHeaderFile( + rootProject.file("gradle/license-header-c-style"), + "(package |@file|import |fun )|buildscript |plugins |subprojects |spotless " + ) + } + + format("kotlinLicense") { + target("**/*.kt") + licenseHeaderFile( + rootProject.file("gradle/license-header-c-style"), + "(package |@file|import |fun )" + ) + targetExclude( + "**/buildSrc/build/generated/source/buildConfig/main/main/**", + "**/build/generated-sources/kotlin-dsl-*/**", + "**/protokt/v1/animals/**", + "**/protokt/v1/helloworld/**", + "**/protokt/v1/io/grpc/examples/**" + ) + } + + format("protobufLicense") { + target("**/*.proto") + targetExclude( + listOf( + "benchmarks/schema/src/main/resources/schema/benchmarks.proto", + "examples/protos/src/main/proto/animals/dog.proto", + "examples/protos/src/main/proto/animals/pig.proto", + "examples/protos/src/main/proto/animals/sheep.proto", + "examples/protos/src/main/proto/helloworld/hello_world.proto", + "examples/protos/src/main/proto/io/grpc/examples/route_guide.proto", + "testing/conformance/driver/src/main/proto/conformance/conformance.proto", + "testing/conformance/driver/src/main/proto/proto3/test_messages_proto3.proto", + "testing/interop/src/main/proto/tutorial/addressbook.proto" + ).map(rootProject::file) + + "node_modules/**" + + "**/build/extracted-include-protos/**" + + "**/build/resources/**" + ) + licenseHeaderFile( + rootProject.file("gradle/license-header-c-style"), + "(syntax )" + ) + } + } +} diff --git a/buildSrc/src/main/kotlin/com/toasttab/protokt/gradle/DslExtensions.kt b/buildSrc/src/main/kotlin/protokt/v1/gradle/DslExtensions.kt similarity index 97% rename from buildSrc/src/main/kotlin/com/toasttab/protokt/gradle/DslExtensions.kt rename to buildSrc/src/main/kotlin/protokt/v1/gradle/DslExtensions.kt index 1a022391c..5f92e113e 100644 --- a/buildSrc/src/main/kotlin/com/toasttab/protokt/gradle/DslExtensions.kt +++ b/buildSrc/src/main/kotlin/protokt/v1/gradle/DslExtensions.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * limitations under the License. */ -package com.toasttab.protokt.gradle +package protokt.v1.gradle import org.gradle.api.Project import org.gradle.api.artifacts.Dependency diff --git a/buildSrc/src/main/kotlin/com/toasttab/protokt/gradle/ProtobufBuild.kt b/buildSrc/src/main/kotlin/protokt/v1/gradle/ProtobufBuild.kt similarity index 77% rename from buildSrc/src/main/kotlin/com/toasttab/protokt/gradle/ProtobufBuild.kt rename to buildSrc/src/main/kotlin/protokt/v1/gradle/ProtobufBuild.kt index 32b6fdd8a..240c4d5ca 100644 --- a/buildSrc/src/main/kotlin/com/toasttab/protokt/gradle/ProtobufBuild.kt +++ b/buildSrc/src/main/kotlin/protokt/v1/gradle/ProtobufBuild.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,11 +13,12 @@ * limitations under the License. */ -package com.toasttab.protokt.gradle +package protokt.v1.gradle import com.google.protobuf.gradle.GenerateProtoTask import com.google.protobuf.gradle.ProtobufExtension import com.google.protobuf.gradle.ProtobufExtract +import com.google.protobuf.gradle.ProtobufPlugin import com.google.protobuf.gradle.id import org.gradle.api.Project import org.gradle.api.file.FileCollection @@ -29,11 +30,15 @@ import org.gradle.kotlin.dsl.named import org.gradle.kotlin.dsl.withType import java.net.URLEncoder -internal fun configureProtobufPlugin(project: Project, ext: ProtoktExtension, binaryPath: String) { - project.apply(plugin = "com.google.protobuf") +internal fun configureProtobufPlugin( + project: Project, + ext: ProtoktExtension, + binaryPath: String +) { + project.apply() project.configure { - configureSources(project, generatedFilesBaseDir) + configureSources(project) protoc { artifact = "com.google.protobuf:protoc:${ext.protocVersion}" @@ -55,11 +60,12 @@ internal fun configureProtobufPlugin(project: Project, ext: ProtoktExtension, bi id("protokt") { project.afterEvaluate { option("$KOTLIN_EXTRA_CLASSPATH=${extraClasspath(project, task)}") - option("$RESPECT_JAVA_PACKAGE=${ext.respectJavaPackage}") - option("$GENERATE_GRPC=${ext.generateGrpc}") - option("$ONLY_GENERATE_GRPC=${ext.onlyGenerateGrpc}") - option("$LITE=${ext.lite}") - option("$ONLY_GENERATE_DESCRIPTORS=${ext.onlyGenerateDescriptors}") + option("$GENERATE_TYPES=${ext.generate.types}") + option("$GENERATE_DESCRIPTORS=${ext.generate.descriptors}") + option("$GENERATE_GRPC_DESCRIPTORS=${ext.generate.grpcDescriptors}") + option("$GENERATE_GRPC_KOTLIN_STUBS=${ext.generate.grpcKotlinStubs}") + option("$FORMAT_OUTPUT=${ext.formatOutput}") + option("$APPLIED_KOTLIN_PLUGIN=${project.appliedKotlinPlugin()}") } } } @@ -88,11 +94,11 @@ private fun extraClasspath(project: Project, task: GenerateProtoTask): String { return extensions.joinToString(";") { URLEncoder.encode(it.path, "UTF-8") } } -private fun configureSources(project: Project, generatedSourcesPath: String) { +private fun configureSources(project: Project) { project.afterEvaluate { if (project.tasks.findByName("sourcesJar") != null) { tasks.named("sourcesJar").configure { - from("$generatedSourcesPath/main") + from("generated/source/proto/main") } } } diff --git a/buildSrc/src/main/kotlin/protokt/v1/gradle/ProtoktBuild.kt b/buildSrc/src/main/kotlin/protokt/v1/gradle/ProtoktBuild.kt new file mode 100644 index 000000000..1d27c00c0 --- /dev/null +++ b/buildSrc/src/main/kotlin/protokt/v1/gradle/ProtoktBuild.kt @@ -0,0 +1,241 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.gradle + +import com.google.protobuf.gradle.GenerateProtoTask +import com.google.protobuf.gradle.ProtobufExtension +import com.google.protobuf.gradle.ProtobufPlugin +import com.google.protobuf.gradle.outputSourceDirectoriesHack +import com.google.protobuf.gradle.proto +import org.gradle.api.NamedDomainObjectContainer +import org.gradle.api.Project +import org.gradle.api.artifacts.Dependency +import org.gradle.api.file.DuplicatesStrategy +import org.gradle.api.file.SourceDirectorySet +import org.gradle.api.plugins.ExtensionAware +import org.gradle.api.tasks.SourceSet +import org.gradle.api.tasks.SourceSetContainer +import org.gradle.jvm.tasks.Jar +import org.gradle.kotlin.dsl.create +import org.gradle.kotlin.dsl.getByType +import org.gradle.kotlin.dsl.project +import org.gradle.kotlin.dsl.the +import org.gradle.kotlin.dsl.withType +import org.jetbrains.kotlin.gradle.dsl.KotlinJsProjectExtension +import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension +import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension +import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet +import org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSet +import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile +import kotlin.reflect.KClass + +const val CODEGEN_NAME = "protoc-gen-protokt" + +const val EXTENSIONS = "protoktExtensions" + +const val TEST_EXTENSIONS = "testProtoktExtensions" + +fun configureProtokt(project: Project, protoktVersion: Any?, resolveBinary: () -> String) { + injectKotlinPluginsIntoProtobufGradle() + val ext = project.extensions.create("protokt") + configureProtobufPlugin(project, ext, resolveBinary()) + + project.createExtensionConfigurationsAndConfigureProtobuf() + + // must wait for extension to resolve + project.afterEvaluate { + project.configurations.named(EXTENSIONS) { + project.resolveProtoktCoreDep(protoktVersion)?.let(dependencies::add) + } + } +} + +private fun injectKotlinPluginsIntoProtobufGradle() { + val prerequisitePluginsField = ProtobufPlugin::class.java.getDeclaredField("PREREQ_PLUGIN_OPTIONS") + prerequisitePluginsField.isAccessible = true + + @Suppress("UNCHECKED_CAST") + val prerequisitePlugins = prerequisitePluginsField.get(null) as MutableList + prerequisitePlugins.add("org.jetbrains.kotlin.multiplatform") + prerequisitePlugins.add("org.jetbrains.kotlin.js") +} + +private fun Project.createExtensionConfigurationsAndConfigureProtobuf() { + val extensionsConfiguration = configurations.create(EXTENSIONS) + val testExtensionsConfiguration = configurations.create(TEST_EXTENSIONS) + + fun configureProtoktConfigurations( + extension: KClass, + targetMainSourceSet: String, + targetTestSourceSet: String + ) { + val sourceSets = extensions.getByType(extension.java).sourceSets + val sourceSet = (sourceSets.getByName(targetMainSourceSet) as DefaultKotlinSourceSet) + configurations.getByName(sourceSet.apiConfigurationName).extendsFrom(extensionsConfiguration) + val testSourceSet = (sourceSets.getByName(targetTestSourceSet) as DefaultKotlinSourceSet) + configurations.getByName(testSourceSet.apiConfigurationName).extendsFrom(testExtensionsConfiguration) + } + + pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") { + configureProtoktConfigurations(KotlinMultiplatformExtension::class, "commonMain", "commonTest") + linkGenerateProtoToSourceCompileForKotlinMpp("commonMain", "commonTest") + } + + pluginManager.withPlugin("org.jetbrains.kotlin.js") { + configureProtoktConfigurations(KotlinJsProjectExtension::class, "main", "test") + val (mainSourceSetName, testSourceSetName) = configureJs() + + // hacking into hack configurations owned by protobbuf-gradle-plugin + configurations.getByName("${mainSourceSetName}CompileProtoPath").extendsFrom(extensionsConfiguration) + configurations.getByName("${testSourceSetName}CompileProtoPath").extendsFrom(testExtensionsConfiguration) + } + + val otherwise = { + configurations.getByName("api").extendsFrom(extensionsConfiguration) + configurations.getByName("testApi").extendsFrom(testExtensionsConfiguration) + } + + pluginManager.withPlugin("org.jetbrains.kotlin.jvm") { + otherwise() + } + + pluginManager.withPlugin("org.jetbrains.kotlin.android") { + otherwise() + } +} + +private fun Project.linkGenerateProtoToSourceCompileForKotlinMpp(mainSourceSetName: String, testSourceSetName: String) { + linkGenerateProtoTasksAndIncludeGeneratedSource(mainSourceSetName, false) + linkGenerateProtoTasksAndIncludeGeneratedSource(testSourceSetName, true) + + tasks.withType { + from(fileTree("${layout.buildDirectory.get()}/extracted-protos/main")) + duplicatesStrategy = DuplicatesStrategy.EXCLUDE // TODO: figure out how to get rid of this + } +} + +private fun Project.linkGenerateProtoTasksAndIncludeGeneratedSource(sourceSetName: String, test: Boolean) { + val protoSourceSetRoot = if (test) "test" else "main" + + val extension = project.extensions.getByType() + + extension.generateProtoTasks.ofSourceSet(protoSourceSetRoot).forEach { genProtoTask -> + configureSourceSets(sourceSetName, protoSourceSetRoot, genProtoTask) + tasks.withType> { + if ((test && name.contains("Test")) || (!test && !name.contains("Test"))) { + dependsOn(genProtoTask) + } + } + } +} + +private fun Project.configureSourceSets( + sourceSetName: String, + protoSourceSetRoot: String, + genProtoTask: GenerateProtoTask +) { + val kotlinExtension = extensions.getByName("kotlin") as ExtensionAware + + @Suppress("UNCHECKED_CAST") + val sourceSets = kotlinExtension.extensions.getByName("sourceSets") as NamedDomainObjectContainer + + sourceSets.named(sourceSetName).configure { + kotlin.srcDir(genProtoTask.buildSourceDirectorySet()) + the() + .getByName(protoSourceSetRoot) + .proto { resources.source(this) } + } +} + +private fun GenerateProtoTask.buildSourceDirectorySet(): SourceDirectorySet { + val srcSetName = "generate-proto-$name" + val srcSet = objectFactory.sourceDirectorySet(srcSetName, srcSetName) + srcSet.srcDirs( + objectFactory + .fileCollection() + .builtBy(this) + .from(providerFactory.provider { outputSourceDirectoriesHack }) + ) + return srcSet +} + +// The Kotlin JS plugin doesn't create main or test source sets +private fun Project.configureJs(): Pair { + // Can't call them "main" and "test" otherwise we'll get conflicting tasks 'processResources' and 'testClasses' + val mainSourceSet = the().create("jsMain") + val testSourceSet = the().create("jsTest") + + val extension = project.extensions.getByType() + + fun linkGenerateProtoTasksAndIncludeGeneratedSource(sourceSet: SourceSet, test: Boolean) { + val targetSourceSetName = if (test) "test" else "main" + + extension.generateProtoTasks.ofSourceSet(sourceSet.name).forEach { genProtoTask -> + configureSourceSets(targetSourceSetName, sourceSet.name, genProtoTask) + the().getByName(sourceSet.name).proto { srcDir("src/$targetSourceSetName/proto") } + tasks.withType> { + if ((test && name.contains("Test")) || (!test && !name.contains("Test"))) { + dependsOn(genProtoTask) + } + } + } + } + + linkGenerateProtoTasksAndIncludeGeneratedSource(mainSourceSet, false) + linkGenerateProtoTasksAndIncludeGeneratedSource(testSourceSet, true) + + tasks.withType { + from(fileTree("${layout.buildDirectory.get()}/extracted-protos/${mainSourceSet.name}")) + duplicatesStrategy = DuplicatesStrategy.EXCLUDE // TODO: figure out how to get rid of this + } + + tasks.register("generateProto") { dependsOn("generateJsMainProto") } + tasks.register("generateTestProto") { dependsOn("generateJsTestProto") } + + return mainSourceSet.name to testSourceSet.name +} + +internal fun Project.resolveProtoktCoreDep(protoktVersion: Any?): Dependency? { + if (name in setOf("protokt-core", "protokt-core-lite")) { + return null + } + + val artifactId = + if (the().generate.descriptors) { + "protokt-core" + } else { + "protokt-core-lite" + } + + return if (protoktVersion == null) { + dependencies.project(":$artifactId") + } else { + dependencies.create("com.toasttab.protokt:$artifactId:$protoktVersion") + } +} + +internal fun Project.appliedKotlinPlugin() = + when { + plugins.hasPlugin("org.jetbrains.kotlin.multiplatform") -> + "org.jetbrains.kotlin.multiplatform" + plugins.hasPlugin("org.jetbrains.kotlin.js") -> + "org.jetbrains.kotlin.js" + plugins.hasPlugin("org.jetbrains.kotlin.jvm") -> + "org.jetbrains.kotlin.jvm" + plugins.hasPlugin("org.jetbrains.kotlin.android") -> + "org.jetbrains.kotlin.android" + else -> null + } diff --git a/buildSrc/src/main/kotlin/protokt/v1/gradle/ProtoktExtension.kt b/buildSrc/src/main/kotlin/protokt/v1/gradle/ProtoktExtension.kt new file mode 100644 index 000000000..6e6eb4324 --- /dev/null +++ b/buildSrc/src/main/kotlin/protokt/v1/gradle/ProtoktExtension.kt @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.gradle + +const val KOTLIN_EXTRA_CLASSPATH = "kotlin_extra_classpath" +const val GENERATE_TYPES = "generate_types" +const val GENERATE_DESCRIPTORS = "generate_descriptors" +const val GENERATE_GRPC_DESCRIPTORS = "generate_grpc_descriptors" +const val GENERATE_GRPC_KOTLIN_STUBS = "generate_grpc_kotlin_stubs" +const val FORMAT_OUTPUT = "format_output" +const val APPLIED_KOTLIN_PLUGIN = "applied_kotlin_plugin" + +open class ProtoktExtension { + /** + * The version of protobuf to use for compilation + */ + var protocVersion = DEFAULT_PROTOBUF_VERSION + + internal var generate: Generate = Generate() + + fun generate(configure: Generate.() -> Unit) { + generate.configure() + } + + /** + * Whether to format the generated code. + */ + var formatOutput = true + + class Generate { + /** + * Whether to messages and enums. + */ + var types = true + + /** + * Whether to generate embedded descriptors for runtime reflective + * access. Beware: if this option is enabled and any generated file depends + * on a file generated in a different run of the code generator in which + * this option was not enabled, the generated code will fail to compile. + */ + var descriptors = true + + /** + * Whether to generate gRPC-specific code such as MethodDescriptors and + * ServiceDescriptors. If enabled, the project will have to import gRPC's + * stub dependency to compile. + */ + var grpcDescriptors = false + + /** + * Whether to generate Kotlin coroutine-based bindings for gRPC code. If + * enabled, the project will have to import gRPC's Kotlin stub dependency + * to compile. + */ + var grpcKotlinStubs = false + + /** + * Generates only message and enum types. + */ + fun lite() { + types = true + descriptors = false + grpcDescriptors = false + grpcKotlinStubs = false + } + + /** + * Generates message and enum types as well as gRPC descriptors not tied + * to any implementation of gRPC on the target platform. + */ + fun grpcLite() { + types = true + descriptors = false + grpcDescriptors = true + grpcKotlinStubs = false + } + + /** + * Generates message and enum types as well as gRPC descriptors and Kotlin + * coroutine-based implementations. + */ + fun grpcKotlinLite() { + types = true + descriptors = false + grpcDescriptors = true + grpcKotlinStubs = true + } + + /** + * Generates all variations of code. + */ + fun all() { + types = true + descriptors = true + grpcDescriptors = true + grpcKotlinStubs = true + } + } +} diff --git a/examples/README.md b/examples/README.md index 8e07cd86e..2232f648d 100644 --- a/examples/README.md +++ b/examples/README.md @@ -10,52 +10,53 @@ The example sources are organized into the following top-level folders: - [protos](protos): `.proto` files (shared across examples) - [grpc-java](grpc-java): implementation of client and server using grpc-java bindings -- [grpc-java-lite](grpc-java-lite): implementation of client using grpc-java bindings and protokt-lite +- [grpc-java-lite](grpc-java-lite): implementation of client and server using grpc-java bindings and protokt-lite - [grpc-kotlin](grpc-kotlin): implementation of client and server using grpc-kotlin bindings -- [grpc-kotlin-lite](grpc-kotlin-lite): implementation of client using grpc-kotlin bindings and protokt-lite +- [grpc-kotlin-lite](grpc-kotlin-lite): implementation of client and server using grpc-kotlin bindings and protokt-lite +- [grpc-node](grpc-node): implementation of client and server using bindings inspired by grpc-kotlin running on NodeJS ## Instructions for running examples ### Animals -Start a server, either based on grpc-java or grpc-kotlin bindings: +Start a server based on any of the supported bindings: ```sh -protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite]:AnimalsServer +protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite|node]:AnimalsServer ``` -In another console, run either client against the "dog", "pig", and "sheep" services: +In another console, run a client against the "dog", "pig", and "sheep" services: ```sh -protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite]:AnimalsClient --args=dog -protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite]:AnimalsClient --args=pig -protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite]:AnimalsClient --args=sheep +protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite|node]:AnimalsClient --args=dog +protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite|node]:AnimalsClient --args=pig +protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite|node]:AnimalsClient --args=sheep ``` ### Greeter -Start a server, either based on grpc-java or grpc-kotlin bindings: +Start a server based on any of the supported bindings: ```sh -protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite]:HelloWorldServer +protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite|node]:HelloWorldServer ``` In another console, run any client: ```sh -protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite]:HelloWorldClient +protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite|node]:HelloWorldClient ``` ### Route Guide -Start a server, either based on grpc-java or grpc-kotlin bindings: +Start a server based on any of the supported bindings: ```sh -protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite]:RouteGuideServer +protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite|node]:RouteGuideServer ``` -In another console, run either client: +In another console, run any client: ```sh -protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite]:RouteGuideClient +protokt % ./gradlew :examples:grpc-[java|kotlin|java-lite|kotlin-lite|node]:RouteGuideClient ``` diff --git a/examples/grpc-java-lite/build.gradle.kts b/examples/grpc-java-lite/build.gradle.kts index 836b7d50e..5f8edc3f1 100644 --- a/examples/grpc-java-lite/build.gradle.kts +++ b/examples/grpc-java-lite/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,8 +13,8 @@ * limitations under the License. */ -import com.google.protobuf.gradle.proto -import com.toasttab.protokt.gradle.protokt +import com.google.protobuf.gradle.protobuf +import protokt.v1.gradle.protokt plugins { id("protokt.grpc-examples-conventions") @@ -24,14 +24,18 @@ localProtokt() pureKotlin() protokt { - generateGrpc = true - lite = true + generate { + grpcLite() + } } dependencies { - implementation(libraries.jackson) + protobuf(project(":examples:protos")) + + implementation(project(":examples:protos")) + implementation(libs.jackson) - runtimeOnly(libraries.protobufLite) + runtimeOnly(libs.protobuf.lite) testImplementation(project(":protokt-util")) } @@ -42,15 +46,11 @@ sourceSets { srcDir("../grpc-java/src/main/kotlin") srcDir("../protos/src/main/kotlin") } - - proto { - srcDir("../protos/src/main/proto") - } } test { java { - srcDir("../../testing/plugin-options/lite/src/test/kotlin/com/toasttab/protokt/testing/lite") + srcDir(liteOptionTestSourceDir()) } } } diff --git a/examples/grpc-java/build.gradle.kts b/examples/grpc-java/build.gradle.kts index 3c40f1c0c..ab69671bd 100644 --- a/examples/grpc-java/build.gradle.kts +++ b/examples/grpc-java/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,12 +13,26 @@ * limitations under the License. */ +import com.google.protobuf.gradle.protobuf +import protokt.v1.gradle.protokt + plugins { id("protokt.grpc-examples-conventions") } +localProtokt() +pureKotlin() + +protokt { + generate { + grpcDescriptors = true + } +} + dependencies { + protobuf(project(":examples:protos")) + implementation(project(":examples:protos")) - runtimeOnly(libraries.protobufJava) + runtimeOnly(libs.protobuf.java) } diff --git a/examples/grpc-java/src/main/kotlin/io/grpc/examples/animals/AnimalsClient.kt b/examples/grpc-java/src/main/kotlin/protokt/v1/animals/AnimalsClient.kt similarity index 92% rename from examples/grpc-java/src/main/kotlin/io/grpc/examples/animals/AnimalsClient.kt rename to examples/grpc-java/src/main/kotlin/protokt/v1/animals/AnimalsClient.kt index bbefe4d21..585d3fb01 100644 --- a/examples/grpc-java/src/main/kotlin/io/grpc/examples/animals/AnimalsClient.kt +++ b/examples/grpc-java/src/main/kotlin/protokt/v1/animals/AnimalsClient.kt @@ -1,11 +1,9 @@ /* - * Copyright 2020 gRPC authors. - * Copyright 2021 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,7 +13,7 @@ * limitations under the License. */ -package io.grpc.examples.animals +package protokt.v1.animals import io.grpc.CallOptions import io.grpc.ManagedChannel @@ -63,7 +61,7 @@ class AnimalsClient( * Talk to the animals. Fluent in dog, pig and sheep. */ fun main(args: Array) { - val usage = "usage: ./gradlew :examples:grpc-java:AnimalsClient --args={dog|pig|sheep}" + val usage = "usage: ./gradlew :examples:grpc-java[-lite]:AnimalsClient --args={dog|pig|sheep}" if (args.isEmpty()) { println("No animals specified.") diff --git a/examples/grpc-java/src/main/kotlin/io/grpc/examples/animals/AnimalsServer.kt b/examples/grpc-java/src/main/kotlin/protokt/v1/animals/AnimalsServer.kt similarity index 97% rename from examples/grpc-java/src/main/kotlin/io/grpc/examples/animals/AnimalsServer.kt rename to examples/grpc-java/src/main/kotlin/protokt/v1/animals/AnimalsServer.kt index a5502bce5..4a18c0010 100644 --- a/examples/grpc-java/src/main/kotlin/io/grpc/examples/animals/AnimalsServer.kt +++ b/examples/grpc-java/src/main/kotlin/protokt/v1/animals/AnimalsServer.kt @@ -1,11 +1,9 @@ /* - * Copyright 2020 gRPC authors. - * Copyright 2021 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,7 +13,7 @@ * limitations under the License. */ -package io.grpc.examples.animals +package protokt.v1.animals import io.grpc.BindableService import io.grpc.ServerBuilder diff --git a/examples/grpc-java/src/main/kotlin/io/grpc/examples/helloworld/HelloWorldClient.kt b/examples/grpc-java/src/main/kotlin/protokt/v1/helloworld/HelloWorldClient.kt similarity index 94% rename from examples/grpc-java/src/main/kotlin/io/grpc/examples/helloworld/HelloWorldClient.kt rename to examples/grpc-java/src/main/kotlin/protokt/v1/helloworld/HelloWorldClient.kt index 941d19503..48d2f3fd9 100644 --- a/examples/grpc-java/src/main/kotlin/io/grpc/examples/helloworld/HelloWorldClient.kt +++ b/examples/grpc-java/src/main/kotlin/protokt/v1/helloworld/HelloWorldClient.kt @@ -1,11 +1,9 @@ /* - * Copyright 2020 gRPC authors. - * Copyright 2021 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,7 +13,7 @@ * limitations under the License. */ -package io.grpc.examples.helloworld +package protokt.v1.helloworld import io.grpc.CallOptions import io.grpc.ManagedChannel diff --git a/examples/grpc-java/src/main/kotlin/io/grpc/examples/helloworld/HelloWorldServer.kt b/examples/grpc-java/src/main/kotlin/protokt/v1/helloworld/HelloWorldServer.kt similarity index 95% rename from examples/grpc-java/src/main/kotlin/io/grpc/examples/helloworld/HelloWorldServer.kt rename to examples/grpc-java/src/main/kotlin/protokt/v1/helloworld/HelloWorldServer.kt index 87009fbde..8e85fd2c9 100644 --- a/examples/grpc-java/src/main/kotlin/io/grpc/examples/helloworld/HelloWorldServer.kt +++ b/examples/grpc-java/src/main/kotlin/protokt/v1/helloworld/HelloWorldServer.kt @@ -1,11 +1,9 @@ /* - * Copyright 2020 gRPC authors. - * Copyright 2021 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,7 +13,7 @@ * limitations under the License. */ -package io.grpc.examples.helloworld +package protokt.v1.helloworld import io.grpc.BindableService import io.grpc.ServerBuilder diff --git a/examples/grpc-java/src/main/kotlin/io/grpc/examples/routeguide/RouteGuideClient.kt b/examples/grpc-java/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideClient.kt similarity index 98% rename from examples/grpc-java/src/main/kotlin/io/grpc/examples/routeguide/RouteGuideClient.kt rename to examples/grpc-java/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideClient.kt index 918ab4102..47e37810d 100644 --- a/examples/grpc-java/src/main/kotlin/io/grpc/examples/routeguide/RouteGuideClient.kt +++ b/examples/grpc-java/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideClient.kt @@ -1,11 +1,10 @@ /* * Copyright 2020 gRPC authors. - * Copyright 2021 Toast Inc. + * Copyright 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,7 +14,7 @@ * limitations under the License. */ -package io.grpc.examples.routeguide +package protokt.v1.io.grpc.examples.routeguide import io.grpc.CallOptions import io.grpc.ManagedChannel diff --git a/examples/grpc-java/src/main/kotlin/io/grpc/examples/routeguide/RouteGuideServer.kt b/examples/grpc-java/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServer.kt similarity index 93% rename from examples/grpc-java/src/main/kotlin/io/grpc/examples/routeguide/RouteGuideServer.kt rename to examples/grpc-java/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServer.kt index 1d47c0621..b02440491 100644 --- a/examples/grpc-java/src/main/kotlin/io/grpc/examples/routeguide/RouteGuideServer.kt +++ b/examples/grpc-java/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServer.kt @@ -1,11 +1,10 @@ /* * Copyright 2020 gRPC authors. - * Copyright 2021 Toast Inc. + * Copyright 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,7 +14,7 @@ * limitations under the License. */ -package io.grpc.examples.routeguide +package protokt.v1.io.grpc.examples.routeguide import com.google.common.base.Stopwatch import com.google.common.base.Ticker @@ -23,15 +22,15 @@ import io.grpc.BindableService import io.grpc.ServerBuilder import io.grpc.ServerServiceDefinition import io.grpc.Status -import io.grpc.examples.routeguide.RouteGuideGrpc.getGetFeatureMethod -import io.grpc.examples.routeguide.RouteGuideGrpc.getListFeaturesMethod -import io.grpc.examples.routeguide.RouteGuideGrpc.getRecordRouteMethod -import io.grpc.examples.routeguide.RouteGuideGrpc.getRouteChatMethod import io.grpc.stub.ServerCalls.asyncBidiStreamingCall import io.grpc.stub.ServerCalls.asyncClientStreamingCall import io.grpc.stub.ServerCalls.asyncServerStreamingCall import io.grpc.stub.ServerCalls.asyncUnaryCall import io.grpc.stub.StreamObserver +import protokt.v1.io.grpc.examples.routeguide.RouteGuideGrpc.getGetFeatureMethod +import protokt.v1.io.grpc.examples.routeguide.RouteGuideGrpc.getListFeaturesMethod +import protokt.v1.io.grpc.examples.routeguide.RouteGuideGrpc.getRecordRouteMethod +import protokt.v1.io.grpc.examples.routeguide.RouteGuideGrpc.getRouteChatMethod import java.util.Collections import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.TimeUnit diff --git a/examples/grpc-kotlin-lite/build.gradle.kts b/examples/grpc-kotlin-lite/build.gradle.kts index 464fbd6e5..a1b1c9082 100644 --- a/examples/grpc-kotlin-lite/build.gradle.kts +++ b/examples/grpc-kotlin-lite/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,10 +13,8 @@ * limitations under the License. */ -import com.google.protobuf.gradle.ProtobufExtension -import com.google.protobuf.gradle.id import com.google.protobuf.gradle.protobuf -import com.toasttab.protokt.gradle.protokt +import protokt.v1.gradle.protokt plugins { id("protokt.grpc-examples-conventions") @@ -26,52 +24,42 @@ localProtokt() pureKotlin() protokt { - generateGrpc = true - lite = true -} - -configure { - plugins { - id("grpckt") { - artifact = libraries.grpcKotlinGenerator - } - } - - generateProtoTasks { - all().forEach { - it.plugins { - id("grpckt") - } - } + generate { + types = false + descriptors = false + grpcDescriptors = true + grpcKotlinStubs = true } } dependencies { protobuf(project(":examples:protos")) - implementation(libraries.grpcKotlin) - implementation(libraries.jackson) - implementation(libraries.kotlinxCoroutinesCore) + implementation(project(":examples:protos")) + implementation(libs.grpc.kotlin.stub) + implementation(libs.kotlinx.coroutines.core) - runtimeOnly(libraries.protobufLite) + runtimeOnly(libs.protobuf.lite) testImplementation(kotlin("test-junit")) + testImplementation(libs.grpc.testing) testImplementation(project(":protokt-util")) - testImplementation("io.grpc:grpc-testing:${versions.grpc}") } sourceSets { main { java { srcDir("../grpc-kotlin/src/main/kotlin") - srcDir("../protos/src/main/kotlin") + } + resources { + srcDir("../protos/src/main/resources") } } test { java { srcDir("../grpc-kotlin/src/test/kotlin") - srcDir("../../testing/plugin-options/lite/src/test/kotlin/com/toasttab/protokt/testing/lite") + srcDir(liteOptionTestSourceDir()) } } } diff --git a/examples/grpc-kotlin/build.gradle.kts b/examples/grpc-kotlin/build.gradle.kts index 1f6f1270d..6959532ee 100644 --- a/examples/grpc-kotlin/build.gradle.kts +++ b/examples/grpc-kotlin/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,17 +13,34 @@ * limitations under the License. */ +import com.google.protobuf.gradle.protobuf +import protokt.v1.gradle.protokt + plugins { id("protokt.grpc-examples-conventions") } +localProtokt() +pureKotlin() + +protokt { + generate { + types = false + descriptors = true + grpcDescriptors = true + grpcKotlinStubs = true + } +} + dependencies { + protobuf(project(":examples:protos")) + implementation(project(":examples:protos")) - implementation(libraries.grpcKotlin) - implementation(libraries.kotlinxCoroutinesCore) + implementation(libs.grpc.kotlin.stub) + implementation(libs.kotlinx.coroutines.core) - runtimeOnly(libraries.protobufJava) + runtimeOnly(libs.protobuf.java) testImplementation(kotlin("test-junit")) - testImplementation("io.grpc:grpc-testing:${versions.grpc}") + testImplementation(libs.grpc.testing) } diff --git a/examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/animals/AnimalsClient.kt b/examples/grpc-kotlin/src/main/kotlin/protokt/v1/animals/AnimalsClient.kt similarity index 93% rename from examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/animals/AnimalsClient.kt rename to examples/grpc-kotlin/src/main/kotlin/protokt/v1/animals/AnimalsClient.kt index 55c6196fc..b456a8135 100644 --- a/examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/animals/AnimalsClient.kt +++ b/examples/grpc-kotlin/src/main/kotlin/protokt/v1/animals/AnimalsClient.kt @@ -1,11 +1,10 @@ /* * Copyright 2020 gRPC authors. - * Copyright 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,7 +14,7 @@ * limitations under the License. */ -package io.grpc.examples.animals +package protokt.v1.animals import io.grpc.ManagedChannel import io.grpc.ManagedChannelBuilder @@ -54,7 +53,7 @@ class AnimalsClient(private val channel: ManagedChannel) : Closeable { * Talk to the animals. Fluent in dog, pig and sheep. */ suspend fun main(args: Array) { - val usage = "usage: ./gradlew :examples:grpc-kotlin:AnimalsClient --args={dog|pig|sheep}" + val usage = "usage: ./gradlew :examples:grpc-kotlin[-lite]:AnimalsClient --args={dog|pig|sheep}" if (args.isEmpty()) { println("No animals specified.") diff --git a/examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/animals/AnimalsServer.kt b/examples/grpc-kotlin/src/main/kotlin/protokt/v1/animals/AnimalsServer.kt similarity index 96% rename from examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/animals/AnimalsServer.kt rename to examples/grpc-kotlin/src/main/kotlin/protokt/v1/animals/AnimalsServer.kt index 9221bc80c..0df536b76 100644 --- a/examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/animals/AnimalsServer.kt +++ b/examples/grpc-kotlin/src/main/kotlin/protokt/v1/animals/AnimalsServer.kt @@ -1,11 +1,10 @@ /* * Copyright 2020 gRPC authors. - * Copyright 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,7 +14,7 @@ * limitations under the License. */ -package io.grpc.examples.animals +package protokt.v1.animals import io.grpc.Server import io.grpc.ServerBuilder diff --git a/examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/helloworld/HelloWorldClient.kt b/examples/grpc-kotlin/src/main/kotlin/protokt/v1/helloworld/HelloWorldClient.kt similarity index 91% rename from examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/helloworld/HelloWorldClient.kt rename to examples/grpc-kotlin/src/main/kotlin/protokt/v1/helloworld/HelloWorldClient.kt index 40917cbc0..e672a53ea 100644 --- a/examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/helloworld/HelloWorldClient.kt +++ b/examples/grpc-kotlin/src/main/kotlin/protokt/v1/helloworld/HelloWorldClient.kt @@ -1,11 +1,10 @@ /* * Copyright 2020 gRPC authors. - * Copyright 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,11 +14,11 @@ * limitations under the License. */ -package io.grpc.examples.helloworld +package protokt.v1.helloworld import io.grpc.ManagedChannel import io.grpc.ManagedChannelBuilder -import io.grpc.examples.helloworld.GreeterGrpcKt.GreeterCoroutineStub +import protokt.v1.helloworld.GreeterGrpcKt.GreeterCoroutineStub import java.io.Closeable import java.util.concurrent.TimeUnit diff --git a/examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/helloworld/HelloWorldServer.kt b/examples/grpc-kotlin/src/main/kotlin/protokt/v1/helloworld/HelloWorldServer.kt similarity index 96% rename from examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/helloworld/HelloWorldServer.kt rename to examples/grpc-kotlin/src/main/kotlin/protokt/v1/helloworld/HelloWorldServer.kt index 0fe7e07c5..981ea67b9 100644 --- a/examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/helloworld/HelloWorldServer.kt +++ b/examples/grpc-kotlin/src/main/kotlin/protokt/v1/helloworld/HelloWorldServer.kt @@ -1,11 +1,10 @@ /* * Copyright 2020 gRPC authors. - * Copyright 2021 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,7 +14,7 @@ * limitations under the License. */ -package io.grpc.examples.helloworld +package protokt.v1.helloworld import io.grpc.Server import io.grpc.ServerBuilder diff --git a/examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/routeguide/RouteGuideClient.kt b/examples/grpc-kotlin/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideClient.kt similarity index 95% rename from examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/routeguide/RouteGuideClient.kt rename to examples/grpc-kotlin/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideClient.kt index 60f4804db..8a8d62fba 100644 --- a/examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/routeguide/RouteGuideClient.kt +++ b/examples/grpc-kotlin/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideClient.kt @@ -1,11 +1,10 @@ /* * Copyright 2020 gRPC authors. - * Copyright 2021 Toast Inc. + * Copyright 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,15 +14,14 @@ * limitations under the License. */ -package io.grpc.examples.routeguide +package protokt.v1.io.grpc.examples.routeguide import io.grpc.ManagedChannel import io.grpc.ManagedChannelBuilder -import io.grpc.examples.routeguide.RouteGuideGrpcKt.RouteGuideCoroutineStub import kotlinx.coroutines.delay import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.collect import kotlinx.coroutines.flow.flow +import protokt.v1.io.grpc.examples.routeguide.RouteGuideGrpcKt.RouteGuideCoroutineStub import java.io.Closeable import java.util.concurrent.TimeUnit import kotlin.random.Random @@ -112,7 +110,7 @@ class RouteGuideClient(private val channel: ManagedChannel) : Closeable { RouteNote { message = "Last message" location = point(0, 0) - }, + } ) for (note in notes) { println("Sending message \"${note.message}\" at ${note.location?.toStr()}") diff --git a/examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/routeguide/RouteGuideServer.kt b/examples/grpc-kotlin/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServer.kt similarity index 97% rename from examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/routeguide/RouteGuideServer.kt rename to examples/grpc-kotlin/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServer.kt index 46eddcc86..c5c3fb126 100644 --- a/examples/grpc-kotlin/src/main/kotlin/io/grpc/examples/routeguide/RouteGuideServer.kt +++ b/examples/grpc-kotlin/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServer.kt @@ -1,11 +1,10 @@ /* * Copyright 2020 gRPC authors. - * Copyright 2021 Toast Inc. + * Copyright 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,7 +14,7 @@ * limitations under the License. */ -package io.grpc.examples.routeguide +package protokt.v1.io.grpc.examples.routeguide import com.google.common.base.Stopwatch import com.google.common.base.Ticker @@ -23,7 +22,6 @@ import io.grpc.Server import io.grpc.ServerBuilder import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.asFlow -import kotlinx.coroutines.flow.collect import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.flow import java.util.Collections diff --git a/examples/grpc-kotlin/src/test/kotlin/io/grpc/examples/animals/AnimalsServerTest.kt b/examples/grpc-kotlin/src/test/kotlin/protokt/v1/animals/AnimalsServerTest.kt similarity index 96% rename from examples/grpc-kotlin/src/test/kotlin/io/grpc/examples/animals/AnimalsServerTest.kt rename to examples/grpc-kotlin/src/test/kotlin/protokt/v1/animals/AnimalsServerTest.kt index f2654ffb7..077bd4c7e 100644 --- a/examples/grpc-kotlin/src/test/kotlin/io/grpc/examples/animals/AnimalsServerTest.kt +++ b/examples/grpc-kotlin/src/test/kotlin/protokt/v1/animals/AnimalsServerTest.kt @@ -1,11 +1,10 @@ /* * Copyright 2022 gRPC authors. - * Copyright 2022 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,7 +14,7 @@ * limitations under the License. */ -package io.grpc.examples.animals +package protokt.v1.animals import io.grpc.testing.GrpcServerRule import kotlinx.coroutines.runBlocking diff --git a/examples/grpc-kotlin/src/test/kotlin/io/grpc/examples/helloworld/HelloWorldServerTest.kt b/examples/grpc-kotlin/src/test/kotlin/protokt/v1/helloworld/HelloWorldServerTest.kt similarity index 94% rename from examples/grpc-kotlin/src/test/kotlin/io/grpc/examples/helloworld/HelloWorldServerTest.kt rename to examples/grpc-kotlin/src/test/kotlin/protokt/v1/helloworld/HelloWorldServerTest.kt index 918579ae2..1334b6e09 100644 --- a/examples/grpc-kotlin/src/test/kotlin/io/grpc/examples/helloworld/HelloWorldServerTest.kt +++ b/examples/grpc-kotlin/src/test/kotlin/protokt/v1/helloworld/HelloWorldServerTest.kt @@ -1,11 +1,10 @@ /* * Copyright 2022 gRPC authors. - * Copyright 2022 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,7 +14,7 @@ * limitations under the License. */ -package io.grpc.examples.helloworld +package protokt.v1.helloworld import io.grpc.testing.GrpcServerRule import kotlinx.coroutines.runBlocking diff --git a/examples/grpc-kotlin/src/test/kotlin/io/grpc/examples/routeguide/RouteGuideServerTest.kt b/examples/grpc-kotlin/src/test/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServerTest.kt similarity index 95% rename from examples/grpc-kotlin/src/test/kotlin/io/grpc/examples/routeguide/RouteGuideServerTest.kt rename to examples/grpc-kotlin/src/test/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServerTest.kt index bbc1d3e87..71d3e84a1 100644 --- a/examples/grpc-kotlin/src/test/kotlin/io/grpc/examples/routeguide/RouteGuideServerTest.kt +++ b/examples/grpc-kotlin/src/test/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServerTest.kt @@ -1,11 +1,10 @@ /* * Copyright 2022 gRPC authors. - * Copyright 2022 Toast Inc. + * Copyright 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,7 +14,7 @@ * limitations under the License. */ -package io.grpc.examples.routeguide +package protokt.v1.io.grpc.examples.routeguide import io.grpc.testing.GrpcServerRule import kotlinx.coroutines.flow.toList diff --git a/examples/grpc-node/build.gradle.kts b/examples/grpc-node/build.gradle.kts new file mode 100644 index 000000000..63ec16da3 --- /dev/null +++ b/examples/grpc-node/build.gradle.kts @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import com.google.protobuf.gradle.proto +import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsExec +import protokt.v1.gradle.protokt + +plugins { + id("org.jetbrains.kotlin.js") +} + +kotlin { + js(IR) { + nodejs { + testTask { + useMocha() + } + } + binaries.executable() + useCommonJs() + } +} + +localProtokt() + +protokt { + generate { + types = false + descriptors = false + grpcDescriptors = true + grpcKotlinStubs = true + } +} + +dependencies { + implementation(project(":protokt-runtime-grpc-lite")) + implementation(project(":examples:protos")) + implementation(libs.kotlinx.coroutines.core) + + testImplementation(kotlin("test")) + testImplementation(libs.kotlinx.coroutines.test) +} + +sourceSets { + named("jsMain") { + proto { + srcDir("../protos/src/main/proto") + } + } +} + +tasks.withType { + args(listOfNotNull(properties["service"], properties["mode"], properties["args"])) +} + +fun GradleBuild.setUp(service: String, mode: String, vararg extra: Pair) { + startParameter.projectProperties = + mapOf( + "service" to service, + "mode" to mode + ) + extra.toMap() +} + +tasks.register("HelloWorldServer") { + setUp("helloworld", "server") + tasks = listOf("nodeProductionRun") +} + +tasks.register("RouteGuideServer") { + setUp("routeguide", "server") + tasks = listOf("nodeProductionRun") +} + +tasks.register("AnimalsServer") { + setUp("animals", "server") + tasks = listOf("nodeProductionRun") +} + +tasks.register("HelloWorldClient") { + setUp("helloworld", "client") + tasks = listOf("nodeProductionRun") +} + +tasks.register("RouteGuideClient") { + setUp("routeguide", "client") + tasks = listOf("nodeProductionRun") +} + +tasks.register("AnimalsClient") { + doFirst { setUp("animals", "client", "args" to args) } + tasks = listOf("nodeProductionRun") +} + +abstract class AnimalsClientTask : GradleBuild() { + @Input + @Option(option = "args", description = "shim for JavaExec args") + lateinit var args: String +} diff --git a/examples/grpc-node/src/main/kotlin/App.kt b/examples/grpc-node/src/main/kotlin/App.kt new file mode 100644 index 000000000..9a36a2377 --- /dev/null +++ b/examples/grpc-node/src/main/kotlin/App.kt @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import protokt.v1.animals.AnimalsServer +import protokt.v1.helloworld.HelloWorldClient +import protokt.v1.helloworld.HelloWorldServer +import protokt.v1.io.grpc.examples.routeguide.clientMain +import protokt.v1.io.grpc.examples.routeguide.serverMain + +external val process: dynamic + +suspend fun main() { + // https://stackoverflow.com/a/65088942 + val argv = process.argv.slice(2) as Array + val service = argv[0] + val mode = argv[1] + + when (service) { + "helloworld" -> { + when (mode) { + "server" -> { + HelloWorldServer().start() + } + "client" -> { + HelloWorldClient().greet() + } + else -> error("unsupported mode: $mode") + } + } + "routeguide" -> { + when (mode) { + "server" -> { + serverMain() + } + "client" -> { + clientMain() + } + else -> error("unsupported mode: $mode") + } + } + "animals" -> { + when (mode) { + "server" -> { + AnimalsServer().start() + } + "client" -> { + protokt.v1.animals.main(argv.drop(2).toTypedArray()) + } + else -> error("unsupported mode: $mode") + } + } + else -> error("unsupported service: $service") + } +} diff --git a/examples/grpc-node/src/main/kotlin/protokt/v1/animals/AnimalsClient.kt b/examples/grpc-node/src/main/kotlin/protokt/v1/animals/AnimalsClient.kt new file mode 100644 index 000000000..e5c8ac43a --- /dev/null +++ b/examples/grpc-node/src/main/kotlin/protokt/v1/animals/AnimalsClient.kt @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2020 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.animals + +import protokt.v1.animals.DogGrpcKt.DogCoroutineStub +import protokt.v1.animals.PigGrpcKt.PigCoroutineStub +import protokt.v1.animals.SheepGrpcKt.SheepCoroutineStub +import protokt.v1.grpc.ChannelCredentials + +class AnimalsClient( + port: Int +) { + private val dogStub by lazy { + DogCoroutineStub("localhost:$port", ChannelCredentials.createInsecure()) + } + + private val pigStub by lazy { + PigCoroutineStub("localhost:$port", ChannelCredentials.createInsecure()) + } + + private val sheepStub by lazy { + SheepCoroutineStub("localhost:$port", ChannelCredentials.createInsecure()) + } + + suspend fun bark() { + val request = BarkRequest {} + val response = dogStub.bark(request) + println("Received: ${response.message}") + } + + suspend fun oink() { + val request = OinkRequest {} + val response = pigStub.oink(request) + println("Received: ${response.message}") + } + + suspend fun baa() { + val request = BaaRequest {} + val response = sheepStub.baa(request) + println("Received: ${response.message}") + } +} + +/** + * Talk to the animals. Fluent in dog, pig and sheep. + */ +suspend fun main(args: Array) { + val usage = "usage: ./gradlew :examples:grpc-kotlin:AnimalsClient --args={dog|pig|sheep}" + + if (args.isEmpty()) { + println("No animals specified.") + println(usage) + } + + val port = 50051 + val client = AnimalsClient(port) + + args.forEach { + when (it) { + "dog" -> client.bark() + "pig" -> client.oink() + "sheep" -> client.baa() + else -> { + println("Unknown animal type: \"$it\". Try \"dog\", \"pig\" or \"sheep\".") + println(usage) + } + } + } +} diff --git a/examples/grpc-node/src/main/kotlin/protokt/v1/animals/AnimalsServer.kt b/examples/grpc-node/src/main/kotlin/protokt/v1/animals/AnimalsServer.kt new file mode 100644 index 000000000..21020f592 --- /dev/null +++ b/examples/grpc-node/src/main/kotlin/protokt/v1/animals/AnimalsServer.kt @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2020 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.animals + +import protokt.v1.animals.DogGrpcKt.DogCoroutineImplBase +import protokt.v1.animals.PigGrpcKt.PigCoroutineImplBase +import protokt.v1.animals.SheepGrpcKt.SheepCoroutineImplBase +import protokt.v1.grpc.Server +import protokt.v1.grpc.ServerCredentials +import protokt.v1.grpc.addService +import protokt.v1.grpc.start + +class AnimalsServer { + val port = 50051 + val server = Server() + + suspend fun start() { + server + .addService(DogGrpc.getServiceDescriptor(), DogService()) + .addService(PigGrpc.getServiceDescriptor(), PigService()) + .addService(SheepGrpc.getServiceDescriptor(), SheepService()) + .start("0.0.0.0:$port", ServerCredentials.createInsecure()) + println("Server started, listening on $port") + } + + internal class DogService : DogCoroutineImplBase() { + override suspend fun bark(request: BarkRequest) = BarkReply { + message = "Bark!" + } + } + + internal class PigService : PigCoroutineImplBase() { + override suspend fun oink(request: OinkRequest) = OinkReply { + message = "Oink!" + } + } + + internal class SheepService : SheepCoroutineImplBase() { + override suspend fun baa(request: BaaRequest) = BaaReply { + message = "Baa!" + } + } +} diff --git a/examples/grpc-node/src/main/kotlin/protokt/v1/helloworld/HelloWorldClient.kt b/examples/grpc-node/src/main/kotlin/protokt/v1/helloworld/HelloWorldClient.kt new file mode 100644 index 000000000..b86ecdc5c --- /dev/null +++ b/examples/grpc-node/src/main/kotlin/protokt/v1/helloworld/HelloWorldClient.kt @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.helloworld + +import protokt.v1.grpc.ChannelCredentials +import protokt.v1.helloworld.GreeterGrpcKt.GreeterCoroutineStub + +class HelloWorldClient { + private val stub = GreeterCoroutineStub("localhost:50051", ChannelCredentials.createInsecure()) + + suspend fun greet(name: String = "world"): HelloReply { + val reply = stub.sayHello(HelloRequest { this.name = name }) + println("Greeting: ${reply.message}") + return reply + } +} diff --git a/examples/grpc-node/src/main/kotlin/protokt/v1/helloworld/HelloWorldServer.kt b/examples/grpc-node/src/main/kotlin/protokt/v1/helloworld/HelloWorldServer.kt new file mode 100644 index 000000000..1d53fe2da --- /dev/null +++ b/examples/grpc-node/src/main/kotlin/protokt/v1/helloworld/HelloWorldServer.kt @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2020 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.helloworld + +import protokt.v1.grpc.Server +import protokt.v1.grpc.ServerCredentials +import protokt.v1.grpc.addService +import protokt.v1.grpc.start +import protokt.v1.helloworld.GreeterGrpcKt.GreeterCoroutineImplBase + +class HelloWorldServer { + val port = 50051 + val server = Server() + + suspend fun start() { + server + .addService(GreeterGrpc.getServiceDescriptor(), HelloWorldService()) + .start("0.0.0.0:$port", ServerCredentials.createInsecure()) + println("Server started, listening on $port") + } + + internal class HelloWorldService : GreeterCoroutineImplBase() { + override suspend fun sayHello(request: HelloRequest) = HelloReply { + message = "Hello ${request.name}" + } + } +} diff --git a/examples/grpc-node/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideClient.kt b/examples/grpc-node/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideClient.kt new file mode 100644 index 000000000..92b3a2259 --- /dev/null +++ b/examples/grpc-node/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideClient.kt @@ -0,0 +1,131 @@ +/* + * Copyright 2020 gRPC authors. + * Copyright 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.io.grpc.examples.routeguide + +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.flow +import protokt.v1.grpc.ChannelCredentials +import protokt.v1.io.grpc.examples.routeguide.RouteGuideGrpcKt.RouteGuideCoroutineStub +import kotlin.random.Random +import kotlin.random.nextLong + +class RouteGuideClient { + private val random = Random(314159) + private val stub = RouteGuideCoroutineStub("localhost:8980", ChannelCredentials.createInsecure()) + + suspend fun getFeature(latitude: Int, longitude: Int) { + println("*** GetFeature: lat=$latitude lon=$longitude") + + val request = point(latitude, longitude) + val feature = stub.getFeature(request) + + if (feature.exists()) { + println("Found feature called \"${feature.name}\" at ${feature.location?.toStr()}") + } else { + println("Found no feature at ${request.toStr()}") + } + } + + suspend fun listFeatures(lowLat: Int, lowLon: Int, hiLat: Int, hiLon: Int) { + println("*** ListFeatures: lowLat=$lowLat lowLon=$lowLon hiLat=$hiLat liLon=$hiLon") + + val request = Rectangle { + lo = point(lowLat, lowLon) + hi = point(hiLat, hiLon) + } + var i = 1 + stub.listFeatures(request).collect { feature -> + println("Result #${i++}: $feature") + } + } + + suspend fun recordRoute(points: Flow) { + println("*** RecordRoute") + val summary = stub.recordRoute(points) + println("Finished trip with ${summary.pointCount} points.") + println("Passed ${summary.featureCount} features.") + println("Travelled ${summary.distance} meters.") + val duration = summary.elapsedTime?.seconds + println("It took $duration seconds.") + } + + fun generateRoutePoints(features: List, numPoints: Int): Flow = flow { + for (i in 1..numPoints) { + val feature = features.random(random) + println("Visiting point ${feature.location?.toStr()}") + emit(feature.location!!) + delay(timeMillis = random.nextLong(500L..1500L)) + } + } + + suspend fun routeChat() { + println("*** RouteChat") + val requests = generateOutgoingNotes() + stub.routeChat(requests).collect { note -> + println("Got message \"${note.message}\" at ${note.location?.toStr()}") + } + println("Finished RouteChat") + } + + private fun generateOutgoingNotes(): Flow = flow { + val notes = listOf( + RouteNote { + message = "First message" + location = point(0, 0) + }, + RouteNote { + message = "Second message" + location = point(0, 0) + }, + RouteNote { + message = "Third message" + location = point(10000000, 0) + }, + RouteNote { + message = "Fourth message" + location = point(10000000, 10000000) + }, + RouteNote { + message = "Last message" + location = point(0, 0) + } + ) + for (note in notes) { + println("Sending message \"${note.message}\" at ${note.location?.toStr()}") + emit(note) + delay(500) + } + } +} + +suspend fun clientMain() { + val features = Database.features() + + RouteGuideClient().let { + it.getFeature(409146138, -746188906) + it.getFeature(0, 0) + it.listFeatures(400000000, -750000000, 420000000, -730000000) + it.recordRoute(it.generateRoutePoints(features, 10)) + it.routeChat() + } +} + +private fun point(lat: Int, lon: Int): Point = Point { + latitude = lat + longitude = lon +} diff --git a/examples/grpc-node/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServer.kt b/examples/grpc-node/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServer.kt new file mode 100644 index 000000000..0f9cbd0dd --- /dev/null +++ b/examples/grpc-node/src/main/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServer.kt @@ -0,0 +1,106 @@ +/* + * Copyright 2020 gRPC authors. + * Copyright 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.io.grpc.examples.routeguide + +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.asFlow +import kotlinx.coroutines.flow.filter +import kotlinx.coroutines.flow.flow +import protokt.v1.grpc.Server +import protokt.v1.grpc.ServerCredentials +import protokt.v1.grpc.addService +import protokt.v1.grpc.start +import protokt.v1.io.grpc.examples.routeguide.RouteGuideGrpcKt.RouteGuideCoroutineImplBase +import kotlin.time.ExperimentalTime +import kotlin.time.TimeSource + +/** + * Kotlin adaptation of RouteGuideServer from the Java gRPC example. + */ +class RouteGuideServer( + private val port: Int +) { + private val server = Server() + + suspend fun start() { + server + .addService(RouteGuideGrpc.getServiceDescriptor(), RouteGuideService(Database.features())) + .start("0.0.0.0:$port", ServerCredentials.createInsecure()) + println("Server started, listening on $port") + } + + fun stop() { + server.forceShutdown() + } + + internal class RouteGuideService( + private val features: Collection + ) : RouteGuideCoroutineImplBase() { + private val routeNotes = mutableMapOf>() + + override suspend fun getFeature(request: Point): Feature = + // No feature was found, return an unnamed feature. + features.find { it.location == request } ?: Feature { location = request } + + override fun listFeatures(request: Rectangle): Flow = + features.asFlow().filter { it.exists() && it.location!! in request } + + @OptIn(ExperimentalTime::class) + override suspend fun recordRoute(requests: Flow): RouteSummary { + var pointCount = 0 + var featureCount = 0 + var distance = 0 + var previous: Point? = null + val timeMark = TimeSource.Monotonic.markNow() + requests.collect { request -> + pointCount++ + if (getFeature(request).exists()) { + featureCount++ + } + val prev = previous + if (prev != null) { + distance += prev distanceTo request + } + previous = request + } + return RouteSummary { + this.pointCount = pointCount + this.featureCount = featureCount + this.distance = distance + this.elapsedTime = Durations.fromMicros(timeMark.elapsedNow().inWholeMicroseconds) + } + } + + override fun routeChat(requests: Flow): Flow = flow { + requests.collect { note -> + val notes: MutableList = routeNotes.getOrPut(note.location!!) { + mutableListOf() + } + for (prevNote in notes.toTypedArray()) { // thread-safe snapshot + emit(prevNote) + } + notes += note + } + } + } +} + +suspend fun serverMain() { + val port = 8980 + val server = RouteGuideServer(port) + server.start() +} diff --git a/examples/grpc-node/src/test/kotlin/protokt/v1/animals/AnimalsServerTest.kt b/examples/grpc-node/src/test/kotlin/protokt/v1/animals/AnimalsServerTest.kt new file mode 100644 index 000000000..15aa6d84a --- /dev/null +++ b/examples/grpc-node/src/test/kotlin/protokt/v1/animals/AnimalsServerTest.kt @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.animals + +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.test.runTest +import protokt.v1.animals.DogGrpcKt.DogCoroutineStub +import protokt.v1.animals.PigGrpcKt.PigCoroutineStub +import protokt.v1.animals.SheepGrpcKt.SheepCoroutineStub +import protokt.v1.grpc.ChannelCredentials +import kotlin.test.AfterTest +import kotlin.test.Test +import kotlin.test.assertEquals + +@OptIn(ExperimentalCoroutinesApi::class) +class AnimalsServerTest { + private val server = AnimalsServer() + + @AfterTest + fun after() { + server.server.forceShutdown() + } + + @Test + fun animals() = runTest { + server.start() + + val dogStub = DogCoroutineStub("localhost:50051", ChannelCredentials.createInsecure()) + val dogBark = dogStub.bark(BarkRequest { }) + assertEquals("Bark!", dogBark.message) + + val pigStub = PigCoroutineStub("localhost:50051", ChannelCredentials.createInsecure()) + val pigOink = pigStub.oink(OinkRequest { }) + assertEquals("Oink!", pigOink.message) + + val sheepStub = SheepCoroutineStub("localhost:50051", ChannelCredentials.createInsecure()) + val sheepBaa = sheepStub.baa(BaaRequest { }) + assertEquals("Baa!", sheepBaa.message) + } +} diff --git a/examples/grpc-node/src/test/kotlin/protokt/v1/helloworld/HelloWorldServerTest.kt b/examples/grpc-node/src/test/kotlin/protokt/v1/helloworld/HelloWorldServerTest.kt new file mode 100644 index 000000000..b49abeb2c --- /dev/null +++ b/examples/grpc-node/src/test/kotlin/protokt/v1/helloworld/HelloWorldServerTest.kt @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.helloworld + +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.test.runTest +import protokt.v1.grpc.ChannelCredentials +import protokt.v1.helloworld.GreeterGrpcKt.GreeterCoroutineStub +import kotlin.test.AfterTest +import kotlin.test.Test +import kotlin.test.assertEquals + +@OptIn(ExperimentalCoroutinesApi::class) +class HelloWorldServerTest { + private val server = HelloWorldServer() + + @AfterTest + fun after() { + server.server.forceShutdown() + } + + @Test + fun animals() = runTest { + server.start() + + val stub = GreeterCoroutineStub("localhost:50051", ChannelCredentials.createInsecure()) + val testName = "test name" + + val reply = stub.sayHello(HelloRequest { this.name = testName }) + assertEquals("Hello $testName", reply.message) + } +} diff --git a/examples/grpc-node/src/test/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServerTest.kt b/examples/grpc-node/src/test/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServerTest.kt new file mode 100644 index 000000000..5eb58604f --- /dev/null +++ b/examples/grpc-node/src/test/kotlin/protokt/v1/io/grpc/examples/routeguide/RouteGuideServerTest.kt @@ -0,0 +1,57 @@ +/* + * Copyright 2022 gRPC authors. + * Copyright 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.io.grpc.examples.routeguide + +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.flow.toList +import kotlinx.coroutines.test.runTest +import protokt.v1.grpc.ChannelCredentials +import protokt.v1.io.grpc.examples.routeguide.RouteGuideGrpcKt.RouteGuideCoroutineStub +import kotlin.test.AfterTest +import kotlin.test.Test +import kotlin.test.assertEquals + +@OptIn(ExperimentalCoroutinesApi::class) +class RouteGuideServerTest { + private val server = RouteGuideServer(8980) + + @AfterTest + fun after() { + server.stop() + } + + @Test + fun listFeatures() = runTest { + server.start() + + val stub = RouteGuideCoroutineStub("localhost:8980", ChannelCredentials.createInsecure()) + + val rectangle = Rectangle { + lo = Point { + latitude = 407838351 + longitude = -746143763 + } + hi = Point { + latitude = 407838351 + longitude = -746143763 + } + } + + val features = stub.listFeatures(rectangle).toList() + assertEquals("Patriots Path, Mendham, NJ 07945, USA", features.first().name) + } +} diff --git a/examples/protos/build.gradle.kts b/examples/protos/build.gradle.kts index 6934e115c..a8cb2bfb6 100644 --- a/examples/protos/build.gradle.kts +++ b/examples/protos/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,41 +13,50 @@ * limitations under the License. */ -import com.google.protobuf.gradle.ProtobufExtension -import com.google.protobuf.gradle.id -import com.toasttab.protokt.gradle.protokt +import protokt.v1.gradle.protokt plugins { - id("protokt.jvm-conventions") + id("protokt.multiplatform-conventions") + id("org.jetbrains.kotlin.plugin.serialization") version libs.versions.kotlin } localProtokt() -pureKotlin() protokt { - generateGrpc = true + generate { + lite() + } } -configure { - plugins { - id("grpckt") { - artifact = libraries.grpcKotlinGenerator +kotlin { + sourceSets { + val commonMain by getting {} + + val jvmMain by getting { + dependencies { + implementation(libs.jackson) + } } - } - generateProtoTasks { - all().forEach { - it.plugins { - id("grpckt") + val jvmTest by getting { + dependencies { + runtimeOnly(libs.protobuf.java) // unclear why this is needed; no tests } } - } -} -dependencies { - implementation(project(":protokt-runtime-grpc")) - implementation(libraries.grpcKotlin) - implementation(libraries.grpcStub) - implementation(libraries.jackson) - implementation(libraries.kotlinxCoroutinesCore) + val jsMain by getting { + dependencies { + implementation(libs.kotlinx.serialization.json) + } + } + + jvm { + withJava() + } + + js(IR) { + nodejs {} + useCommonJs() + } + } } diff --git a/examples/protos/src/commonMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Database.kt b/examples/protos/src/commonMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Database.kt new file mode 100644 index 000000000..ee4e8dc9e --- /dev/null +++ b/examples/protos/src/commonMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Database.kt @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2021 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.io.grpc.examples.routeguide + +expect object Database { + fun features(): List +} diff --git a/examples/protos/src/main/kotlin/io/grpc/examples/routeguide/Durations.kt b/examples/protos/src/commonMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Durations.kt similarity index 87% rename from examples/protos/src/main/kotlin/io/grpc/examples/routeguide/Durations.kt rename to examples/protos/src/commonMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Durations.kt index ce87ce876..82e641304 100644 --- a/examples/protos/src/main/kotlin/io/grpc/examples/routeguide/Durations.kt +++ b/examples/protos/src/commonMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Durations.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,9 +13,9 @@ * limitations under the License. */ -package io.grpc.examples.routeguide +package protokt.v1.io.grpc.examples.routeguide -import com.toasttab.protokt.Duration +import protokt.v1.google.protobuf.Duration private const val MICROS_PER_SECOND = 1000000 private const val NANOS_PER_MICROSECOND = 1000 diff --git a/examples/protos/src/main/kotlin/io/grpc/examples/routeguide/Points.kt b/examples/protos/src/commonMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Points.kt similarity index 90% rename from examples/protos/src/main/kotlin/io/grpc/examples/routeguide/Points.kt rename to examples/protos/src/commonMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Points.kt index 27a4177f9..719f7a049 100644 --- a/examples/protos/src/main/kotlin/io/grpc/examples/routeguide/Points.kt +++ b/examples/protos/src/commonMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Points.kt @@ -1,11 +1,10 @@ /* * Copyright 2020 gRPC authors. - * Copyright 2021 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software @@ -15,7 +14,7 @@ * limitations under the License. */ -package io.grpc.examples.routeguide +package protokt.v1.io.grpc.examples.routeguide import kotlin.math.atan2 import kotlin.math.cos @@ -26,7 +25,8 @@ import kotlin.math.sqrt private const val EARTH_RADIUS_IN_M = 6371000 -private fun Int.toRadians() = Math.toRadians(toDouble()) +// java.lang.Math.toRadians(toDouble()) +private fun Int.toRadians() = toDouble() * 0.017453292519943295 infix fun Point.distanceTo(other: Point): Int { val lat1 = latitude.toRadians() diff --git a/examples/protos/src/main/resources/io/grpc/examples/routeguide/route_guide_db.json b/examples/protos/src/commonMain/resources/protokt/v1/io/grpc/examples/routeguide/route_guide_db.json similarity index 100% rename from examples/protos/src/main/resources/io/grpc/examples/routeguide/route_guide_db.json rename to examples/protos/src/commonMain/resources/protokt/v1/io/grpc/examples/routeguide/route_guide_db.json diff --git a/examples/protos/src/jsMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Database.kt b/examples/protos/src/jsMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Database.kt new file mode 100644 index 000000000..cbd40e531 --- /dev/null +++ b/examples/protos/src/jsMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Database.kt @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.io.grpc.examples.routeguide + +import kotlinx.serialization.Serializable +import kotlinx.serialization.json.Json + +actual object Database { + actual fun features() = + Json.decodeFromString(featuresJson()) + .feature + .map { f -> + Feature { + name = f.name + location = f.location.let { l -> + Point { + latitude = l.latitude + longitude = l.longitude + } + } + } + } + + private fun featuresJson(): String = + js( + """ + JSON.stringify( + require('../../../../../examples/protos/src/commonMain/resources/protokt/v1/io/grpc/examples/routeguide/route_guide_db.json') + ) + """ + ) as String + + @Serializable + data class FeatureDatabase( + val feature: List + ) + + @Serializable + data class JsonFeature( + val name: String, + val location: JsonPoint + ) + + @Serializable + data class JsonPoint( + val latitude: Int, + val longitude: Int + ) +} diff --git a/examples/protos/src/main/kotlin/io/grpc/examples/routeguide/Database.kt b/examples/protos/src/jvmMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Database.kt similarity index 55% rename from examples/protos/src/main/kotlin/io/grpc/examples/routeguide/Database.kt rename to examples/protos/src/jvmMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Database.kt index dbf7e1654..751eebac5 100644 --- a/examples/protos/src/main/kotlin/io/grpc/examples/routeguide/Database.kt +++ b/examples/protos/src/jvmMain/kotlin/protokt/v1/io/grpc/examples/routeguide/Database.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,17 +13,30 @@ * limitations under the License. */ -package io.grpc.examples.routeguide +package protokt.v1.io.grpc.examples.routeguide +import com.fasterxml.jackson.databind.DeserializationContext +import com.fasterxml.jackson.databind.KeyDeserializer import com.fasterxml.jackson.databind.ObjectMapper +import com.fasterxml.jackson.databind.module.SimpleModule import com.fasterxml.jackson.module.kotlin.KotlinModule import com.fasterxml.jackson.module.kotlin.readValue -object Database { - fun features(): List { +actual object Database { + actual fun features(): List { return javaClass.getResourceAsStream("route_guide_db.json").use { ObjectMapper() .registerModule(KotlinModule.Builder().build()) + .registerModule( + SimpleModule() + .addKeyDeserializer( + UInt::class.java, + object : KeyDeserializer() { + override fun deserializeKey(key: String, ctxt: DeserializationContext) = + key.toUInt() + } + ) + ) .readValue(it!!.reader()) }.feature } diff --git a/extensions/build.gradle.kts b/extensions/build.gradle.kts index 9c86709c7..fd83c6fb9 100644 --- a/extensions/build.gradle.kts +++ b/extensions/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2023 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,6 +13,10 @@ * limitations under the License. */ -subprojects { - pureKotlin() +spotless { + kotlin { + targetExclude( + "protokt-jvm-extensions-lite/src/main/kotlin/com/toasttab/protokt/ext/inet_socket_address.kt" + ) + } } diff --git a/extensions/protokt-extensions-api/api/protokt-extensions-api.api b/extensions/protokt-extensions-api/api/protokt-extensions-api.api index b4597fdf6..17fb2f254 100644 --- a/extensions/protokt-extensions-api/api/protokt-extensions-api.api +++ b/extensions/protokt-extensions-api/api/protokt-extensions-api.api @@ -1,11 +1,18 @@ -public abstract interface class com/toasttab/protokt/ext/Converter { +public abstract interface class com/toasttab/protokt/ext/Converter : protokt/v1/Converter { +} + +public abstract interface class com/toasttab/protokt/ext/OptimizedSizeofConverter : com/toasttab/protokt/ext/Converter { + public abstract fun sizeof (Ljava/lang/Object;)I +} + +public abstract interface class protokt/v1/Converter { public abstract fun getWrapped ()Lkotlin/reflect/KClass; public abstract fun getWrapper ()Lkotlin/reflect/KClass; public abstract fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; public abstract fun wrap (Ljava/lang/Object;)Ljava/lang/Object; } -public abstract interface class com/toasttab/protokt/ext/OptimizedSizeofConverter : com/toasttab/protokt/ext/Converter { - public abstract fun sizeof (Ljava/lang/Object;)I +public abstract interface class protokt/v1/OptimizedSizeOfConverter : protokt/v1/Converter { + public abstract fun sizeOf (Ljava/lang/Object;)I } diff --git a/extensions/protokt-extensions-api/build.gradle.kts b/extensions/protokt-extensions-api/build.gradle.kts index 81c778881..ccf795c73 100644 --- a/extensions/protokt-extensions-api/build.gradle.kts +++ b/extensions/protokt-extensions-api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,9 @@ */ plugins { - id("protokt.jvm-conventions") + id("protokt.multiplatform-conventions") } enablePublishing() +compatibleWithAndroid() trackKotlinApiCompatibility() - -dependencies { - compileOnly(libraries.protobufJava) -} diff --git a/extensions/protokt-extensions-api/src/commonMain/kotlin/com/toasttab/protokt/ext/Converter.kt b/extensions/protokt-extensions-api/src/commonMain/kotlin/com/toasttab/protokt/ext/Converter.kt new file mode 100644 index 000000000..e09ea1b01 --- /dev/null +++ b/extensions/protokt-extensions-api/src/commonMain/kotlin/com/toasttab/protokt/ext/Converter.kt @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.toasttab.protokt.ext + +import protokt.v1.Converter + +@Deprecated("for backwards compatibility only") +interface Converter : Converter diff --git a/extensions/protokt-extensions-api/src/main/kotlin/com/toasttab/protokt/ext/OptimizedSizeofConverter.kt b/extensions/protokt-extensions-api/src/commonMain/kotlin/com/toasttab/protokt/ext/OptimizedSizeofConverter.kt similarity index 86% rename from extensions/protokt-extensions-api/src/main/kotlin/com/toasttab/protokt/ext/OptimizedSizeofConverter.kt rename to extensions/protokt-extensions-api/src/commonMain/kotlin/com/toasttab/protokt/ext/OptimizedSizeofConverter.kt index 64808adb2..6c358eb5d 100644 --- a/extensions/protokt-extensions-api/src/main/kotlin/com/toasttab/protokt/ext/OptimizedSizeofConverter.kt +++ b/extensions/protokt-extensions-api/src/commonMain/kotlin/com/toasttab/protokt/ext/OptimizedSizeofConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ package com.toasttab.protokt.ext +@Deprecated("for backwards compatibility only") +@Suppress("DEPRECATION") interface OptimizedSizeofConverter : Converter { fun sizeof(wrapped: S): Int } diff --git a/extensions/protokt-extensions-api/src/main/kotlin/com/toasttab/protokt/ext/Converter.kt b/extensions/protokt-extensions-api/src/commonMain/kotlin/protokt.v1/Converter.kt similarity index 91% rename from extensions/protokt-extensions-api/src/main/kotlin/com/toasttab/protokt/ext/Converter.kt rename to extensions/protokt-extensions-api/src/commonMain/kotlin/protokt.v1/Converter.kt index 8da85d583..b563b11c3 100644 --- a/extensions/protokt-extensions-api/src/main/kotlin/com/toasttab/protokt/ext/Converter.kt +++ b/extensions/protokt-extensions-api/src/commonMain/kotlin/protokt.v1/Converter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * limitations under the License. */ -package com.toasttab.protokt.ext +package protokt.v1 import kotlin.reflect.KClass diff --git a/extensions/protokt-extensions-api/src/commonMain/kotlin/protokt.v1/OptimizedSizeOfConverter.kt b/extensions/protokt-extensions-api/src/commonMain/kotlin/protokt.v1/OptimizedSizeOfConverter.kt new file mode 100644 index 000000000..d64c134fb --- /dev/null +++ b/extensions/protokt-extensions-api/src/commonMain/kotlin/protokt.v1/OptimizedSizeOfConverter.kt @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1 + +interface OptimizedSizeOfConverter : Converter { + fun sizeOf(wrapped: S): Int +} diff --git a/extensions/protokt-extensions-lite/api/protokt-extensions-lite.api b/extensions/protokt-extensions-lite/api/protokt-extensions-lite.api index f5c6004cf..2f8146e70 100644 --- a/extensions/protokt-extensions-lite/api/protokt-extensions-lite.api +++ b/extensions/protokt-extensions-lite/api/protokt-extensions-lite.api @@ -1,409 +1,537 @@ -public final class com/toasttab/protokt/ext/InetSocketAddress : com/toasttab/protokt/rt/KtMessage { - public static final field Deserializer Lcom/toasttab/protokt/ext/InetSocketAddress$Deserializer; - public synthetic fun (Ljava/net/InetAddress;ILcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/InetSocketAddress; +public final class protokt/v1/ProtoktEnumOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/ProtoktEnumOptions$Deserializer; + public synthetic fun (Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktEnumOptions; public fun equals (Ljava/lang/Object;)Z - public final fun getAddress ()Ljava/net/InetAddress; + public final fun getDeprecationMessage ()Ljava/lang/String; public fun getMessageSize ()I - public final fun getPort ()I - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } -public final class com/toasttab/protokt/ext/InetSocketAddress$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { - public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/ext/InetSocketAddress; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/ext/InetSocketAddress; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/ext/InetSocketAddress; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/ext/InetSocketAddress; - public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/ext/InetSocketAddress; - public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize ([B)Lcom/toasttab/protokt/ext/InetSocketAddress; - public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; - public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; - public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/InetSocketAddress; -} - -public final class com/toasttab/protokt/ext/InetSocketAddress$InetSocketAddressDsl { +public final class protokt/v1/ProtoktEnumOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/ProtoktEnumOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktEnumOptions; +} + +public final class protokt/v1/ProtoktEnumOptions$ProtoktEnumOptionsDsl { public fun ()V - public final fun build ()Lcom/toasttab/protokt/ext/InetSocketAddress; - public final fun getAddress ()Ljava/net/InetAddress; - public final fun getPort ()I - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; - public final fun setAddress (Ljava/net/InetAddress;)V - public final fun setPort (I)V - public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V -} - -public final class com/toasttab/protokt/ext/InetSocketAddressConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/ext/InetSocketAddressConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun unwrap (Ljava/net/InetSocketAddress;)Lcom/toasttab/protokt/ext/InetSocketAddress; - public fun wrap (Lcom/toasttab/protokt/ext/InetSocketAddress;)Ljava/net/InetSocketAddress; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/ext/ProtoktEnumOptions : com/toasttab/protokt/rt/KtMessage { - public static final field Deserializer Lcom/toasttab/protokt/ext/ProtoktEnumOptions$Deserializer; - public synthetic fun (Ljava/lang/String;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktEnumOptions; + public final fun build ()Lprotokt/v1/ProtoktEnumOptions; + public final fun getDeprecationMessage ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setDeprecationMessage (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/ProtoktEnumValueOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/ProtoktEnumValueOptions$Deserializer; + public synthetic fun (Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktEnumValueOptions; public fun equals (Ljava/lang/Object;)Z public final fun getDeprecationMessage ()Ljava/lang/String; public fun getMessageSize ()I - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } -public final class com/toasttab/protokt/ext/ProtoktEnumOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { - public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/ext/ProtoktEnumOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/ext/ProtoktEnumOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/ext/ProtoktEnumOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/ext/ProtoktEnumOptions; - public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/ext/ProtoktEnumOptions; - public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize ([B)Lcom/toasttab/protokt/ext/ProtoktEnumOptions; - public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; - public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; - public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktEnumOptions; -} - -public final class com/toasttab/protokt/ext/ProtoktEnumOptions$ProtoktEnumOptionsDsl { +public final class protokt/v1/ProtoktEnumValueOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/ProtoktEnumValueOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktEnumValueOptions; +} + +public final class protokt/v1/ProtoktEnumValueOptions$ProtoktEnumValueOptionsDsl { public fun ()V - public final fun build ()Lcom/toasttab/protokt/ext/ProtoktEnumOptions; + public final fun build ()Lprotokt/v1/ProtoktEnumValueOptions; public final fun getDeprecationMessage ()Ljava/lang/String; - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; public final fun setDeprecationMessage (Ljava/lang/String;)V - public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V } -public final class com/toasttab/protokt/ext/ProtoktEnumValueOptions : com/toasttab/protokt/rt/KtMessage { - public static final field Deserializer Lcom/toasttab/protokt/ext/ProtoktEnumValueOptions$Deserializer; - public synthetic fun (Ljava/lang/String;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktEnumValueOptions; +public final class protokt/v1/ProtoktFieldOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/ProtoktFieldOptions$Deserializer; + public synthetic fun (ZLjava/lang/String;ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktFieldOptions; public fun equals (Ljava/lang/Object;)Z + public final fun getBytesSlice ()Z public final fun getDeprecationMessage ()Ljava/lang/String; + public final fun getKeyWrap ()Ljava/lang/String; public fun getMessageSize ()I - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getNonNull ()Z + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValueWrap ()Ljava/lang/String; + public final fun getWrap ()Ljava/lang/String; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } -public final class com/toasttab/protokt/ext/ProtoktEnumValueOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { - public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/ext/ProtoktEnumValueOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/ext/ProtoktEnumValueOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/ext/ProtoktEnumValueOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/ext/ProtoktEnumValueOptions; - public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/ext/ProtoktEnumValueOptions; - public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize ([B)Lcom/toasttab/protokt/ext/ProtoktEnumValueOptions; - public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; - public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; - public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktEnumValueOptions; -} - -public final class com/toasttab/protokt/ext/ProtoktEnumValueOptions$ProtoktEnumValueOptionsDsl { +public final class protokt/v1/ProtoktFieldOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/ProtoktFieldOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktFieldOptions; +} + +public final class protokt/v1/ProtoktFieldOptions$ProtoktFieldOptionsDsl { public fun ()V - public final fun build ()Lcom/toasttab/protokt/ext/ProtoktEnumValueOptions; + public final fun build ()Lprotokt/v1/ProtoktFieldOptions; + public final fun getBytesSlice ()Z public final fun getDeprecationMessage ()Ljava/lang/String; - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getKeyWrap ()Ljava/lang/String; + public final fun getNonNull ()Z + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValueWrap ()Ljava/lang/String; + public final fun getWrap ()Ljava/lang/String; + public final fun setBytesSlice (Z)V public final fun setDeprecationMessage (Ljava/lang/String;)V - public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V + public final fun setKeyWrap (Ljava/lang/String;)V + public final fun setNonNull (Z)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setValueWrap (Ljava/lang/String;)V + public final fun setWrap (Ljava/lang/String;)V } -public final class com/toasttab/protokt/ext/ProtoktFieldOptions : com/toasttab/protokt/rt/KtMessage { - public static final field Deserializer Lcom/toasttab/protokt/ext/ProtoktFieldOptions$Deserializer; - public synthetic fun (ZLjava/lang/String;ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktFieldOptions; +public final class protokt/v1/ProtoktFileOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/ProtoktFileOptions$Deserializer; + public synthetic fun (Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktFileOptions; + public fun equals (Ljava/lang/Object;)Z + public final fun getFileDescriptorObjectName ()Ljava/lang/String; + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/ProtoktFileOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/ProtoktFileOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktFileOptions; +} + +public final class protokt/v1/ProtoktFileOptions$ProtoktFileOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/ProtoktFileOptions; + public final fun getFileDescriptorObjectName ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setFileDescriptorObjectName (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/ProtoktKt { + public static final fun ProtoktEnumOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktEnumOptions; + public static final fun ProtoktEnumValueOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktEnumValueOptions; + public static final fun ProtoktFieldOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktFieldOptions; + public static final fun ProtoktFileOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktFileOptions; + public static final fun ProtoktMessageOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktMessageOptions; + public static final fun ProtoktMethodOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktMethodOptions; + public static final fun ProtoktOneofOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktOneofOptions; + public static final fun ProtoktServiceOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktServiceOptions; +} + +public final class protokt/v1/ProtoktMessageOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/ProtoktMessageOptions$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktMessageOptions; + public fun equals (Ljava/lang/Object;)Z + public final fun getDeprecationMessage ()Ljava/lang/String; + public final fun getImplements ()Ljava/lang/String; + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/ProtoktMessageOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/ProtoktMessageOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktMessageOptions; +} + +public final class protokt/v1/ProtoktMessageOptions$ProtoktMessageOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/ProtoktMessageOptions; + public final fun getDeprecationMessage ()Ljava/lang/String; + public final fun getImplements ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setDeprecationMessage (Ljava/lang/String;)V + public final fun setImplements (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/ProtoktMethodOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/ProtoktMethodOptions$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktMethodOptions; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getRequestMarshaller ()Ljava/lang/String; + public final fun getResponseMarshaller ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/ProtoktMethodOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/ProtoktMethodOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktMethodOptions; +} + +public final class protokt/v1/ProtoktMethodOptions$ProtoktMethodOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/ProtoktMethodOptions; + public final fun getRequestMarshaller ()Ljava/lang/String; + public final fun getResponseMarshaller ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setRequestMarshaller (Ljava/lang/String;)V + public final fun setResponseMarshaller (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/ProtoktOneofOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/ProtoktOneofOptions$Deserializer; + public synthetic fun (ZLjava/lang/String;Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktOneofOptions; + public fun equals (Ljava/lang/Object;)Z + public final fun getDeprecationMessage ()Ljava/lang/String; + public final fun getImplements ()Ljava/lang/String; + public fun getMessageSize ()I + public final fun getNonNull ()Z + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/ProtoktOneofOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/ProtoktOneofOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktOneofOptions; +} + +public final class protokt/v1/ProtoktOneofOptions$ProtoktOneofOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/ProtoktOneofOptions; + public final fun getDeprecationMessage ()Ljava/lang/String; + public final fun getImplements ()Ljava/lang/String; + public final fun getNonNull ()Z + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setDeprecationMessage (Ljava/lang/String;)V + public final fun setImplements (Ljava/lang/String;)V + public final fun setNonNull (Z)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/ProtoktServiceOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/ProtoktServiceOptions$Deserializer; + public synthetic fun (Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktServiceOptions; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/ProtoktServiceOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/ProtoktServiceOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/ProtoktServiceOptions; +} + +public final class protokt/v1/ProtoktServiceOptions$ProtoktServiceOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/ProtoktServiceOptions; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/protokt/ProtoktEnumOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/protokt/ProtoktEnumOptions$Deserializer; + public synthetic fun (Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktEnumOptions; + public fun equals (Ljava/lang/Object;)Z + public final fun getDeprecationMessage ()Ljava/lang/String; + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/protokt/ProtoktEnumOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/protokt/ProtoktEnumOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktEnumOptions; +} + +public final class protokt/v1/protokt/ProtoktEnumOptions$ProtoktEnumOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/protokt/ProtoktEnumOptions; + public final fun getDeprecationMessage ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setDeprecationMessage (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/protokt/ProtoktEnumValueOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/protokt/ProtoktEnumValueOptions$Deserializer; + public synthetic fun (Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktEnumValueOptions; + public fun equals (Ljava/lang/Object;)Z + public final fun getDeprecationMessage ()Ljava/lang/String; + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/protokt/ProtoktEnumValueOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/protokt/ProtoktEnumValueOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktEnumValueOptions; +} + +public final class protokt/v1/protokt/ProtoktEnumValueOptions$ProtoktEnumValueOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/protokt/ProtoktEnumValueOptions; + public final fun getDeprecationMessage ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setDeprecationMessage (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/protokt/ProtoktFieldOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/protokt/ProtoktFieldOptions$Deserializer; + public synthetic fun (ZLjava/lang/String;ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktFieldOptions; public fun equals (Ljava/lang/Object;)Z public final fun getBytesSlice ()Z public final fun getDeprecationMessage ()Ljava/lang/String; public final fun getKeyWrap ()Ljava/lang/String; public fun getMessageSize ()I public final fun getNonNull ()Z - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; public final fun getValueWrap ()Ljava/lang/String; public final fun getWrap ()Ljava/lang/String; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } -public final class com/toasttab/protokt/ext/ProtoktFieldOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { - public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/ext/ProtoktFieldOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/ext/ProtoktFieldOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/ext/ProtoktFieldOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/ext/ProtoktFieldOptions; - public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/ext/ProtoktFieldOptions; - public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize ([B)Lcom/toasttab/protokt/ext/ProtoktFieldOptions; - public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; - public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; - public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktFieldOptions; -} - -public final class com/toasttab/protokt/ext/ProtoktFieldOptions$ProtoktFieldOptionsDsl { +public final class protokt/v1/protokt/ProtoktFieldOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/protokt/ProtoktFieldOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktFieldOptions; +} + +public final class protokt/v1/protokt/ProtoktFieldOptions$ProtoktFieldOptionsDsl { public fun ()V - public final fun build ()Lcom/toasttab/protokt/ext/ProtoktFieldOptions; + public final fun build ()Lprotokt/v1/protokt/ProtoktFieldOptions; public final fun getBytesSlice ()Z public final fun getDeprecationMessage ()Ljava/lang/String; public final fun getKeyWrap ()Ljava/lang/String; public final fun getNonNull ()Z - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; public final fun getValueWrap ()Ljava/lang/String; public final fun getWrap ()Ljava/lang/String; public final fun setBytesSlice (Z)V public final fun setDeprecationMessage (Ljava/lang/String;)V public final fun setKeyWrap (Ljava/lang/String;)V public final fun setNonNull (Z)V - public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V public final fun setValueWrap (Ljava/lang/String;)V public final fun setWrap (Ljava/lang/String;)V } -public final class com/toasttab/protokt/ext/ProtoktFileOptions : com/toasttab/protokt/rt/KtMessage { - public static final field Deserializer Lcom/toasttab/protokt/ext/ProtoktFileOptions$Deserializer; - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktFileOptions; +public final class protokt/v1/protokt/ProtoktFileOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/protokt/ProtoktFileOptions$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktFileOptions; public fun equals (Ljava/lang/Object;)Z public final fun getFileDescriptorObjectName ()Ljava/lang/String; public final fun getKotlinPackage ()Ljava/lang/String; public fun getMessageSize ()I - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } -public final class com/toasttab/protokt/ext/ProtoktFileOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { - public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/ext/ProtoktFileOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/ext/ProtoktFileOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/ext/ProtoktFileOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/ext/ProtoktFileOptions; - public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/ext/ProtoktFileOptions; - public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize ([B)Lcom/toasttab/protokt/ext/ProtoktFileOptions; - public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; - public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; - public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktFileOptions; -} - -public final class com/toasttab/protokt/ext/ProtoktFileOptions$ProtoktFileOptionsDsl { +public final class protokt/v1/protokt/ProtoktFileOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/protokt/ProtoktFileOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktFileOptions; +} + +public final class protokt/v1/protokt/ProtoktFileOptions$ProtoktFileOptionsDsl { public fun ()V - public final fun build ()Lcom/toasttab/protokt/ext/ProtoktFileOptions; + public final fun build ()Lprotokt/v1/protokt/ProtoktFileOptions; public final fun getFileDescriptorObjectName ()Ljava/lang/String; public final fun getKotlinPackage ()Ljava/lang/String; - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; public final fun setFileDescriptorObjectName (Ljava/lang/String;)V public final fun setKotlinPackage (Ljava/lang/String;)V - public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/protokt/ProtoktKt { + public static final fun ProtoktEnumOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktEnumOptions; + public static final fun ProtoktEnumValueOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktEnumValueOptions; + public static final fun ProtoktFieldOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktFieldOptions; + public static final fun ProtoktFileOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktFileOptions; + public static final fun ProtoktMessageOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktMessageOptions; + public static final fun ProtoktMethodOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktMethodOptions; + public static final fun ProtoktOneofOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktOneofOptions; + public static final fun ProtoktServiceOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktServiceOptions; } -public final class com/toasttab/protokt/ext/ProtoktMessageOptions : com/toasttab/protokt/rt/KtMessage { - public static final field Deserializer Lcom/toasttab/protokt/ext/ProtoktMessageOptions$Deserializer; - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktMessageOptions; +public final class protokt/v1/protokt/ProtoktMessageOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/protokt/ProtoktMessageOptions$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktMessageOptions; public fun equals (Ljava/lang/Object;)Z public final fun getDeprecationMessage ()Ljava/lang/String; public final fun getImplements ()Ljava/lang/String; public fun getMessageSize ()I - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } -public final class com/toasttab/protokt/ext/ProtoktMessageOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { - public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/ext/ProtoktMessageOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/ext/ProtoktMessageOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/ext/ProtoktMessageOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/ext/ProtoktMessageOptions; - public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/ext/ProtoktMessageOptions; - public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize ([B)Lcom/toasttab/protokt/ext/ProtoktMessageOptions; - public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; - public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; - public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktMessageOptions; -} - -public final class com/toasttab/protokt/ext/ProtoktMessageOptions$ProtoktMessageOptionsDsl { +public final class protokt/v1/protokt/ProtoktMessageOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/protokt/ProtoktMessageOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktMessageOptions; +} + +public final class protokt/v1/protokt/ProtoktMessageOptions$ProtoktMessageOptionsDsl { public fun ()V - public final fun build ()Lcom/toasttab/protokt/ext/ProtoktMessageOptions; + public final fun build ()Lprotokt/v1/protokt/ProtoktMessageOptions; public final fun getDeprecationMessage ()Ljava/lang/String; public final fun getImplements ()Ljava/lang/String; - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; public final fun setDeprecationMessage (Ljava/lang/String;)V public final fun setImplements (Ljava/lang/String;)V - public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V } -public final class com/toasttab/protokt/ext/ProtoktMethodOptions : com/toasttab/protokt/rt/KtMessage { - public static final field Deserializer Lcom/toasttab/protokt/ext/ProtoktMethodOptions$Deserializer; - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktMethodOptions; +public final class protokt/v1/protokt/ProtoktMethodOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/protokt/ProtoktMethodOptions$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktMethodOptions; public fun equals (Ljava/lang/Object;)Z public fun getMessageSize ()I public final fun getRequestMarshaller ()Ljava/lang/String; public final fun getResponseMarshaller ()Ljava/lang/String; - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } -public final class com/toasttab/protokt/ext/ProtoktMethodOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { - public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/ext/ProtoktMethodOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/ext/ProtoktMethodOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/ext/ProtoktMethodOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/ext/ProtoktMethodOptions; - public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/ext/ProtoktMethodOptions; - public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize ([B)Lcom/toasttab/protokt/ext/ProtoktMethodOptions; - public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; - public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; - public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktMethodOptions; -} - -public final class com/toasttab/protokt/ext/ProtoktMethodOptions$ProtoktMethodOptionsDsl { +public final class protokt/v1/protokt/ProtoktMethodOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/protokt/ProtoktMethodOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktMethodOptions; +} + +public final class protokt/v1/protokt/ProtoktMethodOptions$ProtoktMethodOptionsDsl { public fun ()V - public final fun build ()Lcom/toasttab/protokt/ext/ProtoktMethodOptions; + public final fun build ()Lprotokt/v1/protokt/ProtoktMethodOptions; public final fun getRequestMarshaller ()Ljava/lang/String; public final fun getResponseMarshaller ()Ljava/lang/String; - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; public final fun setRequestMarshaller (Ljava/lang/String;)V public final fun setResponseMarshaller (Ljava/lang/String;)V - public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V } -public final class com/toasttab/protokt/ext/ProtoktOneofOptions : com/toasttab/protokt/rt/KtMessage { - public static final field Deserializer Lcom/toasttab/protokt/ext/ProtoktOneofOptions$Deserializer; - public synthetic fun (ZLjava/lang/String;Ljava/lang/String;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktOneofOptions; +public final class protokt/v1/protokt/ProtoktOneofOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/protokt/ProtoktOneofOptions$Deserializer; + public synthetic fun (ZLjava/lang/String;Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktOneofOptions; public fun equals (Ljava/lang/Object;)Z public final fun getDeprecationMessage ()Ljava/lang/String; public final fun getImplements ()Ljava/lang/String; public fun getMessageSize ()I public final fun getNonNull ()Z - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } -public final class com/toasttab/protokt/ext/ProtoktOneofOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { - public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/ext/ProtoktOneofOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/ext/ProtoktOneofOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/ext/ProtoktOneofOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/ext/ProtoktOneofOptions; - public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/ext/ProtoktOneofOptions; - public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize ([B)Lcom/toasttab/protokt/ext/ProtoktOneofOptions; - public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; - public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; - public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktOneofOptions; -} - -public final class com/toasttab/protokt/ext/ProtoktOneofOptions$ProtoktOneofOptionsDsl { +public final class protokt/v1/protokt/ProtoktOneofOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/protokt/ProtoktOneofOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktOneofOptions; +} + +public final class protokt/v1/protokt/ProtoktOneofOptions$ProtoktOneofOptionsDsl { public fun ()V - public final fun build ()Lcom/toasttab/protokt/ext/ProtoktOneofOptions; + public final fun build ()Lprotokt/v1/protokt/ProtoktOneofOptions; public final fun getDeprecationMessage ()Ljava/lang/String; public final fun getImplements ()Ljava/lang/String; public final fun getNonNull ()Z - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; public final fun setDeprecationMessage (Ljava/lang/String;)V public final fun setImplements (Ljava/lang/String;)V public final fun setNonNull (Z)V - public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V } -public final class com/toasttab/protokt/ext/ProtoktServiceOptions : com/toasttab/protokt/rt/KtMessage { - public static final field Deserializer Lcom/toasttab/protokt/ext/ProtoktServiceOptions$Deserializer; - public synthetic fun (Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktServiceOptions; +public final class protokt/v1/protokt/ProtoktServiceOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/protokt/ProtoktServiceOptions$Deserializer; + public synthetic fun (Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktServiceOptions; public fun equals (Ljava/lang/Object;)Z public fun getMessageSize ()I - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } -public final class com/toasttab/protokt/ext/ProtoktServiceOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { - public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/ext/ProtoktServiceOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/ext/ProtoktServiceOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/ext/ProtoktServiceOptions; - public synthetic fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/ext/ProtoktServiceOptions; - public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/ext/ProtoktServiceOptions; - public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; - public fun deserialize ([B)Lcom/toasttab/protokt/ext/ProtoktServiceOptions; - public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; - public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; - public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/ProtoktServiceOptions; -} - -public final class com/toasttab/protokt/ext/ProtoktServiceOptions$ProtoktServiceOptionsDsl { +public final class protokt/v1/protokt/ProtoktServiceOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/protokt/ProtoktServiceOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/protokt/ProtoktServiceOptions; +} + +public final class protokt/v1/protokt/ProtoktServiceOptions$ProtoktServiceOptionsDsl { public fun ()V - public final fun build ()Lcom/toasttab/protokt/ext/ProtoktServiceOptions; - public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; - public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V + public final fun build ()Lprotokt/v1/protokt/ProtoktServiceOptions; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V } diff --git a/extensions/protokt-extensions-lite/build.gradle.kts b/extensions/protokt-extensions-lite/build.gradle.kts index f6e0ccffc..6a1692085 100644 --- a/extensions/protokt-extensions-lite/build.gradle.kts +++ b/extensions/protokt-extensions-lite/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,27 +13,31 @@ * limitations under the License. */ -import com.toasttab.protokt.gradle.protokt -import com.toasttab.protokt.gradle.protoktExtensions +import protokt.v1.gradle.protokt plugins { - id("protokt.jvm-conventions") - kotlin("kapt") + id("protokt.multiplatform-conventions") } localProtokt() enablePublishing() +compatibleWithAndroid() trackKotlinApiCompatibility() protokt { - lite = true + generate { + lite() + } } -dependencies { - protoktExtensions(project(":extensions:protokt-extensions-simple")) +kotlin { + sourceSets { + val commonMain by getting {} - implementation(project(":extensions:protokt-extensions-api")) - implementation(libraries.autoServiceAnnotations) - - kapt(libraries.autoService) + val jvmTest by getting { + dependencies { + runtimeOnly(libs.protobuf.lite) // unclear why this is needed; no tests + } + } + } } diff --git a/extensions/protokt-extensions-lite/src/main/proto/protokt/protokt.proto b/extensions/protokt-extensions-lite/src/main/proto/protokt/protokt.proto index 63bd090d8..c59362f47 100644 --- a/extensions/protokt-extensions-lite/src/main/proto/protokt/protokt.proto +++ b/extensions/protokt-extensions-lite/src/main/proto/protokt/protokt.proto @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,8 @@ option java_package = "com.toasttab.protokt.ext"; option java_outer_classname = "ProtoktProto"; message ProtoktFileOptions { + option deprecated = true; + // Specify the Kotlin package for the generated file. Precedence is given // first to this Kotlin package, then to the Java package if enabled in // the plugin options, and finally to the protobuf package. @@ -38,6 +40,8 @@ extend google.protobuf.FileOptions { } message ProtoktMessageOptions { + option deprecated = true; + // Declares that the message class implements an interface. Scoping rules // are the same as those for declaring wrapper types. string implements = 1; @@ -51,6 +55,8 @@ extend google.protobuf.MessageOptions { } message ProtoktFieldOptions { + option deprecated = true; + // Makes a message-type field non-nullable in the generated Kotlin code. // Beware that deserialization will NPE if the field is missing from the // protobuf payload. Adding a non-null field to an existing message is a @@ -130,6 +136,8 @@ extend google.protobuf.FieldOptions { } message ProtoktOneofOptions { + option deprecated = true; + // Makes a oneof field non-nullable in generated Kotlin code. Beware that // deserialization will NPE if the field is missing from the protobuf payload. // Adding a non-null field to an existing message is a backwards-incompatible @@ -161,6 +169,8 @@ extend google.protobuf.OneofOptions { } message ProtoktEnumOptions { + option deprecated = true; + // Provides a message for deprecation string deprecation_message = 1; } @@ -170,6 +180,8 @@ extend google.protobuf.EnumOptions { } message ProtoktEnumValueOptions { + option deprecated = true; + // Provides a message for deprecation string deprecation_message = 1; } @@ -178,13 +190,17 @@ extend google.protobuf.EnumValueOptions { ProtoktEnumValueOptions enum_value = 1072; } -message ProtoktServiceOptions {} +message ProtoktServiceOptions { + option deprecated = true; +} extend google.protobuf.ServiceOptions { ProtoktServiceOptions service = 1072; } message ProtoktMethodOptions { + option deprecated = true; + // Provides a custom request marshaller for the generated method descriptor. // Substitutes the provided expression directly for // `com.toasttab.protokt.grpc.KtMarshaller()` diff --git a/extensions/protokt-extensions-lite/src/main/proto/protokt/v1/protokt.proto b/extensions/protokt-extensions-lite/src/main/proto/protokt/v1/protokt.proto new file mode 100644 index 000000000..3dcae4cbe --- /dev/null +++ b/extensions/protokt-extensions-lite/src/main/proto/protokt/v1/protokt.proto @@ -0,0 +1,196 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +syntax = "proto3"; + +package protokt.v1; + +import "google/protobuf/descriptor.proto"; + +option java_package = "com.toasttab.protokt.v1"; +option java_outer_classname = "ProtoktProto"; + +message ProtoktFileOptions { + // Specify the name of the Kotlin object that contains the reference to this + // file's FileDescriptor object. + string file_descriptor_object_name = 1; +} + +extend google.protobuf.FileOptions { + ProtoktFileOptions file = 1072; +} + +message ProtoktMessageOptions { + // Declares that the message class implements an interface. Scoping rules + // are the same as those for declaring wrapper types. + string implements = 1; + + // Provides a message for deprecation + string deprecation_message = 2; +} + +extend google.protobuf.MessageOptions { + ProtoktMessageOptions class = 1072; +} + +message ProtoktFieldOptions { + // Makes a message-type field non-nullable in the generated Kotlin code. + // Beware that deserialization will NPE if the field is missing from the + // protobuf payload. Adding a non-null field to an existing message is a + // backwards-incompatible change. + // + // For example: + // + // message Foo { + // string id = 1 [(protokt.property).non_null = true]; + // } + bool non_null = 1; + + // Expose a wrapper class instead of a raw protobuf type. + // + // For example: + // + // message Foo { + // string id = 1 [(protokt.property).wrap = "com.foo.FooId"]; + // } + // + // data class FooId(val value: String) + // + // will yield: + // class Foo(val id: FooId) ... + // + // If the Kotlin package (or Java package, if the Kotlin package is + // unspecified) of this file is the same as the package of the wrapper type, + // full qualification is optional. + // + // This option can be applied to repeated fields. + string wrap = 2; + + // Maps a bytes field to BytesSlice. If deserialized from a byte array, + // BytesSlice will point to the source array without copying the subarray. + bool bytes_slice = 3; + + // Provides a message for deprecation + string deprecation_message = 4; + + // Expose a wrapper class instead of a raw protobuf type for the key type of + // a map. + // + // For example: + // + // message Foo { + // map map = 1 [(protokt.property).key_wrap = "com.foo.FooId"]; + // } + // + // data class FooId(val value: String) + // + // will yield: + // class Foo(val map: Map) ... + // + // Scoping rules are the same as those for declaring regular field wrapper types. + string key_wrap = 5; + + // Expose a wrapper class instead of a raw protobuf type for the value type of + // a map. + // + // For example: + // + // message Foo { + // map map = 1 [(protokt.property).value_wrap = "com.foo.FooId"]; + // } + // + // data class FooId(val value: String) + // + // will yield: + // class Foo(val map: Map) ... + // + // Scoping rules are the same as those for declaring regular field wrapper types. + string value_wrap = 6; +} + +extend google.protobuf.FieldOptions { + ProtoktFieldOptions property = 1072; +} + +message ProtoktOneofOptions { + // Makes a oneof field non-nullable in generated Kotlin code. Beware that + // deserialization will NPE if the field is missing from the protobuf payload. + // Adding a non-null field to an existing message is a backwards-incompatible + // change. + // + // For example: + // + // message Message { + // oneof some_field_name { + // option (protokt.oneof).non_null = true; + // + // string id = 1; + // } + // } + // + bool non_null = 1; + + // Make the sealed class implement an interface, enforcing the presence of a + // property in each possible variant. Scoping rules are the same as those + // for declaring wrapper types. + string implements = 2; + + // Provides a message for deprecation + string deprecation_message = 3; +} + +extend google.protobuf.OneofOptions { + ProtoktOneofOptions oneof = 1072; +} + +message ProtoktEnumOptions { + // Provides a message for deprecation + string deprecation_message = 1; +} + +extend google.protobuf.EnumOptions { + ProtoktEnumOptions enum = 1072; +} + +message ProtoktEnumValueOptions { + // Provides a message for deprecation + string deprecation_message = 1; +} + +extend google.protobuf.EnumValueOptions { + ProtoktEnumValueOptions enum_value = 1072; +} + +message ProtoktServiceOptions {} + +extend google.protobuf.ServiceOptions { + ProtoktServiceOptions service = 1072; +} + +message ProtoktMethodOptions { + // Provides a custom request marshaller for the generated method descriptor. + // Substitutes the provided expression directly for + // `com.toasttab.protokt.grpc.KtMarshaller()` + string request_marshaller = 1; + + // Provides a custom response marshaller for the generated method descriptor. + // Substitutes the provided expression directly for + // `com.toasttab.protokt.grpc.KtMarshaller()` + string response_marshaller = 2; +} + +extend google.protobuf.MethodOptions { + ProtoktMethodOptions method = 1072; +} diff --git a/extensions/protokt-extensions-simple/api/protokt-extensions-simple.api b/extensions/protokt-extensions-simple/api/protokt-extensions-simple.api deleted file mode 100644 index 7ebda6308..000000000 --- a/extensions/protokt-extensions-simple/api/protokt-extensions-simple.api +++ /dev/null @@ -1,94 +0,0 @@ -public final class com/toasttab/protokt/ext/DurationConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/ext/DurationConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun unwrap (Ljava/time/Duration;)Lcom/toasttab/protokt/Duration; - public fun wrap (Lcom/toasttab/protokt/Duration;)Ljava/time/Duration; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/ext/InetAddressBytesValueConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/ext/InetAddressBytesValueConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun unwrap (Ljava/net/InetAddress;)Lcom/toasttab/protokt/BytesValue; - public fun wrap (Lcom/toasttab/protokt/BytesValue;)Ljava/net/InetAddress; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/ext/InetAddressConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/ext/InetAddressConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun unwrap (Ljava/net/InetAddress;)[B - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun wrap ([B)Ljava/net/InetAddress; -} - -public final class com/toasttab/protokt/ext/InstantConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/ext/InstantConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun unwrap (Ljava/time/Instant;)Lcom/toasttab/protokt/Timestamp; - public fun wrap (Lcom/toasttab/protokt/Timestamp;)Ljava/time/Instant; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/ext/LocalDateConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/ext/LocalDateConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun unwrap (Ljava/time/LocalDate;)Ljava/lang/String; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun wrap (Ljava/lang/String;)Ljava/time/LocalDate; -} - -public final class com/toasttab/protokt/ext/LocalDateStringConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/ext/LocalDateStringConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun unwrap (Ljava/time/LocalDate;)Ljava/lang/String; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun wrap (Ljava/lang/String;)Ljava/time/LocalDate; -} - -public final class com/toasttab/protokt/ext/LocalDateStringValueConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/ext/LocalDateStringValueConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun unwrap (Ljava/time/LocalDate;)Lcom/toasttab/protokt/StringValue; - public fun wrap (Lcom/toasttab/protokt/StringValue;)Ljava/time/LocalDate; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/ext/UuidBytesValueConverter : com/toasttab/protokt/ext/OptimizedSizeofConverter { - public static final field INSTANCE Lcom/toasttab/protokt/ext/UuidBytesValueConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public synthetic fun sizeof (Ljava/lang/Object;)I - public fun sizeof (Ljava/util/UUID;)I - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun unwrap (Ljava/util/UUID;)Lcom/toasttab/protokt/BytesValue; - public fun wrap (Lcom/toasttab/protokt/BytesValue;)Ljava/util/UUID; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/ext/UuidConverter : com/toasttab/protokt/ext/OptimizedSizeofConverter { - public static final field INSTANCE Lcom/toasttab/protokt/ext/UuidConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public synthetic fun sizeof (Ljava/lang/Object;)I - public fun sizeof (Ljava/util/UUID;)I - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun unwrap (Ljava/util/UUID;)[B - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun wrap ([B)Ljava/util/UUID; -} - diff --git a/extensions/protokt-extensions/api/protokt-extensions.api b/extensions/protokt-extensions/api/protokt-extensions.api index 931d817be..f0237583b 100644 --- a/extensions/protokt-extensions/api/protokt-extensions.api +++ b/extensions/protokt-extensions/api/protokt-extensions.api @@ -1,25 +1,32 @@ -public final class com/toasttab/protokt/ext/InetSocketAddressProto { - public static final field INSTANCE Lcom/toasttab/protokt/ext/InetSocketAddressProto; - public final fun getDescriptor ()Lcom/toasttab/protokt/FileDescriptor; +public final class protokt/v1/ProtoktProto { + public static final field INSTANCE Lprotokt/v1/ProtoktProto; + public final fun getDescriptor ()Lprotokt/v1/google/protobuf/FileDescriptor; } -public final class com/toasttab/protokt/ext/Inet_socket_addressKt { - public static final fun getDescriptor (Lcom/toasttab/protokt/ext/InetSocketAddress$Deserializer;)Lcom/toasttab/protokt/Descriptor; +public final class protokt/v1/Protokt_descriptorsKt { + public static final fun getDescriptor (Lprotokt/v1/ProtoktEnumOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; + public static final fun getDescriptor (Lprotokt/v1/ProtoktEnumValueOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; + public static final fun getDescriptor (Lprotokt/v1/ProtoktFieldOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; + public static final fun getDescriptor (Lprotokt/v1/ProtoktFileOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; + public static final fun getDescriptor (Lprotokt/v1/ProtoktMessageOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; + public static final fun getDescriptor (Lprotokt/v1/ProtoktMethodOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; + public static final fun getDescriptor (Lprotokt/v1/ProtoktOneofOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; + public static final fun getDescriptor (Lprotokt/v1/ProtoktServiceOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; } -public final class com/toasttab/protokt/ext/ProtoktKt { - public static final fun getDescriptor (Lcom/toasttab/protokt/ext/ProtoktEnumOptions$Deserializer;)Lcom/toasttab/protokt/Descriptor; - public static final fun getDescriptor (Lcom/toasttab/protokt/ext/ProtoktEnumValueOptions$Deserializer;)Lcom/toasttab/protokt/Descriptor; - public static final fun getDescriptor (Lcom/toasttab/protokt/ext/ProtoktFieldOptions$Deserializer;)Lcom/toasttab/protokt/Descriptor; - public static final fun getDescriptor (Lcom/toasttab/protokt/ext/ProtoktFileOptions$Deserializer;)Lcom/toasttab/protokt/Descriptor; - public static final fun getDescriptor (Lcom/toasttab/protokt/ext/ProtoktMessageOptions$Deserializer;)Lcom/toasttab/protokt/Descriptor; - public static final fun getDescriptor (Lcom/toasttab/protokt/ext/ProtoktMethodOptions$Deserializer;)Lcom/toasttab/protokt/Descriptor; - public static final fun getDescriptor (Lcom/toasttab/protokt/ext/ProtoktOneofOptions$Deserializer;)Lcom/toasttab/protokt/Descriptor; - public static final fun getDescriptor (Lcom/toasttab/protokt/ext/ProtoktServiceOptions$Deserializer;)Lcom/toasttab/protokt/Descriptor; +public final class protokt/v1/protokt/ProtoktProto { + public static final field INSTANCE Lprotokt/v1/protokt/ProtoktProto; + public final fun getDescriptor ()Lprotokt/v1/google/protobuf/FileDescriptor; } -public final class com/toasttab/protokt/ext/ProtoktProto { - public static final field INSTANCE Lcom/toasttab/protokt/ext/ProtoktProto; - public final fun getDescriptor ()Lcom/toasttab/protokt/FileDescriptor; +public final class protokt/v1/protokt/Protokt_descriptorsKt { + public static final fun getDescriptor (Lprotokt/v1/protokt/ProtoktEnumOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; + public static final fun getDescriptor (Lprotokt/v1/protokt/ProtoktEnumValueOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; + public static final fun getDescriptor (Lprotokt/v1/protokt/ProtoktFieldOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; + public static final fun getDescriptor (Lprotokt/v1/protokt/ProtoktFileOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; + public static final fun getDescriptor (Lprotokt/v1/protokt/ProtoktMessageOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; + public static final fun getDescriptor (Lprotokt/v1/protokt/ProtoktMethodOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; + public static final fun getDescriptor (Lprotokt/v1/protokt/ProtoktOneofOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; + public static final fun getDescriptor (Lprotokt/v1/protokt/ProtoktServiceOptions$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; } diff --git a/extensions/protokt-extensions/build.gradle.kts b/extensions/protokt-extensions/build.gradle.kts index b291a3187..99167c6aa 100644 --- a/extensions/protokt-extensions/build.gradle.kts +++ b/extensions/protokt-extensions/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,22 +14,31 @@ */ import com.google.protobuf.gradle.proto -import com.toasttab.protokt.gradle.protokt +import protokt.v1.gradle.protokt plugins { - id("protokt.jvm-conventions") + id("protokt.multiplatform-conventions") } localProtokt() enablePublishing() +compatibleWithAndroid() trackKotlinApiCompatibility() protokt { - onlyGenerateDescriptors = true + generate { + types = false + } } -dependencies { - api(project(":extensions:protokt-extensions-lite")) +kotlin { + sourceSets { + val commonMain by getting { + dependencies { + api(project(":extensions:protokt-extensions-lite")) + } + } + } } sourceSets { diff --git a/extensions/protokt-jvm-extensions-lite/api/protokt-jvm-extensions-lite.api b/extensions/protokt-jvm-extensions-lite/api/protokt-jvm-extensions-lite.api new file mode 100644 index 000000000..567ff0a15 --- /dev/null +++ b/extensions/protokt-jvm-extensions-lite/api/protokt-jvm-extensions-lite.api @@ -0,0 +1,106 @@ +public final class com/toasttab/protokt/ext/InetSocketAddress : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lcom/toasttab/protokt/ext/InetSocketAddress$Deserializer; + public synthetic fun (Ljava/net/InetAddress;ILcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/InetSocketAddress; + public fun equals (Ljava/lang/Object;)Z + public final fun getAddress ()Ljava/net/InetAddress; + public fun getMessageSize ()I + public final fun getPort ()I + public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class com/toasttab/protokt/ext/InetSocketAddress$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/ext/InetSocketAddress; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/ext/InetSocketAddress; + public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/ext/InetSocketAddress; + public synthetic fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/ext/InetSocketAddress; + public synthetic fun deserialize (Lcom/toasttab/protokt/rt/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/ext/InetSocketAddress; + public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/ext/InetSocketAddress; + public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/ext/InetSocketAddress; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/ext/InetSocketAddress; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/ext/InetSocketAddress; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize ([B)Lcom/toasttab/protokt/ext/InetSocketAddress; + public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; + public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ext/InetSocketAddress; +} + +public final class com/toasttab/protokt/ext/InetSocketAddress$InetSocketAddressDsl { + public fun ()V + public final fun build ()Lcom/toasttab/protokt/ext/InetSocketAddress; + public final fun getAddress ()Ljava/net/InetAddress; + public final fun getPort ()I + public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; + public final fun setAddress (Ljava/net/InetAddress;)V + public final fun setPort (I)V + public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V +} + +public final class com/toasttab/protokt/ext/InetSocketAddressConverter : com/toasttab/protokt/ext/Converter { + public static final field INSTANCE Lcom/toasttab/protokt/ext/InetSocketAddressConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/net/InetSocketAddress;)Lcom/toasttab/protokt/ext/InetSocketAddress; + public fun wrap (Lcom/toasttab/protokt/ext/InetSocketAddress;)Ljava/net/InetSocketAddress; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; +} + +public final class protokt/v1/InetSocketAddress : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/InetSocketAddress$Deserializer; + public synthetic fun (Ljava/net/InetAddress;ILprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/InetSocketAddress; + public fun equals (Ljava/lang/Object;)Z + public final fun getAddress ()Ljava/net/InetAddress; + public fun getMessageSize ()I + public final fun getPort ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/InetSocketAddress$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/InetSocketAddress; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/InetSocketAddress; +} + +public final class protokt/v1/InetSocketAddress$InetSocketAddressDsl { + public fun ()V + public final fun build ()Lprotokt/v1/InetSocketAddress; + public final fun getAddress ()Ljava/net/InetAddress; + public final fun getPort ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setAddress (Ljava/net/InetAddress;)V + public final fun setPort (I)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/InetSocketAddressConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/InetSocketAddressConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/net/InetSocketAddress;)Lprotokt/v1/InetSocketAddress; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/InetSocketAddress;)Ljava/net/InetSocketAddress; +} + +public final class protokt/v1/Inet_socket_addressKt { + public static final fun InetSocketAddress (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/InetSocketAddress; +} + diff --git a/extensions/protokt-jvm-extensions-lite/build.gradle.kts b/extensions/protokt-jvm-extensions-lite/build.gradle.kts new file mode 100644 index 000000000..7e55fe6db --- /dev/null +++ b/extensions/protokt-jvm-extensions-lite/build.gradle.kts @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import protokt.v1.gradle.protokt +import protokt.v1.gradle.protoktExtensions + +plugins { + id("protokt.jvm-conventions") + kotlin("kapt") +} + +localProtokt() +pureKotlin() +enablePublishing() +trackKotlinApiCompatibility() + +spotless { + kotlin { + targetExclude( + "src/main/kotlin/com/toasttab/protokt/ext/inet_socket_address.kt" + ) + } +} + +protokt { + generate { + lite() + } +} + +dependencies { + protoktExtensions(project(":extensions:protokt-extensions-lite")) + protoktExtensions(project(":extensions:protokt-jvm-extensions-simple")) + + implementation(libs.autoServiceAnnotations) + + kapt(libs.autoService) + + testRuntimeOnly(libs.protobuf.lite) +} diff --git a/extensions/protokt-jvm-extensions-lite/src/main/kotlin/com/toasttab/protokt/ext/InetSocketAddressConverter.kt b/extensions/protokt-jvm-extensions-lite/src/main/kotlin/com/toasttab/protokt/ext/InetSocketAddressConverter.kt new file mode 100644 index 000000000..2c8e2423a --- /dev/null +++ b/extensions/protokt-jvm-extensions-lite/src/main/kotlin/com/toasttab/protokt/ext/InetSocketAddressConverter.kt @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.toasttab.protokt.ext + +import com.google.auto.service.AutoService + +@Suppress("DEPRECATION") +@Deprecated("for backwards compatibility only") +@AutoService(Converter::class) +object InetSocketAddressConverter : Converter { + + override val wrapper = java.net.InetSocketAddress::class + + override val wrapped = InetSocketAddress::class + + override fun wrap(unwrapped: InetSocketAddress) = + java.net.InetSocketAddress(unwrapped.address, unwrapped.port) + + override fun unwrap(wrapped: java.net.InetSocketAddress) = + InetSocketAddress { + address = wrapped.address + port = wrapped.port + } +} diff --git a/extensions/protokt-jvm-extensions-lite/src/main/kotlin/com/toasttab/protokt/ext/inet_socket_address.kt b/extensions/protokt-jvm-extensions-lite/src/main/kotlin/com/toasttab/protokt/ext/inet_socket_address.kt new file mode 100644 index 000000000..0facf11e4 --- /dev/null +++ b/extensions/protokt-jvm-extensions-lite/src/main/kotlin/com/toasttab/protokt/ext/inet_socket_address.kt @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@file:Suppress("DEPRECATION") + +// Generated by protokt version 0.10.2. Do not modify. +// Source: protokt/ext/inet_socket_address.proto +package com.toasttab.protokt.ext + +import com.toasttab.protokt.rt.Int32 +import com.toasttab.protokt.rt.KtDeserializer +import com.toasttab.protokt.rt.KtGeneratedMessage +import com.toasttab.protokt.rt.KtMessage +import com.toasttab.protokt.rt.KtMessageDeserializer +import com.toasttab.protokt.rt.KtMessageSerializer +import com.toasttab.protokt.rt.Tag +import com.toasttab.protokt.rt.UnknownFieldSet +import com.toasttab.protokt.rt.sizeof +import protokt.v1.AbstractKtMessage +import protokt.v1.NewToOldAdapter +import java.net.InetAddress +import kotlin.Any +import kotlin.Boolean +import kotlin.Int +import kotlin.String +import kotlin.Unit + +@KtGeneratedMessage("protokt.ext.InetSocketAddress") +@protokt.v1.KtGeneratedMessage("protokt.ext.InetSocketAddress") +@Deprecated("use v1") +class InetSocketAddress private constructor( + val address: InetAddress, + val port: Int, + val unknownFields: UnknownFieldSet = UnknownFieldSet.empty(), +) : AbstractKtMessage() { + override val messageSize: Int by lazy { messageSize() } + + private fun messageSize(): Int { + var result = 0 + if (com.toasttab.protokt.ext.InetAddressConverter.unwrap(address).isNotEmpty()) { + result += sizeof(Tag(1)) + + sizeof(com.toasttab.protokt.ext.InetAddressConverter.unwrap(address)) + } + if (port != 0) { + result += sizeof(Tag(2)) + sizeof(Int32(port)) + } + result += unknownFields.size() + return result + } + + override fun serialize(serializer: protokt.v1.KtMessageSerializer) { + val adapter = NewToOldAdapter(serializer) + if (com.toasttab.protokt.ext.InetAddressConverter.unwrap(address).isNotEmpty()) { + adapter.write(Tag(10)).write(com.toasttab.protokt.ext.InetAddressConverter.unwrap(address)) + } + if (port != 0) { + adapter.write(Tag(16)).write(Int32(port)) + } + adapter.writeUnknown(unknownFields) + } + + override fun equals(other: Any?): Boolean = other is InetSocketAddress && + other.address == address && + other.port == port && + other.unknownFields == unknownFields + + override fun hashCode(): Int { + var result = unknownFields.hashCode() + result = 31 * result + address.hashCode() + result = 31 * result + port.hashCode() + return result + } + + override fun toString(): String = "InetSocketAddress(" + + "address=$address, " + + "port=$port" + + "${if (unknownFields.isEmpty()) "" else ", unknownFields=$unknownFields"})" + + fun copy(dsl: InetSocketAddressDsl.() -> Unit): InetSocketAddress = + InetSocketAddress.Deserializer { + address = this@InetSocketAddress.address + port = this@InetSocketAddress.port + unknownFields = this@InetSocketAddress.unknownFields + dsl() + } + + class InetSocketAddressDsl { + var address: InetAddress? = null + + var port: Int = 0 + + var unknownFields: UnknownFieldSet = UnknownFieldSet.empty() + + fun build(): InetSocketAddress = InetSocketAddress(address ?: + com.toasttab.protokt.ext.InetAddressConverter.wrap(com.toasttab.protokt.rt.Bytes.empty().bytes), + port, + unknownFields) + } + + companion object Deserializer : KtDeserializer, + (InetSocketAddressDsl.() -> Unit) -> InetSocketAddress { + override fun deserialize(deserializer: KtMessageDeserializer): InetSocketAddress { + var address : InetAddress? = null + var port = 0 + var unknownFields: UnknownFieldSet.Builder? = null + while (true) { + when(deserializer.readTag()) { + 0 -> return InetSocketAddress(address ?: + com.toasttab.protokt.ext.InetAddressConverter.wrap(com.toasttab.protokt.rt.Bytes.empty().bytes), + port, + UnknownFieldSet.from(unknownFields)) + 10 -> address = + com.toasttab.protokt.ext.InetAddressConverter.wrap(deserializer.readBytes().bytes) + 16 -> port = deserializer.readInt32() + else -> unknownFields = (unknownFields ?: + UnknownFieldSet.Builder()).also {it.add(deserializer.readUnknown()) } + } + } + } + + override fun invoke(dsl: InetSocketAddressDsl.() -> Unit): InetSocketAddress = + InetSocketAddressDsl().apply(dsl).build() + } +} diff --git a/extensions/protokt-extensions-lite/src/main/kotlin/com/toasttab/protokt/ext/InetSocketAddressConverter.kt b/extensions/protokt-jvm-extensions-lite/src/main/kotlin/protokt/v1/InetSocketAddressConverter.kt similarity index 86% rename from extensions/protokt-extensions-lite/src/main/kotlin/com/toasttab/protokt/ext/InetSocketAddressConverter.kt rename to extensions/protokt-jvm-extensions-lite/src/main/kotlin/protokt/v1/InetSocketAddressConverter.kt index d87963642..eb446e312 100644 --- a/extensions/protokt-extensions-lite/src/main/kotlin/com/toasttab/protokt/ext/InetSocketAddressConverter.kt +++ b/extensions/protokt-jvm-extensions-lite/src/main/kotlin/protokt/v1/InetSocketAddressConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,13 +13,12 @@ * limitations under the License. */ -package com.toasttab.protokt.ext +package protokt.v1 import com.google.auto.service.AutoService @AutoService(Converter::class) -object InetSocketAddressConverter : - Converter { +object InetSocketAddressConverter : Converter { override val wrapper = java.net.InetSocketAddress::class diff --git a/extensions/protokt-extensions-lite/src/main/proto/protokt/ext/inet_socket_address.proto b/extensions/protokt-jvm-extensions-lite/src/main/proto/protokt/v1/inet_socket_address.proto similarity index 68% rename from extensions/protokt-extensions-lite/src/main/proto/protokt/ext/inet_socket_address.proto rename to extensions/protokt-jvm-extensions-lite/src/main/proto/protokt/v1/inet_socket_address.proto index 9f3f37323..73bfe2074 100644 --- a/extensions/protokt-extensions-lite/src/main/proto/protokt/ext/inet_socket_address.proto +++ b/extensions/protokt-jvm-extensions-lite/src/main/proto/protokt/v1/inet_socket_address.proto @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2023 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,19 +15,17 @@ syntax = "proto3"; -package protokt.ext; +package protokt.v1; -import "protokt/protokt.proto"; +import "protokt/v1/protokt.proto"; -option java_package = "com.toasttab.protokt.ext"; +option java_package = "com.toasttab.protokt.v1"; option java_outer_classname = "InetSocketAddressProto"; - -option (protokt.file).kotlin_package = "com.toasttab.protokt.ext"; -option (protokt.file).file_descriptor_object_name = "InetSocketAddressProto"; +option (protokt.v1.file).file_descriptor_object_name = "InetSocketAddressProto"; message InetSocketAddress { bytes address = 1 [ - (protokt.property).wrap = "java.net.InetAddress" + (protokt.v1.property).wrap = "java.net.InetAddress" ]; int32 port = 2; diff --git a/extensions/protokt-extensions-lite/src/test/kotlin/com/toasttab/protokt/ext/InetSocketAddressConverterTest.kt b/extensions/protokt-jvm-extensions-lite/src/test/kotlin/com/toasttab/protokt/ext/InetSocketAddressConverterTest.kt similarity index 94% rename from extensions/protokt-extensions-lite/src/test/kotlin/com/toasttab/protokt/ext/InetSocketAddressConverterTest.kt rename to extensions/protokt-jvm-extensions-lite/src/test/kotlin/com/toasttab/protokt/ext/InetSocketAddressConverterTest.kt index 30b1e7c34..0514f2f39 100644 --- a/extensions/protokt-extensions-lite/src/test/kotlin/com/toasttab/protokt/ext/InetSocketAddressConverterTest.kt +++ b/extensions/protokt-jvm-extensions-lite/src/test/kotlin/com/toasttab/protokt/ext/InetSocketAddressConverterTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import org.junit.jupiter.api.Test import java.net.InetAddress import java.net.InetSocketAddress +@Suppress("DEPRECATION") class InetSocketAddressConverterTest { @Test fun `conversion works`() { diff --git a/extensions/protokt-jvm-extensions-lite/src/test/kotlin/protokt/v1/InetSocketAddressConverterTest.kt b/extensions/protokt-jvm-extensions-lite/src/test/kotlin/protokt/v1/InetSocketAddressConverterTest.kt new file mode 100644 index 000000000..9f0a7df4d --- /dev/null +++ b/extensions/protokt-jvm-extensions-lite/src/test/kotlin/protokt/v1/InetSocketAddressConverterTest.kt @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1 + +import com.google.common.truth.Truth +import org.junit.jupiter.api.Test +import java.net.InetAddress +import java.net.InetSocketAddress + +class InetSocketAddressConverterTest { + @Test + fun `conversion works`() { + val addr = InetSocketAddress(InetAddress.getLocalHost(), 8080) + + Truth.assertThat( + InetSocketAddressConverter.wrap(InetSocketAddressConverter.unwrap(addr)) + ).isEqualTo(addr) + } +} diff --git a/extensions/protokt-jvm-extensions-simple/api/protokt-jvm-extensions-simple.api b/extensions/protokt-jvm-extensions-simple/api/protokt-jvm-extensions-simple.api new file mode 100644 index 000000000..a427c5024 --- /dev/null +++ b/extensions/protokt-jvm-extensions-simple/api/protokt-jvm-extensions-simple.api @@ -0,0 +1,183 @@ +public final class com/toasttab/protokt/ext/DurationConverter : com/toasttab/protokt/ext/Converter { + public static final field INSTANCE Lcom/toasttab/protokt/ext/DurationConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/time/Duration;)Lcom/toasttab/protokt/Duration; + public fun wrap (Lcom/toasttab/protokt/Duration;)Ljava/time/Duration; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; +} + +public final class com/toasttab/protokt/ext/InetAddressBytesValueConverter : com/toasttab/protokt/ext/Converter { + public static final field INSTANCE Lcom/toasttab/protokt/ext/InetAddressBytesValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/net/InetAddress;)Lcom/toasttab/protokt/BytesValue; + public fun wrap (Lcom/toasttab/protokt/BytesValue;)Ljava/net/InetAddress; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; +} + +public final class com/toasttab/protokt/ext/InetAddressConverter { + public static final field INSTANCE Lcom/toasttab/protokt/ext/InetAddressConverter; + public final fun getWrapped ()Lkotlin/reflect/KClass; + public final fun getWrapper ()Lkotlin/reflect/KClass; + public final fun unwrap (Ljava/net/InetAddress;)[B + public final fun wrap ([B)Ljava/net/InetAddress; +} + +public final class com/toasttab/protokt/ext/InstantConverter : com/toasttab/protokt/ext/Converter { + public static final field INSTANCE Lcom/toasttab/protokt/ext/InstantConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/time/Instant;)Lcom/toasttab/protokt/Timestamp; + public fun wrap (Lcom/toasttab/protokt/Timestamp;)Ljava/time/Instant; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; +} + +public final class com/toasttab/protokt/ext/LocalDateConverter : com/toasttab/protokt/ext/Converter { + public static final field INSTANCE Lcom/toasttab/protokt/ext/LocalDateConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/time/LocalDate;)Ljava/lang/String; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Ljava/lang/String;)Ljava/time/LocalDate; +} + +public final class com/toasttab/protokt/ext/LocalDateStringConverter : com/toasttab/protokt/ext/Converter { + public static final field INSTANCE Lcom/toasttab/protokt/ext/LocalDateStringConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/time/LocalDate;)Ljava/lang/String; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Ljava/lang/String;)Ljava/time/LocalDate; +} + +public final class com/toasttab/protokt/ext/LocalDateStringValueConverter : com/toasttab/protokt/ext/Converter { + public static final field INSTANCE Lcom/toasttab/protokt/ext/LocalDateStringValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/time/LocalDate;)Lcom/toasttab/protokt/StringValue; + public fun wrap (Lcom/toasttab/protokt/StringValue;)Ljava/time/LocalDate; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; +} + +public final class com/toasttab/protokt/ext/UuidBytesValueConverter : com/toasttab/protokt/ext/OptimizedSizeofConverter { + public static final field INSTANCE Lcom/toasttab/protokt/ext/UuidBytesValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun sizeof (Ljava/lang/Object;)I + public fun sizeof (Ljava/util/UUID;)I + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/util/UUID;)Lcom/toasttab/protokt/BytesValue; + public fun wrap (Lcom/toasttab/protokt/BytesValue;)Ljava/util/UUID; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; +} + +public final class com/toasttab/protokt/ext/UuidConverter { + public static final field INSTANCE Lcom/toasttab/protokt/ext/UuidConverter; + public final fun getWrapped ()Lkotlin/reflect/KClass; + public final fun getWrapper ()Lkotlin/reflect/KClass; + public final fun sizeof (Ljava/util/UUID;)I + public final fun unwrap (Ljava/util/UUID;)[B + public final fun wrap ([B)Ljava/util/UUID; +} + +public final class protokt/v1/DurationConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/DurationConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/time/Duration;)Lprotokt/v1/google/protobuf/Duration; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/google/protobuf/Duration;)Ljava/time/Duration; +} + +public final class protokt/v1/InetAddressBytesConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/InetAddressBytesConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/net/InetAddress;)Lprotokt/v1/Bytes; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/Bytes;)Ljava/net/InetAddress; +} + +public final class protokt/v1/InetAddressBytesValueConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/InetAddressBytesValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/net/InetAddress;)Lprotokt/v1/google/protobuf/BytesValue; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/google/protobuf/BytesValue;)Ljava/net/InetAddress; +} + +public final class protokt/v1/InstantConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/InstantConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/time/Instant;)Lprotokt/v1/google/protobuf/Timestamp; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/google/protobuf/Timestamp;)Ljava/time/Instant; +} + +public final class protokt/v1/LocalDateConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/LocalDateConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/time/LocalDate;)Ljava/lang/String; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Ljava/lang/String;)Ljava/time/LocalDate; +} + +public final class protokt/v1/LocalDateStringConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/LocalDateStringConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/time/LocalDate;)Ljava/lang/String; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Ljava/lang/String;)Ljava/time/LocalDate; +} + +public final class protokt/v1/LocalDateStringValueConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/LocalDateStringValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/time/LocalDate;)Lprotokt/v1/google/protobuf/StringValue; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/google/protobuf/StringValue;)Ljava/time/LocalDate; +} + +public final class protokt/v1/UuidBytesConverter : protokt/v1/OptimizedSizeOfConverter { + public static final field INSTANCE Lprotokt/v1/UuidBytesConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun sizeOf (Ljava/lang/Object;)I + public fun sizeOf (Ljava/util/UUID;)I + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/util/UUID;)Lprotokt/v1/Bytes; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/Bytes;)Ljava/util/UUID; +} + +public final class protokt/v1/UuidBytesValueConverter : protokt/v1/OptimizedSizeOfConverter { + public static final field INSTANCE Lprotokt/v1/UuidBytesValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun sizeOf (Ljava/lang/Object;)I + public fun sizeOf (Ljava/util/UUID;)I + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/util/UUID;)Lprotokt/v1/google/protobuf/BytesValue; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/google/protobuf/BytesValue;)Ljava/util/UUID; +} + diff --git a/extensions/protokt-extensions-simple/build.gradle.kts b/extensions/protokt-jvm-extensions-simple/build.gradle.kts similarity index 86% rename from extensions/protokt-extensions-simple/build.gradle.kts rename to extensions/protokt-jvm-extensions-simple/build.gradle.kts index dff8d7b10..927117440 100644 --- a/extensions/protokt-extensions-simple/build.gradle.kts +++ b/extensions/protokt-jvm-extensions-simple/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ trackKotlinApiCompatibility() dependencies { implementation(project(":protokt-core-lite")) - implementation(libraries.autoServiceAnnotations) + implementation(libs.autoServiceAnnotations) - kapt(libraries.autoService) + kapt(libs.autoService) } diff --git a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/DurationConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/DurationConverter.kt similarity index 91% rename from extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/DurationConverter.kt rename to extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/DurationConverter.kt index 8acba1b86..8237bf102 100644 --- a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/DurationConverter.kt +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/DurationConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,11 +13,14 @@ * limitations under the License. */ +@file:Suppress("DEPRECATION") + package com.toasttab.protokt.ext import com.google.auto.service.AutoService import com.toasttab.protokt.Duration +@Deprecated("for backwards compatibility only") @AutoService(Converter::class) object DurationConverter : Converter { override val wrapper = java.time.Duration::class diff --git a/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InetAddressBytesValueConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InetAddressBytesValueConverter.kt new file mode 100644 index 000000000..6a3dc0738 --- /dev/null +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InetAddressBytesValueConverter.kt @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2020 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@file:Suppress("DEPRECATION") + +package com.toasttab.protokt.ext + +import com.google.auto.service.AutoService +import com.toasttab.protokt.BytesValue +import com.toasttab.protokt.rt.Bytes +import com.toasttab.protokt.rt.toBytes +import protokt.v1.InetAddressBytesConverter +import java.net.InetAddress + +@Deprecated("for backwards compatibility only") +@AutoService(Converter::class) +object InetAddressBytesValueConverter : Converter { + override val wrapper = InetAddress::class + + override val wrapped = BytesValue::class + + override fun wrap(unwrapped: BytesValue) = + InetAddressBytesConverter.wrap(unwrapped.value.toBytes()) + + override fun unwrap(wrapped: InetAddress) = + BytesValue { value = Bytes(InetAddressBytesConverter.unwrap(wrapped).bytes) } +} diff --git a/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InetAddressConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InetAddressConverter.kt new file mode 100644 index 000000000..d875ac812 --- /dev/null +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InetAddressConverter.kt @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.toasttab.protokt.ext + +import java.net.InetAddress + +@Deprecated("for backwards compatibility only") +object InetAddressConverter { + val wrapper = InetAddress::class + + val wrapped = ByteArray::class + + fun wrap(unwrapped: ByteArray): InetAddress { + require(unwrapped.isNotEmpty()) { + "cannot unwrap absent InetAddress" + } + return InetAddress.getByAddress(unwrapped) + } + + fun unwrap(wrapped: InetAddress) = + wrapped.address +} diff --git a/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InstantConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InstantConverter.kt new file mode 100644 index 000000000..26b573241 --- /dev/null +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InstantConverter.kt @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@file:Suppress("DEPRECATION") + +package com.toasttab.protokt.ext + +import com.google.auto.service.AutoService +import com.toasttab.protokt.Timestamp +import java.time.Instant + +@Deprecated("for backwards compatibility only") +@AutoService(Converter::class) +object InstantConverter : Converter { + override val wrapper = Instant::class + + override val wrapped = Timestamp::class + + override fun wrap(unwrapped: Timestamp): Instant = + Instant.ofEpochSecond(unwrapped.seconds, unwrapped.nanos.toLong()) + + override fun unwrap(wrapped: Instant) = + Timestamp { + seconds = wrapped.epochSecond + nanos = wrapped.nano + } +} diff --git a/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/LocalDateStringConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/LocalDateStringConverter.kt new file mode 100644 index 000000000..ae1ba1535 --- /dev/null +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/LocalDateStringConverter.kt @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2020 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.toasttab.protokt.ext + +import com.google.auto.service.AutoService +import java.time.LocalDate + +@Suppress("DEPRECATION") +@Deprecated("for backwards compatibility only") +@AutoService(Converter::class) +object LocalDateStringConverter : Converter { + override val wrapper = LocalDate::class + + override val wrapped = String::class + + override fun wrap(unwrapped: String): LocalDate = + LocalDate.parse(unwrapped) + + override fun unwrap(wrapped: LocalDate) = + wrapped.toString() +} + +@Suppress("DEPRECATION") +@AutoService(Converter::class) +@Deprecated("use LocalDateStringConverter or upgrade protokt") +object LocalDateConverter : Converter { + override val wrapper = LocalDateStringConverter.wrapper + + override val wrapped = LocalDateStringConverter.wrapped + + override fun wrap(unwrapped: String) = + LocalDateStringConverter.wrap(unwrapped) + + override fun unwrap(wrapped: LocalDate) = + LocalDateStringConverter.unwrap(wrapped) +} diff --git a/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/LocalDateStringValueConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/LocalDateStringValueConverter.kt new file mode 100644 index 000000000..75a363587 --- /dev/null +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/LocalDateStringValueConverter.kt @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2020 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@file:Suppress("DEPRECATION") + +package com.toasttab.protokt.ext + +import com.google.auto.service.AutoService +import com.toasttab.protokt.StringValue +import java.time.LocalDate + +@Suppress("DEPRECATION") +@Deprecated("for backwards compatibility only") +@AutoService(Converter::class) +object LocalDateStringValueConverter : Converter { + override val wrapper = LocalDate::class + + override val wrapped = StringValue::class + + override fun wrap(unwrapped: StringValue) = + LocalDateStringConverter.wrap(unwrapped.value) + + override fun unwrap(wrapped: LocalDate) = + StringValue { value = LocalDateStringConverter.unwrap(wrapped) } +} diff --git a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/UuidBytesValueConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/UuidBytesValueConverter.kt similarity index 78% rename from extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/UuidBytesValueConverter.kt rename to extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/UuidBytesValueConverter.kt index 82c6c8cd6..9f974b257 100644 --- a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/UuidBytesValueConverter.kt +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/UuidBytesValueConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,14 +13,19 @@ * limitations under the License. */ +@file:Suppress("DEPRECATION") + package com.toasttab.protokt.ext import com.google.auto.service.AutoService import com.toasttab.protokt.BytesValue import com.toasttab.protokt.rt.Bytes import com.toasttab.protokt.rt.sizeof +import com.toasttab.protokt.rt.toBytes +import protokt.v1.UuidBytesConverter import java.util.UUID +@Deprecated("for backwards compatibility only") @AutoService(Converter::class) object UuidBytesValueConverter : OptimizedSizeofConverter { override val wrapper = UUID::class @@ -34,8 +39,8 @@ object UuidBytesValueConverter : OptimizedSizeofConverter { sizeof(sizeofProxy) override fun wrap(unwrapped: BytesValue) = - UuidConverter.wrap(unwrapped.value.bytes) + UuidBytesConverter.wrap(unwrapped.value.toBytes()) override fun unwrap(wrapped: UUID) = - BytesValue { value = Bytes(UuidConverter.unwrap(wrapped)) } + BytesValue { value = Bytes(UuidBytesConverter.unwrap(wrapped).bytes) } } diff --git a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/UuidConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/UuidConverter.kt similarity index 61% rename from extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/UuidConverter.kt rename to extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/UuidConverter.kt index 0d6f5fa7f..ea7fb197d 100644 --- a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/UuidConverter.kt +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/UuidConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,34 +13,36 @@ * limitations under the License. */ +@file:Suppress("DEPRECATION") + package com.toasttab.protokt.ext -import com.google.auto.service.AutoService import com.toasttab.protokt.rt.sizeof import java.nio.ByteBuffer import java.util.UUID -@AutoService(Converter::class) -object UuidConverter : OptimizedSizeofConverter { - override val wrapper = UUID::class +@Deprecated("for backwards compatibility only") +object UuidConverter { + val wrapper = UUID::class - override val wrapped = ByteArray::class + val wrapped = ByteArray::class private val sizeofProxy = ByteArray(16) - override fun sizeof(wrapped: UUID) = + fun sizeof(@Suppress("UNUSED_PARAMETER") wrapped: UUID) = sizeof(sizeofProxy) - override fun wrap(unwrapped: ByteArray): UUID { - require(unwrapped.size == 16) { - "UUID source must have size 16; had ${unwrapped.size}" + fun wrap(unwrapped: ByteArray): UUID { + val buf = ByteBuffer.wrap(unwrapped) + + require(buf.remaining() == 16) { + "UUID source must have size 16; had ${buf.remaining()}" } - return ByteBuffer.wrap(unwrapped) - .run { UUID(long, long) } + return buf.run { UUID(long, long) } } - override fun unwrap(wrapped: UUID): ByteArray = + fun unwrap(wrapped: UUID): ByteArray = ByteBuffer.allocate(16) .putLong(wrapped.mostSignificantBits) .putLong(wrapped.leastSignificantBits) diff --git a/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/DurationConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/DurationConverter.kt new file mode 100644 index 000000000..3990a14f2 --- /dev/null +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/DurationConverter.kt @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1 + +import com.google.auto.service.AutoService + +@AutoService(Converter::class) +object DurationConverter : Converter { + override val wrapper = java.time.Duration::class + + override val wrapped = protokt.v1.google.protobuf.Duration::class + + override fun wrap(unwrapped: protokt.v1.google.protobuf.Duration): java.time.Duration = + java.time.Duration.ofSeconds(unwrapped.seconds, unwrapped.nanos.toLong()) + + override fun unwrap(wrapped: java.time.Duration) = + protokt.v1.google.protobuf.Duration { + seconds = wrapped.seconds + nanos = wrapped.nano + } +} diff --git a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InetAddressConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/InetAddressBytesConverter.kt similarity index 68% rename from extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InetAddressConverter.kt rename to extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/InetAddressBytesConverter.kt index 46c3268ff..228541dbf 100644 --- a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InetAddressConverter.kt +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/InetAddressBytesConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2023 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,24 +13,24 @@ * limitations under the License. */ -package com.toasttab.protokt.ext +package protokt.v1 import com.google.auto.service.AutoService import java.net.InetAddress @AutoService(Converter::class) -object InetAddressConverter : Converter { +object InetAddressBytesConverter : Converter { override val wrapper = InetAddress::class - override val wrapped = ByteArray::class + override val wrapped = Bytes::class - override fun wrap(unwrapped: ByteArray): InetAddress { + override fun wrap(unwrapped: Bytes): InetAddress { require(unwrapped.isNotEmpty()) { "cannot unwrap absent InetAddress" } - return InetAddress.getByAddress(unwrapped) + return InetAddress.getByAddress(unwrapped.bytes) } - override fun unwrap(wrapped: InetAddress): ByteArray = - wrapped.address + override fun unwrap(wrapped: InetAddress): Bytes = + Bytes(wrapped.address) } diff --git a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InetAddressBytesValueConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/InetAddressBytesValueConverter.kt similarity index 77% rename from extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InetAddressBytesValueConverter.kt rename to extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/InetAddressBytesValueConverter.kt index 6fd193592..3db40c5d8 100644 --- a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InetAddressBytesValueConverter.kt +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/InetAddressBytesValueConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2023 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,11 +13,10 @@ * limitations under the License. */ -package com.toasttab.protokt.ext +package protokt.v1 import com.google.auto.service.AutoService -import com.toasttab.protokt.BytesValue -import com.toasttab.protokt.rt.Bytes +import protokt.v1.google.protobuf.BytesValue import java.net.InetAddress @AutoService(Converter::class) @@ -27,8 +26,8 @@ object InetAddressBytesValueConverter : Converter { override val wrapped = BytesValue::class override fun wrap(unwrapped: BytesValue) = - InetAddressConverter.wrap(unwrapped.value.bytes) + InetAddressBytesConverter.wrap(unwrapped.value) override fun unwrap(wrapped: InetAddress) = - BytesValue { value = Bytes(InetAddressConverter.unwrap(wrapped)) } + BytesValue { value = InetAddressBytesConverter.unwrap(wrapped) } } diff --git a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InstantConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/InstantConverter.kt similarity index 91% rename from extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InstantConverter.kt rename to extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/InstantConverter.kt index 5d566c695..9bb283260 100644 --- a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/InstantConverter.kt +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/InstantConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2023 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,10 +13,10 @@ * limitations under the License. */ -package com.toasttab.protokt.ext +package protokt.v1 import com.google.auto.service.AutoService -import com.toasttab.protokt.Timestamp +import protokt.v1.google.protobuf.Timestamp import java.time.Instant @AutoService(Converter::class) diff --git a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/LocalDateStringConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/LocalDateStringConverter.kt similarity index 95% rename from extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/LocalDateStringConverter.kt rename to extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/LocalDateStringConverter.kt index cc8b3bafa..8d8266f84 100644 --- a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/LocalDateStringConverter.kt +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/LocalDateStringConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2023 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * limitations under the License. */ -package com.toasttab.protokt.ext +package protokt.v1 import com.google.auto.service.AutoService import java.time.LocalDate diff --git a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/LocalDateStringValueConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/LocalDateStringValueConverter.kt similarity index 90% rename from extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/LocalDateStringValueConverter.kt rename to extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/LocalDateStringValueConverter.kt index f664060a2..665a41c55 100644 --- a/extensions/protokt-extensions-simple/src/main/kotlin/com/toasttab/protokt/ext/LocalDateStringValueConverter.kt +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/LocalDateStringValueConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2023 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,10 +13,10 @@ * limitations under the License. */ -package com.toasttab.protokt.ext +package protokt.v1 import com.google.auto.service.AutoService -import com.toasttab.protokt.StringValue +import protokt.v1.google.protobuf.StringValue import java.time.LocalDate @AutoService(Converter::class) diff --git a/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/UuidBytesConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/UuidBytesConverter.kt new file mode 100644 index 000000000..ba31a860e --- /dev/null +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/UuidBytesConverter.kt @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1 + +import com.google.auto.service.AutoService +import java.nio.ByteBuffer +import java.util.UUID + +@AutoService(Converter::class) +object UuidBytesConverter : OptimizedSizeOfConverter { + override val wrapper = UUID::class + + override val wrapped = Bytes::class + + private val sizeOfProxy = ByteArray(16) + + override fun sizeOf(wrapped: UUID) = + sizeOf(sizeOfProxy) + + override fun wrap(unwrapped: Bytes): UUID { + val buf = unwrapped.asReadOnlyBuffer() + + require(buf.remaining() == 16) { + "UUID source must have size 16; had ${buf.remaining()}" + } + + return buf.run { UUID(long, long) } + } + + override fun unwrap(wrapped: UUID): Bytes = + Bytes( + ByteBuffer.allocate(16) + .putLong(wrapped.mostSignificantBits) + .putLong(wrapped.leastSignificantBits) + .array() + ) +} diff --git a/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/UuidBytesValueConverter.kt b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/UuidBytesValueConverter.kt new file mode 100644 index 000000000..fda416665 --- /dev/null +++ b/extensions/protokt-jvm-extensions-simple/src/main/kotlin/protokt/v1/UuidBytesValueConverter.kt @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1 + +import com.google.auto.service.AutoService +import protokt.v1.google.protobuf.BytesValue +import java.util.UUID + +@AutoService(Converter::class) +object UuidBytesValueConverter : OptimizedSizeOfConverter { + override val wrapper = UUID::class + + override val wrapped = BytesValue::class + + private val sizeOfProxy = + BytesValue { value = Bytes(ByteArray(16)) } + + override fun sizeOf(wrapped: UUID) = + sizeOf(sizeOfProxy) + + override fun wrap(unwrapped: BytesValue) = + UuidBytesConverter.wrap(unwrapped.value) + + override fun unwrap(wrapped: UUID) = + BytesValue { value = UuidBytesConverter.unwrap(wrapped) } +} diff --git a/extensions/protokt-jvm-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/InetAddressBytesConverterTest.kt b/extensions/protokt-jvm-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/InetAddressBytesConverterTest.kt new file mode 100644 index 000000000..d14383d2f --- /dev/null +++ b/extensions/protokt-jvm-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/InetAddressBytesConverterTest.kt @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.toasttab.protokt.ext + +import com.google.common.truth.Truth.assertThat +import org.junit.jupiter.api.Test +import protokt.v1.InetAddressBytesConverter +import java.net.InetAddress + +class InetAddressBytesConverterTest { + @Test + fun `conversion works`() { + val address = InetAddress.getLocalHost() + + assertThat( + InetAddressBytesConverter.wrap(InetAddressBytesConverter.unwrap(address)) + ).isEqualTo(address) + } +} diff --git a/extensions/protokt-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/InstantConverterTest.kt b/extensions/protokt-jvm-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/InstantConverterTest.kt similarity index 94% rename from extensions/protokt-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/InstantConverterTest.kt rename to extensions/protokt-jvm-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/InstantConverterTest.kt index b621bff7f..f882ef68f 100644 --- a/extensions/protokt-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/InstantConverterTest.kt +++ b/extensions/protokt-jvm-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/InstantConverterTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ import com.google.common.truth.Truth.assertThat import org.junit.jupiter.api.Test import java.time.Instant +@Suppress("DEPRECATION") class InstantConverterTest { @Test fun `conversion works`() { diff --git a/extensions/protokt-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/InetAddressConverterTest.kt b/extensions/protokt-jvm-extensions-simple/src/test/kotlin/protokt/v1/InetAddressBytesConverterTest.kt similarity index 82% rename from extensions/protokt-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/InetAddressConverterTest.kt rename to extensions/protokt-jvm-extensions-simple/src/test/kotlin/protokt/v1/InetAddressBytesConverterTest.kt index 980fb90f3..eb430f181 100644 --- a/extensions/protokt-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/InetAddressConverterTest.kt +++ b/extensions/protokt-jvm-extensions-simple/src/test/kotlin/protokt/v1/InetAddressBytesConverterTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2023 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,19 +13,19 @@ * limitations under the License. */ -package com.toasttab.protokt.ext +package protokt.v1 import com.google.common.truth.Truth.assertThat import org.junit.jupiter.api.Test import java.net.InetAddress -class InetAddressConverterTest { +class InetAddressBytesConverterTest { @Test fun `conversion works`() { val address = InetAddress.getLocalHost() assertThat( - InetAddressConverter.wrap(InetAddressConverter.unwrap(address)) + InetAddressBytesConverter.wrap(InetAddressBytesConverter.unwrap(address)) ).isEqualTo(address) } } diff --git a/extensions/protokt-jvm-extensions-simple/src/test/kotlin/protokt/v1/InstantConverterTest.kt b/extensions/protokt-jvm-extensions-simple/src/test/kotlin/protokt/v1/InstantConverterTest.kt new file mode 100644 index 000000000..345899a52 --- /dev/null +++ b/extensions/protokt-jvm-extensions-simple/src/test/kotlin/protokt/v1/InstantConverterTest.kt @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1 + +import com.google.common.truth.Truth.assertThat +import org.junit.jupiter.api.Test +import java.time.Instant + +class InstantConverterTest { + @Test + fun `conversion works`() { + val instant = Instant.now() + + assertThat( + InstantConverter.wrap(InstantConverter.unwrap(instant)) + ).isEqualTo(instant) + } +} diff --git a/extensions/protokt-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/UuidConverterTest.kt b/extensions/protokt-jvm-extensions-simple/src/test/kotlin/protokt/v1/UuidBytesConverterTest.kt similarity index 75% rename from extensions/protokt-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/UuidConverterTest.kt rename to extensions/protokt-jvm-extensions-simple/src/test/kotlin/protokt/v1/UuidBytesConverterTest.kt index 3f2accec9..d332c9012 100644 --- a/extensions/protokt-extensions-simple/src/test/kotlin/com/toasttab/protokt/ext/UuidConverterTest.kt +++ b/extensions/protokt-jvm-extensions-simple/src/test/kotlin/protokt/v1/UuidBytesConverterTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2023 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,29 +13,30 @@ * limitations under the License. */ -package com.toasttab.protokt.ext +package protokt.v1 +import com.google.common.truth.Truth import com.google.common.truth.Truth.assertThat import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertThrows import java.util.UUID -class UuidConverterTest { +class UuidBytesConverterTest { @Test fun `conversion works`() { val uuid = UUID.randomUUID() assertThat( - UuidConverter.wrap(UuidConverter.unwrap(uuid)) + UuidBytesConverter.wrap(UuidBytesConverter.unwrap(uuid)) ).isEqualTo(uuid) } @Test fun `wrap requires a byte array of length 16`() { val thrown = assertThrows { - UuidConverter.wrap(byteArrayOf()) + UuidBytesConverter.wrap(Bytes.empty()) } - assertThat(thrown).hasMessageThat().contains("must have size 16") + Truth.assertThat(thrown).hasMessageThat().contains("must have size 16") } } diff --git a/extensions/protokt-jvm-extensions/api/protokt-jvm-extensions.api b/extensions/protokt-jvm-extensions/api/protokt-jvm-extensions.api new file mode 100644 index 000000000..ff190650f --- /dev/null +++ b/extensions/protokt-jvm-extensions/api/protokt-jvm-extensions.api @@ -0,0 +1,9 @@ +public final class protokt/v1/InetSocketAddressProto { + public static final field INSTANCE Lprotokt/v1/InetSocketAddressProto; + public final fun getDescriptor ()Lprotokt/v1/google/protobuf/FileDescriptor; +} + +public final class protokt/v1/Inet_socket_address_descriptorsKt { + public static final fun getDescriptor (Lprotokt/v1/InetSocketAddress$Deserializer;)Lprotokt/v1/google/protobuf/Descriptor; +} + diff --git a/testing/plugin-options/ignore-java-package/build.gradle.kts b/extensions/protokt-jvm-extensions/build.gradle.kts similarity index 69% rename from testing/plugin-options/ignore-java-package/build.gradle.kts rename to extensions/protokt-jvm-extensions/build.gradle.kts index aa0f33771..5ccb9aa39 100644 --- a/testing/plugin-options/ignore-java-package/build.gradle.kts +++ b/extensions/protokt-jvm-extensions/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,29 +14,32 @@ */ import com.google.protobuf.gradle.proto -import com.toasttab.protokt.gradle.protokt +import protokt.v1.gradle.protokt plugins { id("protokt.jvm-conventions") } localProtokt() +enablePublishing() pureKotlin() +trackKotlinApiCompatibility() -sourceSets { - main { - proto { - srcDir("${project.rootDir}/testing/runtime-tests/src/main/proto") - } +protokt { + generate { + types = false } } -protokt { - respectJavaPackage = false +dependencies { + api(project(":extensions:protokt-extensions")) + api(project(":extensions:protokt-jvm-extensions-lite")) } -dependencies { - implementation(project(":protokt-runtime-grpc-lite")) - implementation(libraries.grpcStub) - implementation(libraries.protobufJava) +sourceSets { + main { + proto { + srcDir("../protokt-jvm-extensions-lite/src/main/proto") + } + } } diff --git a/gradle-plugin-integration-test/build.gradle.kts b/gradle-plugin-integration-test/build.gradle.kts index 912cba089..25294df9e 100644 --- a/gradle-plugin-integration-test/build.gradle.kts +++ b/gradle-plugin-integration-test/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,15 +23,15 @@ plugins { buildscript { repositories { + mavenCentral() maven(url = "$projectDir/../build/repos/integration") gradlePluginPortal() - mavenCentral() } dependencies { classpath("com.toasttab.protokt:protokt-gradle-plugin:$version") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${System.getProperty("kotlin.version", "1.6.32")}") - classpath("com.diffplug.spotless:spotless-plugin-gradle:5.15.0") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${System.getProperty("kotlin-integration.version", libs.versions.kotlin.get())}") + classpath("com.diffplug.spotless:spotless-plugin-gradle:${libs.versions.spotless.get()}") } } @@ -42,12 +42,47 @@ allprojects { apply(plugin = "com.diffplug.spotless") configure { + val editorConfigOverride = + mapOf( + "ktlint_standard_trailing-comma-on-call-site" to "disabled", + "ktlint_standard_trailing-comma-on-declaration-site" to "disabled" + ) + kotlinGradle { - ktlint() + target("**/*.kts") + targetExclude("**/build/generated/**") + ktlint().editorConfigOverride(editorConfigOverride) + } + + kotlin { + target("**/*.kt") + targetExclude("**/build/generated/**") + ktlint().editorConfigOverride(editorConfigOverride) + } + + format("kotlinLicense") { + target("**/*.kt") + licenseHeaderFile( + rootProject.file("gradle/license-header-c-style"), + "(package |@file|import |fun )" + ) + targetExclude("**/generated-sources/**") + } + + format("protobufLicense") { + target("**/*.proto") + licenseHeaderFile( + rootProject.file("gradle/license-header-c-style"), + "(syntax )" + ) } } } +repositories { + mavenCentral() +} + subprojects { repositories { maven(url = "${rootProject.projectDir}/../build/repos/integration") @@ -55,26 +90,25 @@ subprojects { } tasks { + withType { + environment("version", version.toString()) + } + + withType { + enabled = false + } + withType { kotlinOptions { allWarningsAsErrors = true - jvmTarget = "1.8" apiVersion = - System.getProperty("kotlin.version") + System.getProperty("kotlin-integration.version") ?.substringBeforeLast(".") - ?: "1.6" + ?: libs.versions.kotlin.get().substringBeforeLast(".") languageVersion = apiVersion } } - - withType { - environment("version", version.toString()) - } - - withType { - enabled = false - } } } diff --git a/gradle-plugin-integration-test/jvm-lite/build.gradle.kts b/gradle-plugin-integration-test/jvm-lite/build.gradle.kts index c670d68af..002b4694f 100644 --- a/gradle-plugin-integration-test/jvm-lite/build.gradle.kts +++ b/gradle-plugin-integration-test/jvm-lite/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,13 @@ */ plugins { - id("org.jetbrains.kotlin.jvm") - id("com.toasttab.protokt") + kotlin("jvm") + id("com.toasttab.protokt.v1") } protokt { - lite = true + formatOutput = false // https://github.com/pinterest/ktlint/issues/1195 + generate { lite() } } tasks { @@ -29,25 +30,41 @@ tasks { } dependencies { - protoktExtensions("com.toasttab.protokt:protokt-extensions-lite:$version") + protoktExtensions("com.toasttab.protokt:protokt-jvm-extensions-lite:$version") protoktExtensions(project(":wrapper-types")) testImplementation(kotlin("test-junit5")) - testImplementation("org.junit.jupiter:junit-jupiter:5.7.2") - testImplementation("com.google.protobuf:protobuf-javalite:3.19.1") + testImplementation(libs.junit.jupiter) + testImplementation(libs.protobuf.java) testImplementation("com.toasttab.protokt:protokt-util:$version") } sourceSets { main { proto { - srcDir("../jvm-regular/src/main/proto") + srcDir("../multiplatform/src/main/proto") } } test { java { - srcDir("../jvm-regular/src/test/kotlin") - srcDir("../../testing/plugin-options/lite/src/test/kotlin/com/toasttab/protokt/testing/lite") + val common = "../multiplatform/src/commonTest/kotlin" + val lite = "../../testing/plugin-options/lite/src/test/kotlin/protokt/v1/testing/lite" + check(file(common).exists()) + check(file(lite).exists()) + srcDir(common) + srcDir(lite) } } } + +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(System.getProperty("java-integration.version", libs.versions.java.get()).toInt())) + } +} + +kotlin { + jvmToolchain { + (this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(System.getProperty("java-integration.version", libs.versions.java.get()).toInt())) + } +} diff --git a/gradle-plugin-integration-test/jvm-lite/src/main/proto/toasttab/protokt/testing/wrapper_test.proto b/gradle-plugin-integration-test/jvm-lite/src/main/proto/testing/wrapper_test.proto similarity index 78% rename from gradle-plugin-integration-test/jvm-lite/src/main/proto/toasttab/protokt/testing/wrapper_test.proto rename to gradle-plugin-integration-test/jvm-lite/src/main/proto/testing/wrapper_test.proto index 3ece49a24..205e2bbad 100644 --- a/gradle-plugin-integration-test/jvm-lite/src/main/proto/toasttab/protokt/testing/wrapper_test.proto +++ b/gradle-plugin-integration-test/jvm-lite/src/main/proto/testing/wrapper_test.proto @@ -15,12 +15,10 @@ syntax = "proto3"; -package toasttab.protokt.testing; +package testing; -option java_package = "com.toasttab.protokt.testing"; - -import "protokt/protokt.proto"; +import "protokt/v1/protokt.proto"; message WrapperTest { - bytes foo = 1 [(.protokt.property).wrap = "Id"]; + bytes foo = 1 [(protokt.v1.property).wrap = "Id"]; } diff --git a/gradle-plugin-integration-test/jvm-regular/build.gradle.kts b/gradle-plugin-integration-test/jvm-regular/build.gradle.kts index d04b8eeec..780f8a81f 100644 --- a/gradle-plugin-integration-test/jvm-regular/build.gradle.kts +++ b/gradle-plugin-integration-test/jvm-regular/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,11 +13,13 @@ * limitations under the License. */ -import com.toasttab.protokt.gradle.protoktExtensions - plugins { - id("org.jetbrains.kotlin.jvm") - id("com.toasttab.protokt") + kotlin("jvm") + id("com.toasttab.protokt.v1") +} + +protokt { + formatOutput = false // https://github.com/pinterest/ktlint/issues/1195 } tasks { @@ -27,10 +29,34 @@ tasks { } dependencies { - protoktExtensions("com.toasttab.protokt:protokt-extensions:$version") + protoktExtensions("com.toasttab.protokt:protokt-jvm-extensions:$version") testImplementation(kotlin("test-junit5")) - testImplementation("org.junit.jupiter:junit-jupiter:5.7.2") - testImplementation("com.google.protobuf:protobuf-java:3.19.1") - testImplementation("com.toasttab.protokt:protokt-util:$version") + testImplementation(libs.junit.jupiter) + testImplementation(libs.protobuf.java) +} + +sourceSets { + main { + proto { + srcDir("../multiplatform/src/main/proto") + } + } + test { + java { + val common = "../multiplatform/src/commonTest/kotlin" + check(file(common).exists()) + srcDir(common) + } + } +} + +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(System.getProperty("java-integration.version", libs.versions.java.get()).toInt())) + } +} + +kotlin { + jvmToolchain(System.getProperty("java-integration.version", libs.versions.java.get()).toInt()) } diff --git a/gradle-plugin-integration-test/kotlin-js-store/yarn.lock b/gradle-plugin-integration-test/kotlin-js-store/yarn.lock new file mode 100644 index 000000000..4b897667a --- /dev/null +++ b/gradle-plugin-integration-test/kotlin-js-store/yarn.lock @@ -0,0 +1,2036 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + +"@discoveryjs/json-ext@^0.5.0": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== + +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/source-map@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.3.tgz#8108265659d4c33e72ffe14e33d6cc5eb59f2fda" + integrity sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/sourcemap-codec@1.4.14": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.18" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" + integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== + dependencies: + "@jridgewell/resolve-uri" "3.1.0" + "@jridgewell/sourcemap-codec" "1.4.14" + +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== + +"@socket.io/component-emitter@~3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" + integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== + +"@types/cookie@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" + integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== + +"@types/cors@^2.8.12": + version "2.8.13" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.13.tgz#b8ade22ba455a1b8cb3b5d3f35910fd204f84f94" + integrity sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA== + dependencies: + "@types/node" "*" + +"@types/eslint-scope@^3.7.3": + version "3.7.4" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" + integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*": + version "8.40.1" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.40.1.tgz#92edc592c3575b52a8e790cd5ec04efe28f3d24c" + integrity sha512-vRb792M4mF1FBT+eoLecmkpLXwxsBHvWWRGJjzbYANBM6DtiJc6yETyv4rqDA6QNjF1pkj1U7LMA6dGb3VYlHw== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*", "@types/estree@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" + integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== + +"@types/json-schema@*", "@types/json-schema@^7.0.8": + version "7.0.12" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" + integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== + +"@types/long@^4.0.1": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" + integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== + +"@types/node@*", "@types/node@>=10.0.0", "@types/node@>=13.7.0": + version "20.3.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.0.tgz#719498898d5defab83c3560f45d8498f58d11938" + integrity sha512-cumHmIAf6On83X7yP+LrsEyUOf/YlociZelmpRYaGFydoaPdxdt80MAbu6vWerQT2COCp2nPvHdsbD7tHn/YlQ== + +"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24" + integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q== + dependencies: + "@webassemblyjs/helper-numbers" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + +"@webassemblyjs/floating-point-hex-parser@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" + integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== + +"@webassemblyjs/helper-api-error@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" + integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== + +"@webassemblyjs/helper-buffer@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz#b66d73c43e296fd5e88006f18524feb0f2c7c093" + integrity sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA== + +"@webassemblyjs/helper-numbers@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" + integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/helper-wasm-bytecode@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" + integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== + +"@webassemblyjs/helper-wasm-section@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz#ff97f3863c55ee7f580fd5c41a381e9def4aa577" + integrity sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" + +"@webassemblyjs/ieee754@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" + integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" + integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" + integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== + +"@webassemblyjs/wasm-edit@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz#c72fa8220524c9b416249f3d94c2958dfe70ceab" + integrity sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/helper-wasm-section" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" + "@webassemblyjs/wasm-opt" "1.11.6" + "@webassemblyjs/wasm-parser" "1.11.6" + "@webassemblyjs/wast-printer" "1.11.6" + +"@webassemblyjs/wasm-gen@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz#fb5283e0e8b4551cc4e9c3c0d7184a65faf7c268" + integrity sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wasm-opt@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz#d9a22d651248422ca498b09aa3232a81041487c2" + integrity sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" + "@webassemblyjs/wasm-parser" "1.11.6" + +"@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz#bb85378c527df824004812bbdb784eea539174a1" + integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wast-printer@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz#a7bf8dd7e362aeb1668ff43f35cb849f188eff20" + integrity sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@xtuc/long" "4.2.2" + +"@webpack-cli/configtest@^2.1.0": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" + integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== + +"@webpack-cli/info@^2.0.1": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" + integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== + +"@webpack-cli/serve@^2.0.3": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" + integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +abab@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== + +accepts@~1.3.4: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +acorn-import-assertions@^1.7.6: + version "1.9.0" + resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" + integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== + +acorn@^8.7.1, acorn@^8.8.2: + version "8.8.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== + +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv@^6.12.5: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64id@2.0.0, base64id@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" + integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +body-parser@^1.19.0: + version "1.20.2" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" + integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== + dependencies: + bytes "3.1.2" + content-type "~1.0.5" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.2" + type-is "~1.6.18" + unpipe "1.0.0" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserslist@^4.14.5: + version "4.21.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.7.tgz#e2b420947e5fb0a58e8f4668ae6e23488127e551" + integrity sha512-BauCXrQ7I2ftSqd2mvKHGo85XR0u7Ru3C/Hxsy/0TkfCtjrmAbPdzLGasmoiBxplpDXlPvdjX9u7srIMfgasNA== + dependencies: + caniuse-lite "^1.0.30001489" + electron-to-chromium "^1.4.411" + node-releases "^2.0.12" + update-browserslist-db "^1.0.11" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001489: + version "1.0.30001498" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001498.tgz#84e4ee2d03e0e4f8a04a508853b75a980c703201" + integrity sha512-LFInN2zAwx3ANrGCDZ5AKKJroHqNKyjXitdV5zRIVIaQlXKj3GmxUKagoKsjqUfckpAObPCEWnk5EeMlyMWcgw== + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chokidar@3.5.3, chokidar@^3.5.1: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chrome-trace-event@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colorette@^2.0.14: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + +commander@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +connect@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" + integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== + dependencies: + debug "2.6.9" + finalhandler "1.1.2" + parseurl "~1.3.3" + utils-merge "1.0.1" + +content-type@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + +cookie@~0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + +cors@~2.8.5: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +custom-event@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" + integrity sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg== + +date-format@^4.0.14: + version "4.0.14" + resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400" + integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg== + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@4.3.4, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +di@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" + integrity sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA== + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +dom-serialize@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" + integrity sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ== + dependencies: + custom-event "~1.0.0" + ent "~2.2.0" + extend "^3.0.0" + void-elements "^2.0.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +electron-to-chromium@^1.4.411: + version "1.4.427" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.427.tgz#67e8069f7a864fc092fe2e09f196e68af5cb88a1" + integrity sha512-HK3r9l+Jm8dYAm1ctXEWIC+hV60zfcjS9UA5BDlYvnI5S7PU/yytjpvSrTNrSSRRkuu3tDyZhdkwIczh+0DWaw== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +engine.io-parser@~5.0.3: + version "5.0.7" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.7.tgz#ed5eae76c71f398284c578ab6deafd3ba7e4e4f6" + integrity sha512-P+jDFbvK6lE3n1OL+q9KuzdOFWkkZ/cMV9gol/SbVfpyqfvrfrFTOFJ6fQm2VC3PZHlU3QPhVwmbsCnauHF2MQ== + +engine.io@~6.4.2: + version "6.4.2" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.4.2.tgz#ffeaf68f69b1364b0286badddf15ff633476473f" + integrity sha512-FKn/3oMiJjrOEOeUub2WCox6JhxBXq/Zn3fZOMCBxKnNYtsdKjxhl7yR3fZhM9PV+rdE75SU5SYMc+2PGzo+Tg== + dependencies: + "@types/cookie" "^0.4.1" + "@types/cors" "^2.8.12" + "@types/node" ">=10.0.0" + accepts "~1.3.4" + base64id "2.0.0" + cookie "~0.4.1" + cors "~2.8.5" + debug "~4.3.1" + engine.io-parser "~5.0.3" + ws "~8.11.0" + +enhanced-resolve@^5.13.0: + version "5.15.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" + integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + +ent@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== + +envinfo@^7.7.3: + version "7.8.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" + integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== + +es-module-lexer@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.0.tgz#6be9c9e0b4543a60cd166ff6f8b4e9dae0b0c16f" + integrity sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA== + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-scope@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +eventemitter3@^4.0.0: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +events@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +extend@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fastest-levenshtein@^1.0.12: + version "1.0.16" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +flatted@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" + integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== + +follow-redirects@^1.0.0: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + +format-util@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/format-util/-/format-util-1.0.5.tgz#1ffb450c8a03e7bccffe40643180918cc297d271" + integrity sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg== + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" + integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-proto "^1.0.1" + has-symbols "^1.0.3" + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + +glob@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.3, glob@^7.1.7: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +http-proxy@^1.18.1: + version "1.18.1" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== + dependencies: + eventemitter3 "^4.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +import-local@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +interpret@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-core-module@^2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== + dependencies: + has "^1.0.3" + +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isbinaryfile@^4.0.8: + version "4.0.10" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.10.tgz#0c5b5e30c2557a2f06febd37b7322946aaee42b3" + integrity sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== + +jest-worker@^27.4.5: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" + integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json-parse-even-better-errors@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +karma-chrome-launcher@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz#eb9c95024f2d6dfbb3748d3415ac9b381906b9a9" + integrity sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q== + dependencies: + which "^1.2.1" + +karma-firefox-launcher@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/karma-firefox-launcher/-/karma-firefox-launcher-2.1.2.tgz#9a38cc783c579a50f3ed2a82b7386186385cfc2d" + integrity sha512-VV9xDQU1QIboTrjtGVD4NCfzIH7n01ZXqy/qpBhnOeGVOkG5JYPEm8kuSd7psHE6WouZaQ9Ool92g8LFweSNMA== + dependencies: + is-wsl "^2.2.0" + which "^2.0.1" + +karma-mocha@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/karma-mocha/-/karma-mocha-2.0.1.tgz#4b0254a18dfee71bdbe6188d9a6861bf86b0cd7d" + integrity sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ== + dependencies: + minimist "^1.2.3" + +karma-sourcemap-loader@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/karma-sourcemap-loader/-/karma-sourcemap-loader-0.4.0.tgz#b01d73f8f688f533bcc8f5d273d43458e13b5488" + integrity sha512-xCRL3/pmhAYF3I6qOrcn0uhbQevitc2DERMPH82FMnG+4WReoGcGFZb1pURf2a5apyrOHRdvD+O6K7NljqKHyA== + dependencies: + graceful-fs "^4.2.10" + +karma-webpack@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-5.0.0.tgz#2a2c7b80163fe7ffd1010f83f5507f95ef39f840" + integrity sha512-+54i/cd3/piZuP3dr54+NcFeKOPnys5QeM1IY+0SPASwrtHsliXUiCL50iW+K9WWA7RvamC4macvvQ86l3KtaA== + dependencies: + glob "^7.1.3" + minimatch "^3.0.4" + webpack-merge "^4.1.5" + +karma@6.4.2: + version "6.4.2" + resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.2.tgz#a983f874cee6f35990c4b2dcc3d274653714de8e" + integrity sha512-C6SU/53LB31BEgRg+omznBEMY4SjHU3ricV6zBcAe1EeILKkeScr+fZXtaI5WyDbkVowJxxAI6h73NcFPmXolQ== + dependencies: + "@colors/colors" "1.5.0" + body-parser "^1.19.0" + braces "^3.0.2" + chokidar "^3.5.1" + connect "^3.7.0" + di "^0.0.1" + dom-serialize "^2.2.1" + glob "^7.1.7" + graceful-fs "^4.2.6" + http-proxy "^1.18.1" + isbinaryfile "^4.0.8" + lodash "^4.17.21" + log4js "^6.4.1" + mime "^2.5.2" + minimatch "^3.0.4" + mkdirp "^0.5.5" + qjobs "^1.2.0" + range-parser "^1.2.1" + rimraf "^3.0.2" + socket.io "^4.4.1" + source-map "^0.6.1" + tmp "^0.2.1" + ua-parser-js "^0.7.30" + yargs "^16.1.1" + +kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +loader-runner@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash@^4.17.15, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +log4js@^6.4.1: + version "6.9.1" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.9.1.tgz#aba5a3ff4e7872ae34f8b4c533706753709e38b6" + integrity sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g== + dependencies: + date-format "^4.0.14" + debug "^4.3.4" + flatted "^3.2.7" + rfdc "^1.3.0" + streamroller "^3.1.5" + +long@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.27, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@^2.5.2: + version "2.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" + integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== + +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.3, minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +mkdirp@^0.5.5: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mocha@10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" + integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + nanoid "3.3.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nanoid@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== + +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +neo-async@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +node-releases@^2.0.12: + version "2.0.12" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.12.tgz#35627cc224a23bfb06fb3380f2b3afaaa7eb1039" + integrity sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +object-assign@^4: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.9.0: + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== + dependencies: + ee-first "1.1.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +protobufjs@6.11.3: + version "6.11.3" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.3.tgz#637a527205a35caa4f3e2a9a4a13ddffe0e7af74" + integrity sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/long" "^4.0.1" + "@types/node" ">=13.7.0" + long "^4.0.0" + +punycode@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + +qjobs@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" + integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg== + +qs@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +range-parser@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +rechoir@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== + dependencies: + resolve "^1.20.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve@^1.20.0: + version "1.22.4" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34" + integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +rfdc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" + integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== + +rimraf@^3.0.0, rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +schema-utils@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.2.0.tgz#7dff4881064a4f22c09f0c6a1457feb820fd0636" + integrity sha512-0zTyLGyDJYd/MBxG1AhJkKa6fpEBds4OQO2ut0w7OYG+ZGhGea09lijvzsqegYSik88zc7cUtIlnnO+/BvD6gQ== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +schema-utils@^3.1.2: + version "3.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" + integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + +serialize-javascript@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" + integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== + dependencies: + randombytes "^2.1.0" + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +socket.io-adapter@~2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz#5de9477c9182fdc171cd8c8364b9a8894ec75d12" + integrity sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA== + dependencies: + ws "~8.11.0" + +socket.io-parser@~4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" + integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + +socket.io@^4.4.1: + version "4.6.2" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.6.2.tgz#d597db077d4df9cbbdfaa7a9ed8ccc3d49439786" + integrity sha512-Vp+lSks5k0dewYTfwgPT9UeGGd+ht7sCpB7p0e83VgO4X/AHYWhXITMrNk/pg8syY2bpx23ptClCQuHhqi2BgQ== + dependencies: + accepts "~1.3.4" + base64id "~2.0.0" + debug "~4.3.2" + engine.io "~6.4.2" + socket.io-adapter "~2.5.2" + socket.io-parser "~4.2.4" + +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + +source-map-loader@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-4.0.1.tgz#72f00d05f5d1f90f80974eda781cbd7107c125f2" + integrity sha512-oqXpzDIByKONVY8g1NUPOTQhe0UTU5bWUl32GSkqK2LjJj0HmwTMVKxcUip0RgAYhY1mqgOxjbQM48a0mmeNfA== + dependencies: + abab "^2.0.6" + iconv-lite "^0.6.3" + source-map-js "^1.0.2" + +source-map-support@0.5.21, source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== + +streamroller@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-3.1.5.tgz#1263182329a45def1ffaef58d31b15d13d2ee7ff" + integrity sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw== + dependencies: + date-format "^4.0.14" + debug "^4.3.4" + fs-extra "^8.1.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@8.1.1, supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tapable@^2.1.1, tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + +terser-webpack-plugin@^5.3.7: + version "5.3.9" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz#832536999c51b46d468067f9e37662a3b96adfe1" + integrity sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA== + dependencies: + "@jridgewell/trace-mapping" "^0.3.17" + jest-worker "^27.4.5" + schema-utils "^3.1.1" + serialize-javascript "^6.0.1" + terser "^5.16.8" + +terser@^5.16.8: + version "5.17.7" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.17.7.tgz#2a8b134826fe179b711969fd9d9a0c2479b2a8c3" + integrity sha512-/bi0Zm2C6VAexlGgLlVxA0P2lru/sdLyfCVaRMfKVo9nWxbmz7f/sD8VPybPeSUJaJcwmCJis9pBIhcVcG1QcQ== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + +tmp@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" + integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== + dependencies: + rimraf "^3.0.0" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typescript@5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" + integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== + +ua-parser-js@^0.7.30: + version "0.7.35" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.35.tgz#8bda4827be4f0b1dda91699a29499575a1f1d307" + integrity sha512-veRf7dawaj9xaWEu9HoTVn5Pggtc/qj+kqTOFvNiN1l0YdxwC1kvel57UCjThjGa3BHBihE8/UJAHI+uQHmd/g== + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +update-browserslist-db@^1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" + integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + +vary@^1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + +void-elements@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" + integrity sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung== + +watchpack@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" + integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + +webpack-cli@5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.0.tgz#abc4b1f44b50250f2632d8b8b536cfe2f6257891" + integrity sha512-a7KRJnCxejFoDpYTOwzm5o21ZXMaNqtRlvS183XzGDUPRdVEzJNImcQokqYZ8BNTnk9DkKiuWxw75+DCCoZ26w== + dependencies: + "@discoveryjs/json-ext" "^0.5.0" + "@webpack-cli/configtest" "^2.1.0" + "@webpack-cli/info" "^2.0.1" + "@webpack-cli/serve" "^2.0.3" + colorette "^2.0.14" + commander "^10.0.1" + cross-spawn "^7.0.3" + envinfo "^7.7.3" + fastest-levenshtein "^1.0.12" + import-local "^3.0.2" + interpret "^3.1.1" + rechoir "^0.8.0" + webpack-merge "^5.7.3" + +webpack-merge@^4.1.5: + version "4.2.2" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" + integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g== + dependencies: + lodash "^4.17.15" + +webpack-merge@^5.7.3: + version "5.9.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.9.0.tgz#dc160a1c4cf512ceca515cc231669e9ddb133826" + integrity sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg== + dependencies: + clone-deep "^4.0.1" + wildcard "^2.0.0" + +webpack-sources@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + +webpack@5.82.0: + version "5.82.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.82.0.tgz#3c0d074dec79401db026b4ba0fb23d6333f88e7d" + integrity sha512-iGNA2fHhnDcV1bONdUu554eZx+XeldsaeQ8T67H6KKHl2nUSwX8Zm7cmzOA46ox/X1ARxf7Bjv8wQ/HsB5fxBg== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^1.0.0" + "@webassemblyjs/ast" "^1.11.5" + "@webassemblyjs/wasm-edit" "^1.11.5" + "@webassemblyjs/wasm-parser" "^1.11.5" + acorn "^8.7.1" + acorn-import-assertions "^1.7.6" + browserslist "^4.14.5" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.13.0" + es-module-lexer "^1.2.1" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.9" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.1.2" + tapable "^2.1.1" + terser-webpack-plugin "^5.3.7" + watchpack "^2.4.0" + webpack-sources "^3.2.3" + +which@^1.2.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wildcard@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" + integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== + +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@~8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@16.2.0, yargs@^16.1.1: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/gradle-plugin-integration-test/multiplatform/build.gradle.kts b/gradle-plugin-integration-test/multiplatform/build.gradle.kts new file mode 100644 index 000000000..0b4073a07 --- /dev/null +++ b/gradle-plugin-integration-test/multiplatform/build.gradle.kts @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import protokt.v1.gradle.ProtoktExtension +import protokt.v1.gradle.ProtoktPlugin +import protokt.v1.gradle.protoktExtensions + +plugins { + kotlin("multiplatform") +} + +kotlin { + jvm { + withJava() + } + + js(IR) { + browser { + testTask { + useKarma { + useFirefoxHeadless() + } + } + } + + nodejs { + testTask { + useMocha() + } + } + + useCommonJs() + } + + sourceSets { + val commonMain by getting {} + + val commonTest by getting { + dependencies { + implementation(kotlin("test")) + } + } + + val jvmTest by getting { + dependencies { + runtimeOnly(libs.protobuf.java) + } + } + + // todo: figure out how to reuse the tests from testing/protobufjs + val jsTest by getting {} + } + + targets { + jvm().compilations.all { + kotlinOptions { + freeCompilerArgs = listOf("-Xjvm-default=all") + } + } + } +} + +tasks.named("jvmTest") { + useJUnitPlatform() +} + +// awkward that we have to apply the plugin after source sets are configured +apply() + +configure { + formatOutput = false // https://github.com/pinterest/ktlint/issues/1195 +} + +dependencies { + protoktExtensions("com.toasttab.protokt:protokt-extensions:$version") +} + +tasks.named("jsNodeTest") { + enabled = System.getProperty("kotlin.version", libs.versions.kotlin.get()) == libs.versions.kotlin.get() +} + +tasks.named("jsBrowserTest") { + enabled = System.getProperty("kotlin.version", libs.versions.kotlin.get()) == libs.versions.kotlin.get() +} + +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(System.getProperty("java-integration.version", libs.versions.java.get()).toInt())) + } +} + +kotlin { + jvmToolchain { + (this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(System.getProperty("java-integration.version", libs.versions.java.get()).toInt())) + } +} diff --git a/gradle-plugin-integration-test/jvm-regular/src/test/kotlin/com/toasttab/protokt/testing/TestMessageTest.kt b/gradle-plugin-integration-test/multiplatform/src/commonTest/kotlin/protokt/v1/testing/TestMessageTest.kt similarity index 92% rename from gradle-plugin-integration-test/jvm-regular/src/test/kotlin/com/toasttab/protokt/testing/TestMessageTest.kt rename to gradle-plugin-integration-test/multiplatform/src/commonTest/kotlin/protokt/v1/testing/TestMessageTest.kt index ec0b4256b..dc274e827 100644 --- a/gradle-plugin-integration-test/jvm-regular/src/test/kotlin/com/toasttab/protokt/testing/TestMessageTest.kt +++ b/gradle-plugin-integration-test/multiplatform/src/commonTest/kotlin/protokt/v1/testing/TestMessageTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * limitations under the License. */ -package com.toasttab.protokt.testing +package protokt.v1.testing import kotlin.test.Test import kotlin.test.assertEquals diff --git a/gradle-plugin-integration-test/multiplatform/src/jsTest/kotlin/protokt/v1/testing/BasicSerializationTest.kt b/gradle-plugin-integration-test/multiplatform/src/jsTest/kotlin/protokt/v1/testing/BasicSerializationTest.kt new file mode 100644 index 000000000..b2e6abc4a --- /dev/null +++ b/gradle-plugin-integration-test/multiplatform/src/jsTest/kotlin/protokt/v1/testing/BasicSerializationTest.kt @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.testing + +import protokt.v1.configureLong +import protokt.v1.google.protobuf.Timestamp +import kotlin.test.BeforeTest +import kotlin.test.Test +import kotlin.test.assertEquals + +class BasicSerializationTest { + @BeforeTest + fun before() { + configureLong() + } + + @Test + fun test_timestamp_round_trip() { + val timestamp = + Timestamp { + seconds = Long.MAX_VALUE + nanos = 10 + } + + val deserialized = Timestamp.deserialize(timestamp.serialize()) + + assertEquals(timestamp, deserialized) + } + + @Test + fun test_small_timestamp_round_trip() { + val timestamp = + Timestamp { + seconds = 15 + nanos = 10 + } + + val deserialized = Timestamp.deserialize(timestamp.serialize()) + + assertEquals(timestamp, deserialized) + } +} diff --git a/gradle-plugin-integration-test/jvm-regular/src/test/kotlin/com/toasttab/protokt/testing/VersionTest.kt b/gradle-plugin-integration-test/multiplatform/src/jvmTest/kotlin/protokt/v1/testing/VersionTest.kt similarity index 70% rename from gradle-plugin-integration-test/jvm-regular/src/test/kotlin/com/toasttab/protokt/testing/VersionTest.kt rename to gradle-plugin-integration-test/multiplatform/src/jvmTest/kotlin/protokt/v1/testing/VersionTest.kt index f1e746d6c..fa6f4b4e6 100644 --- a/gradle-plugin-integration-test/jvm-regular/src/test/kotlin/com/toasttab/protokt/testing/VersionTest.kt +++ b/gradle-plugin-integration-test/multiplatform/src/jvmTest/kotlin/protokt/v1/testing/VersionTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,19 +13,18 @@ * limitations under the License. */ -package com.toasttab.protokt.testing +package protokt.v1.testing -import com.toasttab.protokt.rt.KtMessage -import com.toasttab.protokt.util.getProtoktVersion +import protokt.v1.KtMessage import kotlin.test.Test -import kotlin.test.assertEquals +import kotlin.test.assertTrue class VersionTest { @Test fun `runtime version should match project version`() { val version = System.getenv("version") - val runtimeVersion = getProtoktVersion(KtMessage::class) + val runtimeJarPath = KtMessage::class.java.protectionDomain.codeSource.location.toString() - assertEquals(version, runtimeVersion) + assertTrue(runtimeJarPath.endsWith("protokt-runtime-jvm-$version.jar")) } } diff --git a/gradle-plugin-integration-test/jvm-regular/src/main/proto/toasttab/protokt/testing/test.proto b/gradle-plugin-integration-test/multiplatform/src/main/proto/testing/test.proto similarity index 73% rename from gradle-plugin-integration-test/jvm-regular/src/main/proto/toasttab/protokt/testing/test.proto rename to gradle-plugin-integration-test/multiplatform/src/main/proto/testing/test.proto index dc1cd689b..2e5acc377 100644 --- a/gradle-plugin-integration-test/jvm-regular/src/main/proto/toasttab/protokt/testing/test.proto +++ b/gradle-plugin-integration-test/multiplatform/src/main/proto/testing/test.proto @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,11 +15,10 @@ syntax = "proto3"; -package toasttab.protokt.testing; +package testing; -option (.protokt.file).kotlin_package = "com.toasttab.protokt.testing"; - -import "protokt/protokt.proto"; +import "google/protobuf/wrappers.proto"; +import "protokt/v1/protokt.proto"; message TestMessage { string baz = 1; @@ -28,7 +27,13 @@ message TestMessage { string foo = 2; } + google.protobuf.BoolValue qux = 3; + enum Foo { FOO_FIRST_UNSPECIFIED = 0; } + + message Submessage { + TestMessage qux = 1 [(protokt.v1.property).non_null = true]; + } } diff --git a/gradle-plugin-integration-test/settings.gradle.kts b/gradle-plugin-integration-test/settings.gradle.kts index 8bb20406f..26683e9eb 100644 --- a/gradle-plugin-integration-test/settings.gradle.kts +++ b/gradle-plugin-integration-test/settings.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,10 @@ buildscript { } } +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "0.4.0" +} + apply(plugin = "net.vivin.gradle-semantic-build-versioning") rootProject.name = "gradle-plugin-integration-test" @@ -29,5 +33,6 @@ rootProject.name = "gradle-plugin-integration-test" listOf( "jvm-regular", "jvm-lite", + "multiplatform", "wrapper-types" ).forEach { include(it) } diff --git a/gradle-plugin-integration-test/wrapper-types/build.gradle.kts b/gradle-plugin-integration-test/wrapper-types/build.gradle.kts index 615b3c8f8..f4922a075 100644 --- a/gradle-plugin-integration-test/wrapper-types/build.gradle.kts +++ b/gradle-plugin-integration-test/wrapper-types/build.gradle.kts @@ -20,12 +20,18 @@ plugins { dependencies { implementation("com.toasttab.protokt:protokt-core:$version") - implementation("com.google.auto.service:auto-service-annotations:1.0.1") + implementation(libs.autoServiceAnnotations) - kapt("com.google.auto.service:auto-service:1.0.1") + kapt(libs.autoService) } -configure { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 +// pin to the runtime version of protokt +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(libs.versions.java.get().toInt())) + } +} + +kotlin { + jvmToolchain(libs.versions.java.get().toInt()) } diff --git a/gradle-plugin-integration-test/wrapper-types/src/main/kotlin/com/toasttab/protokt/testing/Id.kt b/gradle-plugin-integration-test/wrapper-types/src/main/kotlin/protokt/v1/testing/Id.kt similarity index 73% rename from gradle-plugin-integration-test/wrapper-types/src/main/kotlin/com/toasttab/protokt/testing/Id.kt rename to gradle-plugin-integration-test/wrapper-types/src/main/kotlin/protokt/v1/testing/Id.kt index f3a4d3409..fd7e079d4 100644 --- a/gradle-plugin-integration-test/wrapper-types/src/main/kotlin/com/toasttab/protokt/testing/Id.kt +++ b/gradle-plugin-integration-test/wrapper-types/src/main/kotlin/protokt/v1/testing/Id.kt @@ -13,22 +13,23 @@ * limitations under the License. */ -package com.toasttab.protokt.testing +package protokt.v1.testing import com.google.auto.service.AutoService -import com.toasttab.protokt.ext.Converter +import protokt.v1.Bytes +import protokt.v1.Converter data class Id(val value: String) @AutoService(Converter::class) -object IdConverter : Converter { +object IdConverter : Converter { override val wrapper = Id::class - override val wrapped = ByteArray::class + override val wrapped = Bytes::class - override fun wrap(unwrapped: ByteArray) = - Id(String(unwrapped)) + override fun wrap(unwrapped: Bytes) = + Id(String(unwrapped.bytes)) override fun unwrap(wrapped: Id) = - wrapped.value.toByteArray() + Bytes(wrapped.value.toByteArray()) } diff --git a/gradle.properties b/gradle.properties index a182a51c3..4f68af1fc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1,2 @@ -org.gradle.jvmargs=-Xmx3072M +org.gradle.jvmargs=-Xmx4096M +kotlin.mpp.stability.nowarn=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 000000000..0996150e3 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,101 @@ +# Copyright (c) 2022 Toast, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[versions] +autoService = "1.0.1" +grpc-java = "1.56.1" +grpc-kotlin = "1.3.0" +kotlinLogging = "5.1.0" +kotlinPoet = "1.14.2" +kotlinx-coroutines = "1.6.0" +kotlinx-serialization = "1.5.1" +ktlint = "0.50.0" +protobuf-java = "3.21.7" +protobuf-js = "6.11.3" +protobufGradlePlugin = "0.9.4" +slf4j = "2.0.6" + +# build +androidGradlePlugin = "7.4.2" +animalSnifferGradlePlugin = "1.5.4" +binaryCompatibilityValidator = "0.13.2" +buildConfig = "3.1.0" +gradleMavenPublishPlugin = "0.25.2" +java = "11" +kotlin = "1.9.10" +pluginPublish = "1.2.0" +spotless = "6.21.0" + +# benchmarks +datasets = "0.1.0" +download = "5.4.0" +jmh = "1.26" +wire = "4.8.1" + +# test +grpc-js = "1.8.14" +jackson = "2.15.2" +junit = "5.9.3" +truth = "1.1.3" + +# third party +protoGoogleCommonProtos = "2.21.0" + +[plugins] +buildConfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildConfig" } +download = { id = "de.undercouch.download", version.ref = "download" } +pluginPublish = { id = "com.gradle.plugin-publish", version.ref = "pluginPublish" } +wire = { id = "com.squareup.wire", version.ref = "wire" } + +[libraries] +autoService = { module = "com.google.auto.service:auto-service", version.ref = "autoService" } +autoServiceAnnotations = { module = "com.google.auto.service:auto-service-annotations", version.ref = "autoService" } +grpc-kotlin-gen = { module = "io.grpc:protoc-gen-grpc-kotlin", version.ref = "grpc-kotlin" } +grpc-netty = { module = "io.grpc:grpc-netty", version.ref = "grpc-java" } +grpc-stub = { module = "io.grpc:grpc-stub", version.ref = "grpc-java" } +kotlinLogging = { module = "io.github.oshai:kotlin-logging", version.ref = "kotlinLogging" } +kotlinPoet = { module = "com.squareup:kotlinpoet", version.ref = "kotlinPoet" } +kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } +ktlint = { module = "com.pinterest.ktlint:ktlint-rule-engine", version.ref = "ktlint" } +ktlintRuleSetStandard = { module = "com.pinterest.ktlint:ktlint-ruleset-standard", version.ref = "ktlint" } +protobuf-gradlePlugin = { module = "com.google.protobuf:protobuf-gradle-plugin", version.ref = "protobufGradlePlugin" } +protobuf-java = { module ="com.google.protobuf:protobuf-java", version.ref = "protobuf-java" } +protoc = { module = "com.google.protobuf:protoc", version.ref = "protobuf-java" } +slf4jSimple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j" } + +# build +androidGradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "androidGradlePlugin" } +animalSnifferGradlePlugin = { module = "ru.vyarus:gradle-animalsniffer-plugin", version.ref = "animalSnifferGradlePlugin" } +binaryCompatibilityValidator = { module = "org.jetbrains.kotlinx:binary-compatibility-validator", version.ref = "binaryCompatibilityValidator" } +gradleMavenPublishPlugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "gradleMavenPublishPlugin" } +kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } +spotlessGradlePlugin = { module = "com.diffplug.spotless:spotless-plugin-gradle", version.ref = "spotless" } + +# benchmarks +jmh-core = { module = "org.openjdk.jmh:jmh-core", version.ref = "jmh" } +jmh-generator = { module = "org.openjdk.jmh:jmh-generator-annprocess", version.ref = "jmh" } +wireRuntime = { module = "com.squareup.wire:wire-runtime", version.ref = "wire" } + +# third party +protoGoogleCommonProtos = { module = "com.google.api.grpc:proto-google-common-protos", version.ref = "protoGoogleCommonProtos" } + +# test +grpc-kotlin-stub = { module = "io.grpc:grpc-kotlin-stub", version.ref = "grpc-kotlin" } +grpc-testing = { module = "io.grpc:grpc-testing", version.ref = "grpc-java" } +jackson = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson" } +junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" } +junit-vintage = { module = "org.junit.vintage:junit-vintage-engine" } +kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" } +kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization" } +protobuf-lite = { module = "com.google.protobuf:protobuf-javalite", version.ref = "protobuf-java" } +truth = { module = "com.google.truth:truth", version.ref = "truth" } diff --git a/gradle/license-header-c-style b/gradle/license-header-c-style new file mode 100644 index 000000000..d25d50e69 --- /dev/null +++ b/gradle/license-header-c-style @@ -0,0 +1,15 @@ +/* + * Copyright (c) $YEAR Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ae04661ee..db9a6b825 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/grpc-kotlin-shim/build.gradle.kts b/grpc-kotlin-shim/build.gradle.kts new file mode 100644 index 000000000..387b2009c --- /dev/null +++ b/grpc-kotlin-shim/build.gradle.kts @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("protokt.jvm-conventions") +} + +val grpcKotlinGenerator = configurations.create("grpcKotlinGenerator") + +dependencies { + grpcKotlinGenerator(libs.grpc.kotlin.gen) { + artifact { + name = "protoc-gen-grpc-kotlin" + classifier = "jdk8" + type = "jar" + extension = "jar" + } + } +} + +tasks.withType { + from( + zipTree(grpcKotlinGenerator.singleFile) + .matching { include("**/io/grpc/kotlin/**") } + ) +} diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock new file mode 100644 index 000000000..dbc28cf00 --- /dev/null +++ b/kotlin-js-store/yarn.lock @@ -0,0 +1,2135 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + +"@discoveryjs/json-ext@^0.5.0": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== + +"@grpc/grpc-js@1.8.14": + version "1.8.14" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.8.14.tgz#4fe0f9917d6f094cf59245763c275442b182e9ad" + integrity sha512-w84maJ6CKl5aApCMzFll0hxtFNT6or9WwMslobKaqWUEf1K+zhlL43bSQhFreyYWIWR+Z0xnVFC1KtLm4ZpM/A== + dependencies: + "@grpc/proto-loader" "^0.7.0" + "@types/node" ">=12.12.47" + +"@grpc/proto-loader@^0.7.0": + version "0.7.7" + resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.7.7.tgz#d33677a77eea8407f7c66e2abd97589b60eb4b21" + integrity sha512-1TIeXOi8TuSCQprPItwoMymZXxWT0CPxUhkrkeCUH+D8U7QDwQ6b7SUz2MaLuWM2llT+J/TVFLmQI5KtML3BhQ== + dependencies: + "@types/long" "^4.0.1" + lodash.camelcase "^4.3.0" + long "^4.0.0" + protobufjs "^7.0.0" + yargs "^17.7.2" + +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/source-map@^0.3.3": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.5.tgz#a3bb4d5c6825aab0d281268f47f6ad5853431e91" + integrity sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/sourcemap-codec@1.4.14": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.17": + version "0.3.19" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" + integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@jridgewell/trace-mapping@^0.3.9": + version "0.3.18" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" + integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== + dependencies: + "@jridgewell/resolve-uri" "3.1.0" + "@jridgewell/sourcemap-codec" "1.4.14" + +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== + +"@socket.io/component-emitter@~3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" + integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== + +"@types/cookie@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" + integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== + +"@types/cors@^2.8.12": + version "2.8.13" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.13.tgz#b8ade22ba455a1b8cb3b5d3f35910fd204f84f94" + integrity sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA== + dependencies: + "@types/node" "*" + +"@types/eslint-scope@^3.7.3": + version "3.7.4" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" + integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*": + version "8.4.2" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.2.tgz#48f2ac58ab9c631cb68845c3d956b28f79fad575" + integrity sha512-Z1nseZON+GEnFjJc04sv4NSALGjhFwy6K0HXt7qsn5ArfAKtb63dXNJHf+1YW6IpOIYRBGUbu3GwJdj8DGnCjA== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/estree@*": + version "0.0.51" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" + integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== + +"@types/estree@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" + integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== + +"@types/json-schema@*", "@types/json-schema@^7.0.8": + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" + integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + +"@types/long@^4.0.1": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" + integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== + +"@types/node@*", "@types/node@>=10.0.0", "@types/node@>=13.7.0": + version "17.0.35" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.35.tgz#635b7586086d51fb40de0a2ec9d1014a5283ba4a" + integrity sha512-vu1SrqBjbbZ3J6vwY17jBs8Sr/BKA+/a/WtjRG+whKg1iuLFOosq872EXS0eXWILdO36DHQQeku/ZcL6hz2fpg== + +"@types/node@>=12.12.47": + version "20.1.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.1.7.tgz#ce10c802f7731909d0a44ac9888e8b3a9125eb62" + integrity sha512-WCuw/o4GSwDGMoonES8rcvwsig77dGCMbZDrZr2x4ZZiNW4P/gcoZXe/0twgtobcTkmg9TuKflxYL/DuwDyJzg== + +"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24" + integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q== + dependencies: + "@webassemblyjs/helper-numbers" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + +"@webassemblyjs/floating-point-hex-parser@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" + integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== + +"@webassemblyjs/helper-api-error@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" + integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== + +"@webassemblyjs/helper-buffer@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz#b66d73c43e296fd5e88006f18524feb0f2c7c093" + integrity sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA== + +"@webassemblyjs/helper-numbers@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" + integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/helper-wasm-bytecode@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" + integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== + +"@webassemblyjs/helper-wasm-section@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz#ff97f3863c55ee7f580fd5c41a381e9def4aa577" + integrity sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" + +"@webassemblyjs/ieee754@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" + integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" + integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" + integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== + +"@webassemblyjs/wasm-edit@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz#c72fa8220524c9b416249f3d94c2958dfe70ceab" + integrity sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/helper-wasm-section" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" + "@webassemblyjs/wasm-opt" "1.11.6" + "@webassemblyjs/wasm-parser" "1.11.6" + "@webassemblyjs/wast-printer" "1.11.6" + +"@webassemblyjs/wasm-gen@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz#fb5283e0e8b4551cc4e9c3c0d7184a65faf7c268" + integrity sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wasm-opt@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz#d9a22d651248422ca498b09aa3232a81041487c2" + integrity sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-buffer" "1.11.6" + "@webassemblyjs/wasm-gen" "1.11.6" + "@webassemblyjs/wasm-parser" "1.11.6" + +"@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz#bb85378c527df824004812bbdb784eea539174a1" + integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wast-printer@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz#a7bf8dd7e362aeb1668ff43f35cb849f188eff20" + integrity sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A== + dependencies: + "@webassemblyjs/ast" "1.11.6" + "@xtuc/long" "4.2.2" + +"@webpack-cli/configtest@^2.1.0": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" + integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== + +"@webpack-cli/info@^2.0.1": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" + integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== + +"@webpack-cli/serve@^2.0.3": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" + integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +abab@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== + +accepts@~1.3.4: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +acorn-import-assertions@^1.7.6: + version "1.8.0" + resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9" + integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== + +acorn@^8.7.1: + version "8.8.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== + +acorn@^8.8.2: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + +ajv@^6.12.5: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@~3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64id@2.0.0, base64id@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" + integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +body-parser@^1.19.0: + version "1.20.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.0.tgz#3de69bd89011c11573d7bfee6a64f11b6bd27cc5" + integrity sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg== + dependencies: + bytes "3.1.2" + content-type "~1.0.4" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.10.3" + raw-body "2.5.1" + type-is "~1.6.18" + unpipe "1.0.0" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.2, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserslist@^4.14.5: + version "4.20.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.3.tgz#eb7572f49ec430e054f56d52ff0ebe9be915f8bf" + integrity sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg== + dependencies: + caniuse-lite "^1.0.30001332" + electron-to-chromium "^1.4.118" + escalade "^3.1.1" + node-releases "^2.0.3" + picocolors "^1.0.0" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001332: + version "1.0.30001341" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001341.tgz#59590c8ffa8b5939cf4161f00827b8873ad72498" + integrity sha512-2SodVrFFtvGENGCv0ChVJIDQ0KPaS1cg7/qtfMaICgeMolDdo/Z2OD32F0Aq9yl6F4YFwGPBS5AaPqNYiW4PoA== + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chokidar@3.5.3, chokidar@^3.5.1: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chrome-trace-event@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" + integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colorette@^2.0.14: + version "2.0.16" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" + integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== + +commander@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +connect@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" + integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== + dependencies: + debug "2.6.9" + finalhandler "1.1.2" + parseurl "~1.3.3" + utils-merge "1.0.1" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +cookie@~0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + +cors@~2.8.5: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +custom-event@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" + integrity sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU= + +date-format@^4.0.14: + version "4.0.14" + resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400" + integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg== + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@4.3.4, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +di@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" + integrity sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw= + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +dom-serialize@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b" + integrity sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs= + dependencies: + custom-event "~1.0.0" + ent "~2.2.0" + extend "^3.0.0" + void-elements "^2.0.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +electron-to-chromium@^1.4.118: + version "1.4.137" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.137.tgz#186180a45617283f1c012284458510cd99d6787f" + integrity sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +engine.io-parser@~5.0.3: + version "5.0.6" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.6.tgz#7811244af173e157295dec9b2718dfe42a64ef45" + integrity sha512-tjuoZDMAdEhVnSFleYPCtdL2GXwVTGtNjoeJd9IhIG3C1xs9uwxqRNEu5WpnDZCaozwVlK/nuQhpodhXSIMaxw== + +engine.io@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.4.0.tgz#de27f79ecb58301171aea7956f3f6f4fa578490a" + integrity sha512-OgxY1c/RuCSeO/rTr8DIFXx76IzUUft86R7/P7MMbbkuzeqJoTNw2lmeD91IyGz41QYleIIjWeMJGgug043sfQ== + dependencies: + "@types/cookie" "^0.4.1" + "@types/cors" "^2.8.12" + "@types/node" ">=10.0.0" + accepts "~1.3.4" + base64id "2.0.0" + cookie "~0.4.1" + cors "~2.8.5" + debug "~4.3.1" + engine.io-parser "~5.0.3" + ws "~8.11.0" + +enhanced-resolve@^5.13.0: + version "5.15.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" + integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + +ent@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= + +envinfo@^7.7.3: + version "7.8.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" + integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== + +es-module-lexer@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.0.tgz#6be9c9e0b4543a60cd166ff6f8b4e9dae0b0c16f" + integrity sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA== + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-scope@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +eventemitter3@^4.0.0: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +events@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + +extend@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fastest-levenshtein@^1.0.12: + version "1.0.12" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz#9990f7d3a88cc5a9ffd1f1745745251700d497e2" + integrity sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +flatted@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" + integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== + +follow-redirects@^1.0.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.0.tgz#06441868281c86d0dda4ad8bdaead2d02dca89d4" + integrity sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ== + +format-util@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/format-util/-/format-util-1.0.5.tgz#1ffb450c8a03e7bccffe40643180918cc297d271" + integrity sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg== + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-to-regexp@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" + integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== + +glob@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.3, glob@^7.1.7: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + +graceful-fs@^4.2.10: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbols@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +http-proxy@^1.18.1: + version "1.18.1" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.1.tgz#401541f0534884bbf95260334e72f88ee3976549" + integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== + dependencies: + eventemitter3 "^4.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +import-local@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" + integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + dependencies: + pkg-dir "^4.2.0" + resolve-cwd "^3.0.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +interpret@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-core-module@^2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== + dependencies: + has "^1.0.3" + +is-docker@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isbinaryfile@^4.0.8: + version "4.0.10" + resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.10.tgz#0c5b5e30c2557a2f06febd37b7322946aaee42b3" + integrity sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +jest-worker@^27.4.5: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" + integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json-parse-even-better-errors@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +karma-chrome-launcher@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-3.2.0.tgz#eb9c95024f2d6dfbb3748d3415ac9b381906b9a9" + integrity sha512-rE9RkUPI7I9mAxByQWkGJFXfFD6lE4gC5nPuZdobf/QdTEJI6EU4yIay/cfU/xV4ZxlM5JiTv7zWYgA64NpS5Q== + dependencies: + which "^1.2.1" + +karma-firefox-launcher@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/karma-firefox-launcher/-/karma-firefox-launcher-2.1.2.tgz#9a38cc783c579a50f3ed2a82b7386186385cfc2d" + integrity sha512-VV9xDQU1QIboTrjtGVD4NCfzIH7n01ZXqy/qpBhnOeGVOkG5JYPEm8kuSd7psHE6WouZaQ9Ool92g8LFweSNMA== + dependencies: + is-wsl "^2.2.0" + which "^2.0.1" + +karma-mocha@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/karma-mocha/-/karma-mocha-2.0.1.tgz#4b0254a18dfee71bdbe6188d9a6861bf86b0cd7d" + integrity sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ== + dependencies: + minimist "^1.2.3" + +karma-sourcemap-loader@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/karma-sourcemap-loader/-/karma-sourcemap-loader-0.4.0.tgz#b01d73f8f688f533bcc8f5d273d43458e13b5488" + integrity sha512-xCRL3/pmhAYF3I6qOrcn0uhbQevitc2DERMPH82FMnG+4WReoGcGFZb1pURf2a5apyrOHRdvD+O6K7NljqKHyA== + dependencies: + graceful-fs "^4.2.10" + +karma-webpack@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-5.0.0.tgz#2a2c7b80163fe7ffd1010f83f5507f95ef39f840" + integrity sha512-+54i/cd3/piZuP3dr54+NcFeKOPnys5QeM1IY+0SPASwrtHsliXUiCL50iW+K9WWA7RvamC4macvvQ86l3KtaA== + dependencies: + glob "^7.1.3" + minimatch "^3.0.4" + webpack-merge "^4.1.5" + +karma@6.4.2: + version "6.4.2" + resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.2.tgz#a983f874cee6f35990c4b2dcc3d274653714de8e" + integrity sha512-C6SU/53LB31BEgRg+omznBEMY4SjHU3ricV6zBcAe1EeILKkeScr+fZXtaI5WyDbkVowJxxAI6h73NcFPmXolQ== + dependencies: + "@colors/colors" "1.5.0" + body-parser "^1.19.0" + braces "^3.0.2" + chokidar "^3.5.1" + connect "^3.7.0" + di "^0.0.1" + dom-serialize "^2.2.1" + glob "^7.1.7" + graceful-fs "^4.2.6" + http-proxy "^1.18.1" + isbinaryfile "^4.0.8" + lodash "^4.17.21" + log4js "^6.4.1" + mime "^2.5.2" + minimatch "^3.0.4" + mkdirp "^0.5.5" + qjobs "^1.2.0" + range-parser "^1.2.1" + rimraf "^3.0.2" + socket.io "^4.4.1" + source-map "^0.6.1" + tmp "^0.2.1" + ua-parser-js "^0.7.30" + yargs "^16.1.1" + +kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +loader-runner@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + +lodash@^4.17.15, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +log4js@^6.4.1: + version "6.7.1" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.7.1.tgz#06e12b1ac915dd1067146ffad8215f666f7d2c51" + integrity sha512-lzbd0Eq1HRdWM2abSD7mk6YIVY0AogGJzb/z+lqzRk+8+XJP+M6L1MS5FUSc3jjGru4dbKjEMJmqlsoYYpuivQ== + dependencies: + date-format "^4.0.14" + debug "^4.3.4" + flatted "^3.2.7" + rfdc "^1.3.0" + streamroller "^3.1.3" + +long@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== + +long@^5.0.0: + version "5.2.3" + resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" + integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.27, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@^2.5.2: + version "2.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" + integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== + +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.3: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + +minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +mkdirp@^0.5.5: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mocha@10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" + integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + nanoid "3.3.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nanoid@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== + +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +neo-async@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +node-releases@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.4.tgz#f38252370c43854dc48aa431c766c6c398f40476" + integrity sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +object-assign@^4: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-inspect@^1.9.0: + version "1.12.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.1.tgz#28a661153bad7e470e4b01479ef1cb91ce511191" + integrity sha512-Y/jF6vnvEtOPGiKD1+q+X0CiUYRQtEHp89MLLUJ7TUivtH8Ugn2+3A7Rynqk7BRsAoqeOQWnFnjpDrKSxDgIGA== + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +protobufjs@6.11.3: + version "6.11.3" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.3.tgz#637a527205a35caa4f3e2a9a4a13ddffe0e7af74" + integrity sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/long" "^4.0.1" + "@types/node" ">=13.7.0" + long "^4.0.0" + +protobufjs@^7.0.0: + version "7.2.3" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.3.tgz#01af019e40d9c6133c49acbb3ff9e30f4f0f70b2" + integrity sha512-TtpvOqwB5Gdz/PQmOjgsrGH1nHjAQVCN7JG4A6r1sXRWESL5rNMAiRcBQlCAdKxZcAbstExQePYG8xof/JVRgg== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/node" ">=13.7.0" + long "^5.0.0" + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +qjobs@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.2.0.tgz#c45e9c61800bd087ef88d7e256423bdd49e5d071" + integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg== + +qs@6.10.3: + version "6.10.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e" + integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ== + dependencies: + side-channel "^1.0.4" + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +range-parser@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" + integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +rechoir@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== + dependencies: + resolve "^1.20.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve@^1.20.0: + version "1.22.4" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34" + integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +rfdc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" + integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== + +rimraf@^3.0.0, rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +schema-utils@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" + integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +schema-utils@^3.1.2: + version "3.3.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" + integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + +serialize-javascript@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" + integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== + dependencies: + randombytes "^2.1.0" + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +socket.io-adapter@~2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz#5de9477c9182fdc171cd8c8364b9a8894ec75d12" + integrity sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA== + dependencies: + ws "~8.11.0" + +socket.io-parser@~4.2.1: + version "4.2.2" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.2.tgz#1dd384019e25b7a3d374877f492ab34f2ad0d206" + integrity sha512-DJtziuKypFkMMHCm2uIshOYC7QaylbtzQwiMYDuCKy3OPkjLzu4B2vAhTlqipRHHzrI0NJeBAizTK7X+6m1jVw== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + +socket.io@^4.4.1: + version "4.6.0" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.6.0.tgz#82ebfd7652572872e10dbb19533fc7cb930d0bc3" + integrity sha512-b65bp6INPk/BMMrIgVvX12x3Q+NqlGqSlTuvKQWt0BUJ3Hyy3JangBl7fEoWZTXbOKlCqNPbQ6MbWgok/km28w== + dependencies: + accepts "~1.3.4" + base64id "~2.0.0" + debug "~4.3.2" + engine.io "~6.4.0" + socket.io-adapter "~2.5.2" + socket.io-parser "~4.2.1" + +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + +source-map-loader@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-4.0.1.tgz#72f00d05f5d1f90f80974eda781cbd7107c125f2" + integrity sha512-oqXpzDIByKONVY8g1NUPOTQhe0UTU5bWUl32GSkqK2LjJj0HmwTMVKxcUip0RgAYhY1mqgOxjbQM48a0mmeNfA== + dependencies: + abab "^2.0.6" + iconv-lite "^0.6.3" + source-map-js "^1.0.2" + +source-map-support@0.5.21, source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +streamroller@^3.1.3: + version "3.1.5" + resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-3.1.5.tgz#1263182329a45def1ffaef58d31b15d13d2ee7ff" + integrity sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw== + dependencies: + date-format "^4.0.14" + debug "^4.3.4" + fs-extra "^8.1.0" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@8.1.1, supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tapable@^2.1.1, tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + +terser-webpack-plugin@^5.3.7: + version "5.3.9" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz#832536999c51b46d468067f9e37662a3b96adfe1" + integrity sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA== + dependencies: + "@jridgewell/trace-mapping" "^0.3.17" + jest-worker "^27.4.5" + schema-utils "^3.1.1" + serialize-javascript "^6.0.1" + terser "^5.16.8" + +terser@^5.16.8: + version "5.19.3" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.19.3.tgz#359baeba615aef13db4b8c4d77a2aa0d8814aa9e" + integrity sha512-pQzJ9UJzM0IgmT4FAtYI6+VqFf0lj/to58AV0Xfgg0Up37RyPG7Al+1cepC6/BVuAxR9oNb41/DL4DEoHJvTdg== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + +tmp@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" + integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== + dependencies: + rimraf "^3.0.0" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typescript@5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" + integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== + +ua-parser-js@^0.7.30: + version "0.7.33" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.33.tgz#1d04acb4ccef9293df6f70f2c3d22f3030d8b532" + integrity sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw== + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +vary@^1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +void-elements@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" + integrity sha1-wGavtYK7HLQSjWDqkjkulNXp2+w= + +watchpack@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" + integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" + +webpack-cli@5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.0.tgz#abc4b1f44b50250f2632d8b8b536cfe2f6257891" + integrity sha512-a7KRJnCxejFoDpYTOwzm5o21ZXMaNqtRlvS183XzGDUPRdVEzJNImcQokqYZ8BNTnk9DkKiuWxw75+DCCoZ26w== + dependencies: + "@discoveryjs/json-ext" "^0.5.0" + "@webpack-cli/configtest" "^2.1.0" + "@webpack-cli/info" "^2.0.1" + "@webpack-cli/serve" "^2.0.3" + colorette "^2.0.14" + commander "^10.0.1" + cross-spawn "^7.0.3" + envinfo "^7.7.3" + fastest-levenshtein "^1.0.12" + import-local "^3.0.2" + interpret "^3.1.1" + rechoir "^0.8.0" + webpack-merge "^5.7.3" + +webpack-merge@^4.1.5: + version "4.2.2" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" + integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g== + dependencies: + lodash "^4.17.15" + +webpack-merge@^5.7.3: + version "5.8.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.8.0.tgz#2b39dbf22af87776ad744c390223731d30a68f61" + integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== + dependencies: + clone-deep "^4.0.1" + wildcard "^2.0.0" + +webpack-sources@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + +webpack@5.82.0: + version "5.82.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.82.0.tgz#3c0d074dec79401db026b4ba0fb23d6333f88e7d" + integrity sha512-iGNA2fHhnDcV1bONdUu554eZx+XeldsaeQ8T67H6KKHl2nUSwX8Zm7cmzOA46ox/X1ARxf7Bjv8wQ/HsB5fxBg== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^1.0.0" + "@webassemblyjs/ast" "^1.11.5" + "@webassemblyjs/wasm-edit" "^1.11.5" + "@webassemblyjs/wasm-parser" "^1.11.5" + acorn "^8.7.1" + acorn-import-assertions "^1.7.6" + browserslist "^4.14.5" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.13.0" + es-module-lexer "^1.2.1" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.9" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.1.2" + tapable "^2.1.1" + terser-webpack-plugin "^5.3.7" + watchpack "^2.4.0" + webpack-sources "^3.2.3" + +which@^1.2.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wildcard@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" + integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== + +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +ws@~8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@16.2.0, yargs@^16.1.1: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yargs@^17.7.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/protokt-codegen/build.gradle.kts b/protokt-codegen/build.gradle.kts index 48fa346fc..c0a05eaef 100644 --- a/protokt-codegen/build.gradle.kts +++ b/protokt-codegen/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,48 +14,46 @@ */ import com.google.protobuf.gradle.proto -import com.toasttab.protokt.gradle.CODEGEN_NAME -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import protokt.v1.gradle.CODEGEN_NAME plugins { id("protokt.jvm-conventions") id("com.google.protobuf") + alias(libs.plugins.buildConfig) application } -tasks.withType { - kotlinOptions { - languageVersion = "1.6" - apiVersion = "1.6" - } -} +defaultProtoc() enablePublishing(defaultJars = false) application { applicationName = CODEGEN_NAME - mainClass.set("com.toasttab.protokt.MainKt") + mainClass.set("protokt.v1.codegen.MainKt") } dependencies { implementation(project(":extensions:protokt-extensions-api")) implementation(project(":protokt-runtime")) implementation(project(":protokt-runtime-grpc-lite")) - implementation(project(":protokt-util")) + implementation(project(":grpc-kotlin-shim")) implementation(kotlin("reflect")) - implementation(libraries.arrow) - implementation(libraries.grpcStub) - implementation(libraries.kotlinPoet) - implementation(libraries.kotlinxCollections) - implementation(libraries.kotlinxCoroutinesCore) - implementation(libraries.protobufJava) + implementation(libs.grpc.kotlin.stub) + implementation(libs.grpc.stub) + implementation(libs.kotlinLogging) + implementation(libs.kotlinPoet) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.ktlint) + implementation(libs.ktlintRuleSetStandard) + implementation(libs.protobuf.java) + implementation(libs.slf4jSimple) testImplementation(project(":testing:testing-util")) - testImplementation(libraries.junit) - testImplementation(libraries.truth) + testImplementation(libs.junit.jupiter) + testImplementation(libs.truth) } configure { @@ -75,12 +73,6 @@ configure { } } -protobuf { - protoc { - artifact = libraries.protoc - } -} - tasks.withType { afterEvaluate { environment("PROTOC_PATH", configurations.named("protobufToolsLocator_protoc").get().singleFile) @@ -94,3 +86,15 @@ sourceSets { } } } + +buildConfig { + useKotlinOutput { topLevelConstants = true } + packageName.set("protokt.v1.gradle") + buildConfigField("String", "DEFAULT_PROTOBUF_VERSION", "\"${libs.versions.protobuf.java.get()}\"") + buildConfigField("String", "PROTOKT_VERSION", "\"$version\"") +} + +includeBuildSrc( + "protokt/v1/gradle/ProtoktExtension.kt", + "**/*.java" // don't override the protobuf-gradle-plugin; todo: fix this function to not need this +) diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/Main.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/Main.kt deleted file mode 100644 index 5fa6faaca..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/Main.kt +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt - -import com.google.protobuf.DescriptorProtos.FileDescriptorProto -import com.google.protobuf.ExtensionRegistry -import com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest -import com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse -import com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.Feature -import com.squareup.kotlinpoet.FileSpec -import com.toasttab.protokt.codegen.impl.FileBuilder -import com.toasttab.protokt.codegen.protoc.ProtocolContext -import com.toasttab.protokt.codegen.protoc.toProtocol -import com.toasttab.protokt.ext.ProtoktProto -import java.io.OutputStream -import kotlin.system.exitProcess - -fun main() = - try { - main(System.`in`.use { it.readBytes() }, System.out) - } catch (t: Throwable) { - t.printStackTrace(System.err) - exitProcess(-1) - } - -internal fun main(bytes: ByteArray, out: OutputStream) { - val req = parseCodeGeneratorRequest(bytes) - val params = parseParams(req) - val filesToGenerate = req.fileToGenerateList.toSet() - - val files = req.protoFileList - .filter { filesToGenerate.contains(it.name) } - .mapNotNull { - val fileSpec = generate(it, req.protoFileList, filesToGenerate, params) - fileSpec?.let(::response) - } - - if (files.isNotEmpty()) { - CodeGeneratorResponse.newBuilder() - .setSupportedFeatures(Feature.FEATURE_PROTO3_OPTIONAL.number.toLong()) - .addAllFile(files) - .build() - .writeTo(out) - } -} - -private fun generate( - fdp: FileDescriptorProto, - protoFileList: List, - filesToGenerate: Set, - params: Map -): FileSpec? = - FileBuilder.buildFile( - toProtocol( - ProtocolContext( - fdp, - params, - filesToGenerate, - protoFileList - ) - ) - ) - -private fun response(fileSpec: FileSpec) = - CodeGeneratorResponse.File - .newBuilder() - .setContent(fileSpec.toString().let(::tidy)) - .setName(fileSpec.name) - .build() - -// strips Explicit API mode declarations -// https://kotlinlang.org/docs/whatsnew14.html#explicit-api-mode-for-library-authors -private fun tidy(code: String) = - code - // https://stackoverflow.com/a/64970734 - .replace("public class ", "class ") - .replace("public val ", "val ") - .replace("public var ", "var ") - .replace("public fun ", "fun ") - .replace("public object ", "object ") - .replace("public companion ", "companion ") - .replace("public override ", "override ") - .replace("public sealed ", "sealed ") - .replace("public data ", "data ") - // https://github.com/square/kotlinpoet/pull/932 - .replace("): Unit {", ") {") - -private fun parseParams(req: CodeGeneratorRequest) = - if (req.parameter == null || req.parameter.isEmpty()) { - emptyMap() - } else { - req.parameter - .split(',') - .associate { it.substringBefore('=') to it.substringAfter('=', "") } - } - -private fun parseCodeGeneratorRequest(bytes: ByteArray) = - CodeGeneratorRequest.parseFrom( - bytes, - ExtensionRegistry.newInstance() - .also { ProtoktProto.registerAllExtensions(it) } - ) diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/Annotator.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/Annotator.kt deleted file mode 100644 index e991cca87..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/Annotator.kt +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.annotators - -import com.squareup.kotlinpoet.TypeSpec -import com.toasttab.protokt.codegen.annotators.MessageAnnotator.Companion.annotateMessage -import com.toasttab.protokt.codegen.annotators.ServiceAnnotator.annotateService -import com.toasttab.protokt.codegen.impl.EnumBuilder -import com.toasttab.protokt.codegen.protoc.AnnotatedType -import com.toasttab.protokt.codegen.protoc.Enum -import com.toasttab.protokt.codegen.protoc.FileDesc -import com.toasttab.protokt.codegen.protoc.Message -import com.toasttab.protokt.codegen.protoc.Protocol -import com.toasttab.protokt.codegen.protoc.ProtocolContext -import com.toasttab.protokt.codegen.protoc.Service -import com.toasttab.protokt.codegen.protoc.TopLevelType -import com.toasttab.protokt.codegen.protoc.TypeDesc -import kotlinx.collections.immutable.persistentListOf - -/** - * Annotates an unannotated AST. This effectively converts the protobuf AST to a Kotlin AST. - */ -object Annotator { - const val rootGoogleProto = "google.protobuf" - const val googleProto = ".google.protobuf" - - const val protokt = ".protokt" - const val protoktPkg = "com.toasttab.protokt" - const val protoktRtPkg = "com.toasttab.protokt.rt" - - data class Context( - val enclosing: List, - val desc: FileDesc - ) - - fun apply(protocol: Protocol) = - protocol.types.flatMap { - val annotated = - annotate( - it, - Context( - persistentListOf(), - protocol.desc - ) - ) - - annotated.map { type -> - TypeDesc(protocol.desc, AnnotatedType(it, type)) - } - } - - fun annotate(type: TopLevelType, ctx: Context): Iterable = - when (type) { - is Message -> - nonGrpc(ctx) { - nonDescriptors(ctx) { - listOf( - annotateMessage( - type, - ctx.copy(enclosing = ctx.enclosing + type) - ) - ) - } - } - is Enum -> - nonGrpc(ctx) { - nonDescriptors(ctx) { - listOf(EnumBuilder(type, ctx).build()) - } - } - is Service -> - annotateService( - type, - ctx, - ctx.desc.context.generateGrpc || - ctx.desc.context.onlyGenerateGrpc - ) - } - - private fun nonDescriptors(ctx: Context, gen: () -> Iterable) = - nonDescriptors(ctx.desc.context, emptyList(), gen) - - fun nonDescriptors(ctx: ProtocolContext, default: T, gen: () -> T) = - boolGen(!ctx.onlyGenerateDescriptors, default, gen) - - private fun nonGrpc(ctx: Context, gen: () -> Iterable) = - nonGrpc(ctx.desc.context, emptyList(), gen) - - fun nonGrpc(ctx: ProtocolContext, default: T, gen: () -> T) = - boolGen(!ctx.onlyGenerateGrpc, default, gen) - - fun grpc(ctx: ProtocolContext, default: T, gen: () -> T) = - boolGen(ctx.generateGrpc || ctx.onlyGenerateGrpc, default, gen) - - private fun boolGen(bool: Boolean, default: T, gen: () -> T) = - if (bool) { - gen() - } else { - default - } -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/AnnotatorUtils.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/AnnotatorUtils.kt deleted file mode 100644 index acb7e37a2..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/AnnotatorUtils.kt +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.annotators - -import com.squareup.kotlinpoet.TypeName -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.impl.Wrapper.interceptMapKeyTypeName -import com.toasttab.protokt.codegen.impl.Wrapper.interceptMapValueTypeName -import com.toasttab.protokt.codegen.protoc.MapEntry -import com.toasttab.protokt.codegen.protoc.Message -import com.toasttab.protokt.codegen.protoc.Oneof -import com.toasttab.protokt.codegen.protoc.StandardField - -fun resolveMapEntry(m: Message) = - MapEntry( - (m.fields[0] as StandardField), - (m.fields[1] as StandardField) - ) - -fun resolveMapEntryTypes(f: StandardField, ctx: Context) = - f.mapEntry!!.let { - MapTypeParams( - interceptMapKeyTypeName(f, it.key.typePClass.toTypeName(), ctx)!!, - interceptMapValueTypeName(f, it.value.typePClass.toTypeName(), ctx)!! - ) - } - -class MapTypeParams( - val kType: TypeName, - val vType: TypeName -) - -fun oneOfScope(f: Oneof, type: String) = - "$type.${f.name}" diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/DeserializerAnnotator.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/DeserializerAnnotator.kt deleted file mode 100644 index 1f1aa0675..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/DeserializerAnnotator.kt +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.annotators - -import arrow.core.None -import arrow.core.Option -import arrow.core.Some -import arrow.core.getOrElse -import com.squareup.kotlinpoet.CodeBlock -import com.squareup.kotlinpoet.FunSpec -import com.squareup.kotlinpoet.KModifier -import com.squareup.kotlinpoet.LambdaTypeName -import com.squareup.kotlinpoet.ParameterSpec -import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy -import com.squareup.kotlinpoet.TypeSpec -import com.squareup.kotlinpoet.asTypeName -import com.squareup.kotlinpoet.buildCodeBlock -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.annotators.PropertyAnnotator.Companion.annotateProperties -import com.toasttab.protokt.codegen.impl.Wrapper.interceptReadFn -import com.toasttab.protokt.codegen.impl.Wrapper.keyWrapped -import com.toasttab.protokt.codegen.impl.Wrapper.mapKeyConverter -import com.toasttab.protokt.codegen.impl.Wrapper.mapValueConverter -import com.toasttab.protokt.codegen.impl.Wrapper.valueWrapped -import com.toasttab.protokt.codegen.impl.Wrapper.wrapField -import com.toasttab.protokt.codegen.impl.Wrapper.wrapped -import com.toasttab.protokt.codegen.impl.Wrapper.wrapperName -import com.toasttab.protokt.codegen.impl.buildFunSpec -import com.toasttab.protokt.codegen.model.FieldType -import com.toasttab.protokt.codegen.protoc.Message -import com.toasttab.protokt.codegen.protoc.Oneof -import com.toasttab.protokt.codegen.protoc.StandardField -import com.toasttab.protokt.codegen.protoc.Tag -import com.toasttab.protokt.codegen.template.Message.Message.DeserializerInfo -import com.toasttab.protokt.codegen.template.Message.Message.DeserializerInfo.Assignment -import com.toasttab.protokt.codegen.template.Message.Message.PropertyInfo -import com.toasttab.protokt.codegen.util.capitalize -import com.toasttab.protokt.rt.KtDeserializer -import com.toasttab.protokt.rt.KtMessageDeserializer -import com.toasttab.protokt.rt.UnknownFieldSet - -internal class DeserializerAnnotator -private constructor( - private val msg: Message, - private val ctx: Context -) { - /** Creates a {@see KtDeserializer} companion object, where T is the Kotlin type for this Message. - * - * Contains functions: - * - deserialize(deserializer : KTMessageDeserializer) : T - * - invoke(dsl: ApiDsl.() -> Unit): Api - * - * */ - private fun annotateDeserializer(): TypeSpec { - val deserializerInfo = annotateDeserializerOld() - val properties = annotateProperties(msg, ctx) - - return TypeSpec.companionObjectBuilder("Deserializer") - .addSuperinterface( - KtDeserializer::class - .asTypeName() - .parameterizedBy(msg.typeName) - ) - .addSuperinterface( - LambdaTypeName.get( - null, - listOf( - ParameterSpec.unnamed( - LambdaTypeName.get( - msg.dslTypeName, - emptyList(), - Unit::class.asTypeName() - ) - ) - ), - msg.typeName - ) - ) - .addFunction( - buildFunSpec("deserialize") { - - addModifiers(KModifier.OVERRIDE) - addParameter("deserializer", KtMessageDeserializer::class) - returns(msg.typeName) - - if (properties.isNotEmpty()) { - properties.forEach { addStatement("var %L", deserializeVar(it)) } - } - addStatement("var unknownFields: %T? = null", UnknownFieldSet.Builder::class) - beginControlFlow("while (true)") - beginControlFlow("when(deserializer.readTag())") - addStatement("0 -> return·%N(%L)", msg.name, constructorLines(properties)) - deserializerInfo.forEach() { addStatement("%L -> %L = %L", it.tag, it.assignment.fieldName, it.assignment.value) } - addStatement("else -> unknownFields = (unknownFields ?: %T.Builder()).also·{it.add(deserializer.readUnknown()) }", UnknownFieldSet::class) - endControlFlow() - endControlFlow() - } - ) - .addFunction( - FunSpec.builder("invoke") - .addModifiers(KModifier.OVERRIDE) - .returns(msg.typeName) - .addParameter( - "dsl", - LambdaTypeName.get( - msg.dslTypeName, - emptyList(), - Unit::class.asTypeName() - ) - ) - .addStatement("return %T().apply(dsl).build()", msg.dslTypeName) - .build() - ) - .build() - } - - private fun constructorLines(properties: List) = - buildCodeBlock { - properties.forEach { add("%L,\n", deserializeWrapper(it)) } - add("%T.from(unknownFields)", UnknownFieldSet::class) - } - - private fun annotateDeserializerOld(): List = - msg.flattenedSortedFields().flatMap { (field, oneOf) -> - field.tagList.map { tag -> - DeserializerInfo( - field.repeated, - tag.value, - oneOf.fold( - { - deserializeString( - field, - ctx, - tag is Tag.Packed - ).let { value -> - Assignment( - field.fieldName, - value - ) - } - }, - { - oneofDes(it, field).let { value -> - Assignment( - it.fieldName, - value - ) - } - } - ) - ) - } - } - - private fun Message.flattenedSortedFields() = - fields.flatMap { - when (it) { - is StandardField -> - listOf(FlattenedField(it, None)) - is Oneof -> - it.fields.map { f -> FlattenedField(f, Some(it)) } - } - }.sortedBy { it.field.number } - - private data class FlattenedField( - val field: StandardField, - val oneof: Option - ) - - private fun oneofDes(f: Oneof, ff: StandardField) = - "${f.name}.${f.fieldTypeNames.getValue(ff.fieldName)}(${deserializeString(ff, ctx, false)})" - - companion object { - fun annotateDeserializer(msg: Message, ctx: Context) = - DeserializerAnnotator(msg, ctx).annotateDeserializer() - } -} - -fun deserializeString(f: StandardField, ctx: Context, packed: Boolean): String { - val options = deserializeOptions(f, ctx) - val read = CodeBlock.of("deserializer.%L", interceptReadFn(f, f.readFn())) - val wrappedRead = options?.let { wrapField(it.wrapName, read, it.type, it.oneof) } ?: read.toString() - return when { - f.map -> deserializeMap(f, options, read) - f.repeated -> """ - |(${f.fieldName} ?: mutableListOf()).apply·{ - | deserializer.readRepeated($packed)·{ - | add($wrappedRead) - | } - | } - """.trimMargin() - else -> wrappedRead.toString() - } -} - -fun deserializeMap(f: StandardField, options: Options?, read: CodeBlock): String { - val key = options?.keyWrap?.let { wrapField(it, CodeBlock.of("it.key"), options.type, options.oneof) } ?: CodeBlock.of("it.key") - val value = options?.valueWrap?.let { wrapField(it, CodeBlock.of("it.value"), options.valueType, options.oneof) } ?: CodeBlock.of("it.value") - return """ - |(${f.fieldName} ?: mutableMapOf()).apply·{ - | deserializer.readRepeated(false)·{ - | $read - | .let { put( - | $key, - | $value - | ) } - | } - | } - """.trimMargin() -} - -private fun StandardField.readFn() = - when (type) { - FieldType.SFIXED32 -> "readSFixed32()" - FieldType.SFIXED64 -> "readSFixed64()" - FieldType.SINT32 -> "readSInt32()" - FieldType.SINT64 -> "readSInt64()" - FieldType.UINT32 -> "readUInt32()" - FieldType.UINT64 -> "readUInt64()" - // by default for DOUBLE we get readDouble, for BOOL we get readBool(), etc. - else -> "read${type.name.lowercase().capitalize()}(${readFnBuilder(type)})" - } - -private fun StandardField.readFnBuilder(type: FieldType) = - when (type) { - FieldType.ENUM, FieldType.MESSAGE -> typePClass.qualifiedName - else -> "" - } - -private fun deserializeOptions(f: StandardField, ctx: Context) = - if (f.wrapped || f.keyWrapped || f.valueWrapped) { - Options( - wrapName = wrapperName(f, ctx).map { it.toString() }.getOrElse { "" }, - keyWrap = mapKeyConverter(f, ctx)?.toString(), - valueWrap = mapValueConverter(f, ctx)?.toString(), - valueType = f.mapEntry?.value?.type, - type = f.type, - oneof = true - ) - } else { - null - } - -class Options( - val wrapName: String, - val keyWrap: String?, - val valueWrap: String?, - val valueType: FieldType?, - val type: FieldType, - val oneof: Boolean -) diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/MapEntryAnnotator.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/MapEntryAnnotator.kt deleted file mode 100644 index ed69f9eb1..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/MapEntryAnnotator.kt +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.annotators - -import com.squareup.kotlinpoet.FunSpec -import com.squareup.kotlinpoet.KModifier -import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy -import com.squareup.kotlinpoet.PropertySpec -import com.squareup.kotlinpoet.TypeSpec -import com.squareup.kotlinpoet.asTypeName -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.annotators.MessageSizeAnnotator.Companion.annotateMessageSizeOld -import com.toasttab.protokt.codegen.annotators.PropertyAnnotator.Companion.annotateProperties -import com.toasttab.protokt.codegen.annotators.SerializerAnnotator.Companion.annotateSerializerOld -import com.toasttab.protokt.codegen.impl.bindIndent -import com.toasttab.protokt.codegen.impl.bindSpaces -import com.toasttab.protokt.codegen.impl.constructorProperty -import com.toasttab.protokt.codegen.model.FieldType -import com.toasttab.protokt.codegen.protoc.Message -import com.toasttab.protokt.codegen.protoc.StandardField -import com.toasttab.protokt.codegen.template.Message.Message.PropertyInfo -import com.toasttab.protokt.rt.KtDeserializer -import com.toasttab.protokt.rt.KtMessage -import com.toasttab.protokt.rt.KtMessageDeserializer -import com.toasttab.protokt.rt.KtMessageSerializer -import com.toasttab.protokt.codegen.template.Message.Message as MessageTemplate - -class MapEntryAnnotator -private constructor( - private val msg: Message, - private val ctx: Context -) { - private val entryInfo = resolveMapEntry(msg) - private val keyPropertyType = entryInfo.key.typePClass.toTypeName() - private val valPropertyType = entryInfo.value.typePClass.toTypeName() - - private fun annotateMapEntry() = - TypeSpec.classBuilder(msg.name).apply { - addModifiers(KModifier.PRIVATE) - addSuperinterface(KtMessage::class) - addProperty(constructorProperty("key", keyPropertyType)) - addProperty(constructorProperty("value", valPropertyType)) - addConstructor() - addMessageSize() - addSerialize() - addDeserializer() - }.build() - - private fun TypeSpec.Builder.addConstructor() { - primaryConstructor( - FunSpec.constructorBuilder() - .addParameter("key", keyPropertyType) - .addParameter("value", valPropertyType) - .build() - ) - } - - private fun TypeSpec.Builder.addMessageSize() { - addProperty( - PropertySpec.builder(KtMessage::messageSize.name, Int::class) - .addModifiers(KModifier.OVERRIDE) - .getter( - FunSpec.getterBuilder() - .addCode("return sizeof(key, value)".bindSpaces()) - .build() - ) - .build() - ) - } - - private fun TypeSpec.Builder.addSerialize() { - val serInfo = annotateSerializerOld(msg, ctx) - addFunction( - FunSpec.builder("serialize") - .addModifiers(KModifier.OVERRIDE) - .addParameter("serializer", KtMessageSerializer::class) - .addCode(serInfo.consequent(entryInfo.key)) - .addCode("\n") - .addCode(serInfo.consequent(entryInfo.value)) - .build() - ) - } - - private fun TypeSpec.Builder.addDeserializer() { - val propInfo = annotateProperties(msg, ctx) - val sizeInfo = annotateMessageSizeOld(msg, ctx) - - addType( - TypeSpec.companionObjectBuilder("Deserializer") - .addSuperinterface( - KtDeserializer::class - .asTypeName() - .parameterizedBy(msg.typeName) - ) - .addFunction( - FunSpec.builder("sizeof") - .addParameter("key", keyPropertyType) - .addParameter("value", valPropertyType) - .addCode( - "return ${sizeInfo.consequent(entryInfo.key)} + ${sizeInfo.consequent(entryInfo.value)}".bindSpaces() - ) - .build() - ) - .addFunction( - FunSpec.builder("deserialize") - .addModifiers(KModifier.OVERRIDE) - .addParameter("deserializer", KtMessageDeserializer::class) - .returns(msg.typeName) - .addCode( - """ - var key${deserializeVar(entryInfo.key, propInfo.single(entryInfo.key))} - var value${deserializeVar(entryInfo.value, propInfo.single(entryInfo.value))} - - while (true) { - when (deserializer.readTag()) { - 0 -> return ${msg.name}(key, value${orDefault(entryInfo.value)}) - ${entryInfo.key.tag.value} -> key = ${deserializeString(entryInfo.key, ctx, false)} - ${entryInfo.value.tag.value} -> value = ${deserializeString(entryInfo.value, ctx, false)} - } - } - """.bindIndent() - ) - .build() - ) - .build() - ) - } - - private fun deserializeVar(f: StandardField, p: PropertyInfo) = - if (f.type == FieldType.MESSAGE) { - ": " + deserializeType(p) - } else { - "" - } + " = " + deserializeValue(p) - - private fun orDefault(f: StandardField) = - if (f.type == FieldType.MESSAGE) { - " ?: $valPropertyType {}" - } else { - "" - } - - private fun List.single( - f: StandardField - ) = - single { it.name == f.fieldName } - - private fun List.consequent( - f: StandardField - ) = - single(f).conditionals.single().consequent - - companion object { - fun annotateMapEntry(msg: Message, ctx: Context) = - MapEntryAnnotator(msg, ctx).annotateMapEntry() - } -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/MessageAnnotator.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/MessageAnnotator.kt deleted file mode 100644 index a7bc12005..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/MessageAnnotator.kt +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.annotators - -import com.squareup.kotlinpoet.AnnotationSpec -import com.squareup.kotlinpoet.CodeBlock -import com.squareup.kotlinpoet.FunSpec -import com.squareup.kotlinpoet.KModifier -import com.squareup.kotlinpoet.ParameterSpec -import com.squareup.kotlinpoet.PropertySpec -import com.squareup.kotlinpoet.TypeSpec -import com.squareup.kotlinpoet.asTypeName -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.annotators.Annotator.annotate -import com.toasttab.protokt.codegen.annotators.DeserializerAnnotator.Companion.annotateDeserializer -import com.toasttab.protokt.codegen.annotators.MapEntryAnnotator.Companion.annotateMapEntry -import com.toasttab.protokt.codegen.annotators.MessageDocumentationAnnotator.annotateMessageDocumentation -import com.toasttab.protokt.codegen.annotators.MessageSizeAnnotator.Companion.annotateMessageSizeNew -import com.toasttab.protokt.codegen.annotators.OneofAnnotator.Companion.annotateOneofs -import com.toasttab.protokt.codegen.annotators.PropertyAnnotator.Companion.annotateProperties -import com.toasttab.protokt.codegen.annotators.SerializerAnnotator.Companion.annotateSerializerNew -import com.toasttab.protokt.codegen.impl.Deprecation.addDeprecationSuppression -import com.toasttab.protokt.codegen.impl.Deprecation.enclosingDeprecation -import com.toasttab.protokt.codegen.impl.Deprecation.handleDeprecation -import com.toasttab.protokt.codegen.impl.Deprecation.hasDeprecation -import com.toasttab.protokt.codegen.impl.Implements.handleSuperInterface -import com.toasttab.protokt.codegen.impl.bindMargin -import com.toasttab.protokt.codegen.impl.bindSpaces -import com.toasttab.protokt.codegen.impl.embed -import com.toasttab.protokt.codegen.protoc.Message -import com.toasttab.protokt.codegen.template.Message.Message.PropertyInfo -import com.toasttab.protokt.rt.KtGeneratedMessage -import com.toasttab.protokt.rt.KtMessage -import com.toasttab.protokt.rt.UnknownFieldSet - -class MessageAnnotator -private constructor( - private val msg: Message, - private val ctx: Context -) { - fun annotateMessage() = - if (msg.mapEntry) { - annotateMapEntry(msg, ctx) - } else { - val properties = annotateProperties(msg, ctx) - - TypeSpec.classBuilder(msg.name) - .handleAnnotations() - .apply { - val doc = annotateMessageDocumentation(ctx) - if (doc.isNotEmpty()) { - addKdoc(formatDoc(doc)) - } - } - .apply { - if (suppressDeprecation()) { - addDeprecationSuppression() - } - } - .handleConstructor(properties) - .addTypes(annotateOneofs(msg, ctx)) - .handleMessageSize() - .addFunction(annotateMessageSizeNew(msg, ctx)) - .addFunction(annotateSerializerNew(msg, ctx)) - .handleEquals(properties) - .handleHashCode(properties) - .handleToString(properties) - .handleDsl(msg, properties) - .addType(annotateDeserializer(msg, ctx)) - .addTypes(msg.nestedTypes.flatMap { annotate(it, ctx) }) - .build() - } - - private fun TypeSpec.Builder.handleAnnotations() = apply { - addAnnotation( - AnnotationSpec.builder(KtGeneratedMessage::class) - .addMember(msg.fullProtobufTypeName.embed()) - .build() - ) - handleDeprecation(msg.options.default.deprecated, msg.options.protokt.deprecationMessage) - } - - private fun TypeSpec.Builder.handleConstructor( - properties: List - ) = apply { - addSuperinterface(KtMessage::class) - addProperties( - properties.map { - PropertySpec.builder(it.name.removePrefix("`").removeSuffix("`"), it.propertyType) - .initializer(it.name) - .apply { - if (it.overrides) { - addModifiers(KModifier.OVERRIDE) - } - } - .apply { - if (it.documentation.isNotEmpty()) { - addKdoc(formatDoc(it.documentation)) - } - } - .handleDeprecation(it.deprecation) - .build() - } - ) - addProperty( - PropertySpec.builder("unknownFields", UnknownFieldSet::class) - .initializer("unknownFields") - .build() - ) - primaryConstructor( - FunSpec.constructorBuilder() - .addModifiers(KModifier.PRIVATE) - .addParameters( - properties.map { - ParameterSpec(it.name.removePrefix("`").removeSuffix("`"), it.propertyType) - } - ) - .addParameter( - ParameterSpec.builder("unknownFields", UnknownFieldSet::class) - .defaultValue("UnknownFieldSet.empty()") - .build() - ) - .build() - ) - handleSuperInterface(msg, ctx) - } - - private fun TypeSpec.Builder.handleMessageSize() = - addProperty( - PropertySpec.builder("messageSize", Int::class) - .addModifiers(KModifier.OVERRIDE) - .delegate("lazy { messageSize() }") - .build() - ) - - private fun TypeSpec.Builder.handleEquals( - properties: List - ) = - addFunction( - FunSpec.builder(Any::equals.name) - .returns(Boolean::class) - .addModifiers(KModifier.OVERRIDE) - .addParameter("other", Any::class.asTypeName().copy(nullable = true)) - .addCode( - if (properties.isEmpty()) { - "return other is ${msg.name} && other.unknownFields == unknownFields".bindSpaces() - } else { - """ - |return other is ${msg.name} && - |${equalsLines(properties)} - | other.unknownFields == unknownFields - """.bindMargin() - } - ) - .build() - ) - - private fun equalsLines(properties: List) = - properties.joinToString("\n") { " other.${it.name} == ${it.name} &&" } - - private fun TypeSpec.Builder.handleHashCode( - properties: List - ) = - addFunction( - FunSpec.builder(Any::hashCode.name) - .returns(Int::class) - .addModifiers(KModifier.OVERRIDE) - .addCode( - if (properties.isEmpty()) { - "return unknownFields.hashCode()" - } else { - """ - |var result = unknownFields.hashCode() - |${hashCodeLines(properties)} - |return result - """.bindMargin() - } - ) - .build() - ) - - private fun hashCodeLines(properties: List) = - properties.joinToString("\n") { - "result = 31 * result + ${it.name}.hashCode()" - }.bindSpaces() - - private fun TypeSpec.Builder.handleToString( - properties: List - ) = - addFunction( - FunSpec.builder(Any::toString.name) - .returns(String::class) - .addModifiers(KModifier.OVERRIDE) - .addCode( - if (properties.isEmpty()) { - "return \"${msg.name}(${unknownFieldsToString(prefix = "")})\"" - } else { - """ - |return "${msg.name}(" + - |${toStringLines(properties)} - | "${unknownFieldsToString(prefix = ", ")})" - """.bindMargin() - } - ) - .build() - ) - - private fun unknownFieldsToString(prefix: String) = - "\${if (unknownFields.isEmpty()) \"\" else \"${prefix}unknownFields=\$unknownFields\"}" - - private fun toStringLines(properties: List) = - properties.joinToString(separator = ", \" +\n", postfix = "\" +") { - " \"${it.name}=\$${it.name}" - }.bindSpaces() - - private fun suppressDeprecation() = - msg.hasDeprecation && (!enclosingDeprecation(ctx) || messageIsTopLevel()) - - private fun messageIsTopLevel() = - msg.typeName.simpleNames.size == 1 - - companion object { - fun annotateMessage(msg: Message, ctx: Context) = - MessageAnnotator(msg, ctx).annotateMessage() - } -} - -fun formatDoc(lines: List) = - CodeBlock.of( - "%L", // escape the entire comment block - lines.joinToString(" ") { - if (it.isBlank()) { - "\n\n" - } else { - it.removePrefix(" ") - } - } - ) diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/MessageDocumentationAnnotator.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/MessageDocumentationAnnotator.kt deleted file mode 100644 index 69794329f..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/MessageDocumentationAnnotator.kt +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.annotators - -import arrow.core.Option -import arrow.core.firstOrNone -import com.google.protobuf.DescriptorProtos.DescriptorProto.NESTED_TYPE_FIELD_NUMBER -import com.google.protobuf.DescriptorProtos.FileDescriptorProto.MESSAGE_TYPE_FIELD_NUMBER -import com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.impl.emptyToNone - -internal object MessageDocumentationAnnotator { - fun annotateMessageDocumentation(ctx: Context) = - baseLocation(ctx).cleanDocumentation() - - fun baseLocation(ctx: Context, extraPath: List = emptyList()) = - ctx.desc.sourceCodeInfo.locationList - .filter { it.pathList == basePath(ctx) + extraPath } - .firstOrNone() - - private fun basePath(ctx: Context): List { - val path = mutableListOf() - - ctx.enclosing.forEachIndexed { idx, it -> - if (idx == 0) { - path.add(MESSAGE_TYPE_FIELD_NUMBER) - path.add(it.index) - } else { - path.add(NESTED_TYPE_FIELD_NUMBER) - path.add(it.index) - } - } - - return path - } -} - -internal fun Option.cleanDocumentation(): List = - fold( - { emptyList() }, - { - it.leadingComments - .emptyToNone() - .fold( - { emptyList() }, - { s -> - s.substringBeforeLast("\n") - .split("\n") - .map { line -> - // Escape possibly accidentally nested comments - // - // Will not render correctly inside backticks: - // https://youtrack.jetbrains.com/issue/KT-28979 - line - .replace("/*", "/*") - .replace("*/", "*/") - } - } - ) - } - ) diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/MessageSizeAnnotator.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/MessageSizeAnnotator.kt deleted file mode 100644 index de0a8fe0f..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/MessageSizeAnnotator.kt +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.annotators - -import com.squareup.kotlinpoet.CodeBlock -import com.squareup.kotlinpoet.FunSpec -import com.squareup.kotlinpoet.KModifier -import com.squareup.kotlinpoet.buildCodeBlock -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.impl.Nullability.hasNonNullOption -import com.toasttab.protokt.codegen.impl.Wrapper.interceptFieldSizeof -import com.toasttab.protokt.codegen.impl.Wrapper.interceptSizeof -import com.toasttab.protokt.codegen.impl.Wrapper.interceptValueAccess -import com.toasttab.protokt.codegen.impl.Wrapper.mapKeyConverter -import com.toasttab.protokt.codegen.impl.Wrapper.mapValueConverter -import com.toasttab.protokt.codegen.impl.namedCodeBlock -import com.toasttab.protokt.codegen.impl.runtimeFunction -import com.toasttab.protokt.codegen.protoc.Message -import com.toasttab.protokt.codegen.protoc.Oneof -import com.toasttab.protokt.codegen.protoc.StandardField -import com.toasttab.protokt.codegen.template.ConditionalParams -import com.toasttab.protokt.codegen.template.Message.Message.SizeofInfo -import com.toasttab.protokt.rt.Tag -import com.toasttab.protokt.rt.UInt32 - -internal class MessageSizeAnnotator -private constructor( - private val msg: Message, - private val ctx: Context -) { - private val resultVarName = - run { - var name = "result" - while (msg.fields.any { it.fieldName == name }) { - name += "_" - } - name - } - - private fun annotateMessageSizeNew(): FunSpec { - val fieldSizes = - msg.fields.map { - when (it) { - is StandardField -> { - val addFieldSize = - sizeOfString(it) - .prepend("$resultVarName +=") - .append("\n") // TODO: Not sure why this is needed - .toCodeBlock() - if (it.hasNonNullOption) { - addFieldSize - } else { - buildCodeBlock { - beginControlFlow("if·${it.nonDefault(ctx)}") - add(addFieldSize) - endControlFlow() - } - } - } - is Oneof -> { - buildCodeBlock { - if (it.hasNonNullOption) { - add("$resultVarName += ") - } - beginControlFlow("when·(${it.fieldName})") - conditionals(it).forEach(::add) - endControlFlow() - } - } - } - } - - return FunSpec.builder("messageSize") - .addModifiers(KModifier.PRIVATE) - .returns(Int::class) - .addCode( - if (fieldSizes.isEmpty()) { - CodeBlock.of("return·unknownFields.size()") - } else { - buildCodeBlock { - addStatement("var·$resultVarName·=·0") - fieldSizes.forEach { fs -> add(fs) } - addStatement("$resultVarName·+=·unknownFields.size()") - addStatement("return·$resultVarName") - } - } - ) - .build() - } - - private fun conditionals(f: Oneof) = - f.fields - .sortedBy { it.number } - .map { - buildCodeBlock { - beginControlFlow("is·${condition(f, it, msg.name)}·->") - add(oneofSizeOfString(f, it)) - endControlFlow() - } - } - .let { - if (f.hasNonNullOption) { - it - } else { - it + buildCodeBlock { - addStatement("null·-> Unit") - } - } - } - - private fun condition(f: Oneof, ff: StandardField, type: String) = - "${oneOfScope(f, type)}.${f.fieldTypeNames.getValue(ff.fieldName)}" - - private fun oneofSizeOfString(o: Oneof, f: StandardField) = - sizeOfString( - f, - interceptSizeof( - f, - "${o.fieldName}.${f.fieldName}", - ctx - ) - ).let { s -> - if (!o.hasNonNullOption) { - s.prepend("$resultVarName·+=") - } else { - s - } - }.toCodeBlock() - - private fun annotateMessageSizeOld(): List { - return msg.fields.map { - when (it) { - is StandardField -> - SizeofInfo( - it.fieldName, - listOf( - ConditionalParams( - it.nonDefault(ctx), - sizeOfString(it).toCodeBlock() - ) - ) - ) - is Oneof -> - SizeofInfo( - it.fieldName, - oneofSize(it, msg.name) - ) - } - } - } - - private class CodeBlockComponents( - val formatWithNamedArgs: String, - val args: Map = emptyMap() - ) { - fun prepend( - formatWithNamedArgs: String, - args: Map = emptyMap() - ): CodeBlockComponents { - val intersect = args.keys.intersect(this.args.keys) - check(intersect.isEmpty()) { - "duplicate keys in args: $intersect" - } - return CodeBlockComponents( - formatWithNamedArgs + " " + this.formatWithNamedArgs, - args + this.args - ) - } - - fun append( - formatWithNamedArgs: String, - args: Map = emptyMap() - ): CodeBlockComponents { - val intersect = args.keys.intersect(this.args.keys) - check(intersect.isEmpty()) { - "duplicate keys in args: $intersect" - } - return CodeBlockComponents( - this.formatWithNamedArgs + " " + formatWithNamedArgs, - args + this.args - ) - } - - fun toCodeBlock() = - namedCodeBlock(formatWithNamedArgs, args) - } - - private fun sizeOfString( - f: StandardField, - oneOfFieldAccess: String? = null - ): CodeBlockComponents { - val name = - oneOfFieldAccess - ?: if (f.repeated) { - f.fieldName - } else { - interceptSizeof(f, f.fieldName, ctx) - } - - return when { - f.map -> sizeOfMap(f, name) - f.repeated && f.packed -> { - CodeBlockComponents( - "%sizeof:M(%tag:T(${f.number})) + " + - "$name.sumOf·{ %sizeof:M(${f.box("it")}) }.let·{ it + %sizeof:M(%uInt32:T(it)) }", - mapOf( - "sizeof" to runtimeFunction("sizeof"), - "tag" to Tag::class, - "uInt32" to UInt32::class - ) - ) - } - f.repeated -> { - CodeBlockComponents( - "(%sizeof:M(%tag:T(${f.number})) * $name.size) + " + - "$name.sumOf·{ %sizeof:M(%boxedAccess:L) }", - mapOf( - "sizeof" to runtimeFunction("sizeof"), - "tag" to Tag::class, - "boxedAccess" to f.box(interceptValueAccess(f, ctx, "it")) - ) - ) - } - else -> { - CodeBlockComponents( - "%sizeof:M(%tag:T(${f.number})) + %access:L", - mapOf( - "sizeof" to runtimeFunction("sizeof"), - "tag" to Tag::class, - "access" to interceptFieldSizeof(f, name, ctx) - ) - ) - } - } - } - - private fun sizeOfMap(f: StandardField, name: String): CodeBlockComponents { - val key = mapKeyConverter(f, ctx)?.let { "$it.unwrap(k)" } ?: "k" - val value = mapValueConverter(f, ctx)?.let { CodeBlock.of("$it.unwrap(v)") }?.let { f.maybeConstructBytes(it) } ?: "v" - return CodeBlockComponents( - "%arg1:M($name, %arg2:T(${f.number})) { k, v -> %arg3:T.sizeof(%arg4:L, %arg5:L)}", - mapOf( - "arg1" to runtimeFunction("sizeofMap"), - "arg2" to Tag::class, - "arg3" to f.typePClass.toTypeName(), - "arg4" to key, - "arg5" to value - ) - ) - } - - private fun oneofSize(f: Oneof, type: String) = - f.fields.map { - ConditionalParams( - CodeBlock.of("%L.%L", oneOfScope(f, type), f.fieldTypeNames.getValue(it.fieldName)), - sizeOfString( - it, - interceptSizeof( - it, - "${f.fieldName}.${it.fieldName}", - ctx - ) - ).toCodeBlock() - ) - } - - companion object { - fun annotateMessageSizeOld(msg: Message, ctx: Context) = - MessageSizeAnnotator(msg, ctx).annotateMessageSizeOld() - - fun annotateMessageSizeNew(msg: Message, ctx: Context) = - MessageSizeAnnotator(msg, ctx).annotateMessageSizeNew() - } -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/OneofAnnotator.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/OneofAnnotator.kt deleted file mode 100644 index dfb3d1527..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/OneofAnnotator.kt +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.annotators - -import arrow.core.None -import com.squareup.kotlinpoet.AnnotationSpec -import com.squareup.kotlinpoet.FunSpec -import com.squareup.kotlinpoet.KModifier -import com.squareup.kotlinpoet.PropertySpec -import com.squareup.kotlinpoet.TypeName -import com.squareup.kotlinpoet.TypeSpec -import com.squareup.kotlinpoet.TypeVariableName -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.annotators.PropertyDocumentationAnnotator.Companion.annotatePropertyDocumentation -import com.toasttab.protokt.codegen.impl.Deprecation -import com.toasttab.protokt.codegen.impl.Deprecation.renderOptions -import com.toasttab.protokt.codegen.impl.Implements.handleSuperInterface -import com.toasttab.protokt.codegen.impl.Wrapper.interceptTypeName -import com.toasttab.protokt.codegen.impl.Wrapper.wrapped -import com.toasttab.protokt.codegen.impl.emptyToNone -import com.toasttab.protokt.codegen.model.PClass -import com.toasttab.protokt.codegen.model.PPackage -import com.toasttab.protokt.codegen.protoc.Message -import com.toasttab.protokt.codegen.protoc.Oneof -import com.toasttab.protokt.codegen.protoc.StandardField - -internal class OneofAnnotator -private constructor( - private val msg: Message, - private val ctx: Context -) { - private fun annotateOneofs(): List { - - return msg.fields.filterIsInstance().map { - val options = options(it) - val types = it.fields.associate { ff -> oneof(it, ff) } - - TypeSpec.classBuilder(it.name) - .addModifiers(KModifier.SEALED) - .handleSuperInterface(options) - .addTypes( - types.map { (k, v) -> - TypeSpec.classBuilder(k) - .addModifiers(KModifier.DATA) - .superclass(it.typeName) - .apply { - if (v.documentation.isNotEmpty()) { - addKdoc(formatDoc(v.documentation)) - } - } - .apply { - if (v.deprecation != null) { - addAnnotation( - AnnotationSpec.builder(Deprecated::class) - .apply { - if (v.deprecation.message != null) { - addMember("\"" + v.deprecation.message + "\"") - } else { - addMember("\"deprecated in proto\"") - } - } - .build() - ) - } - } - .addProperty( - PropertySpec.builder(v.fieldName, v.type) - .initializer(v.fieldName) - .build() - ) - .primaryConstructor( - FunSpec.constructorBuilder() - .addParameter(v.fieldName, v.type) - .build() - ) - .handleSuperInterface(options, v) - .build() - } - ) - .build() - } - } - - private fun oneof(f: Oneof, ff: StandardField) = - f.fieldTypeNames.getValue(ff.fieldName).let { oneofFieldTypeName -> - oneofFieldTypeName to info(ff, oneofFieldTypeName) - } - - private fun info( - f: StandardField, - oneofFieldTypeName: String - ) = - Info( - fieldName = f.fieldName, - type = - if (f.wrapped) { - interceptTypeName( - f, - TypeVariableName( - inferOneofFieldTypeName( - ctx, - f, - oneofFieldTypeName - ) - ), - ctx - ) - } else { - f.typePClass.toTypeName() - }, - documentation = annotatePropertyDocumentation(f, ctx), - deprecation = deprecation(f) - ) - - private fun deprecation(f: StandardField) = - if (f.options.default.deprecated) { - renderOptions( - f.options.protokt.deprecationMessage - ) - } else { - null - } - - private fun inferOneofFieldTypeName( - ctx: Context, - f: StandardField, - oneofFieldTypeName: String - ): String { - val pClass = f.typePClass - - // Cannot strip qualifiers for field type in a different package - // See testing/runtime-tests/src/main/proto/com/toasttab/protokt/testing/rt/oneof/oneof_packages.proto - val requiresQualifiedTypeName = pClass.ppackage != ctx.desc.kotlinPackage - - return if (requiresQualifiedTypeName) { - pClass.renderName(ctx.desc.kotlinPackage) - } else { - // See testing/runtime-tests/src/main/proto/com/toasttab/protokt/testing/rt/oneof/oneof_exercises.proto - if (oneofFieldTypeName == pClass.simpleName) { - if (oneofFieldTypeName == pClass.nestedName) { - pClass.qualifiedName - } else { - pClass.nestedName - } - } else { - pClass.simpleName - } - } - } - - private fun options(oneof: Oneof) = - Options( - oneof.options.protokt.implements.emptyToNone().fold( - { null }, - { possiblyQualify(it) } - ) - ) - - private fun possiblyQualify(implements: String) = - if (PClass.fromName(implements).ppackage == PPackage.DEFAULT) { - if (implements in namespaceNeighbors()) { - PClass(implements, ctx.desc.kotlinPackage, None).qualifiedName - } else { - implements - } - } else { - implements - } - - private fun namespaceNeighbors() = - msg.fields.filterIsInstance().map { it.name } - - companion object { - fun annotateOneofs(msg: Message, ctx: Context) = - OneofAnnotator(msg, ctx).annotateOneofs() - } - - internal class Info( - val fieldName: String, - val type: TypeName, - val documentation: List, - val deprecation: Deprecation.RenderOptions? - ) - - internal class Options( - val implements: String? - ) -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/PropertyAnnotator.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/PropertyAnnotator.kt deleted file mode 100644 index a64f004d5..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/PropertyAnnotator.kt +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.annotators - -import com.squareup.kotlinpoet.CodeBlock -import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy -import com.squareup.kotlinpoet.TypeName -import com.squareup.kotlinpoet.asTypeName -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.annotators.PropertyDocumentationAnnotator.Companion.annotatePropertyDocumentation -import com.toasttab.protokt.codegen.impl.Deprecation.renderOptions -import com.toasttab.protokt.codegen.impl.Implements.overrides -import com.toasttab.protokt.codegen.impl.Nullability.deserializeType -import com.toasttab.protokt.codegen.impl.Nullability.dslPropertyType -import com.toasttab.protokt.codegen.impl.Nullability.hasNonNullOption -import com.toasttab.protokt.codegen.impl.Nullability.nullable -import com.toasttab.protokt.codegen.impl.Nullability.propertyType -import com.toasttab.protokt.codegen.impl.Wrapper.interceptDefaultValue -import com.toasttab.protokt.codegen.impl.Wrapper.interceptTypeName -import com.toasttab.protokt.codegen.impl.Wrapper.wrapped -import com.toasttab.protokt.codegen.impl.defaultValue -import com.toasttab.protokt.codegen.model.FieldType -import com.toasttab.protokt.codegen.protoc.Field -import com.toasttab.protokt.codegen.protoc.Message -import com.toasttab.protokt.codegen.protoc.Oneof -import com.toasttab.protokt.codegen.protoc.StandardField -import com.toasttab.protokt.codegen.template.Message.Message.PropertyInfo - -internal class PropertyAnnotator -private constructor( - private val msg: Message, - private val ctx: Context -) { - private fun annotateProperties(): List { - return msg.fields.map { - val documentation = annotatePropertyDocumentation(it, ctx) - - when (it) { - is StandardField -> { - annotateStandard(it).let { type -> - PropertyInfo( - name = it.fieldName, - pClass = it.typePClass, - propertyType = propertyType(it, type), - deserializeType = deserializeType(it, type), - dslPropertyType = dslPropertyType(it, type), - defaultValue = it.defaultValue(ctx), - fieldType = it.type.toString(), - repeated = it.repeated, - map = it.map, - nullable = it.nullable || it.optional, - nonNullOption = it.hasNonNullOption, - overrides = it.overrides(ctx, msg), - wrapped = it.wrapped, - documentation = documentation, - deprecation = deprecation(it) - ) - } - } - is Oneof -> - PropertyInfo( - name = it.fieldName, - propertyType = propertyType(it), - deserializeType = it.typeName.copy(nullable = true), - dslPropertyType = it.typeName.copy(nullable = true), - defaultValue = it.defaultValue(ctx), - oneof = true, - nullable = it.nullable, - nonNullOption = it.hasNonNullOption, - documentation = documentation - ) - } - } - } - - private fun deprecation(f: StandardField) = - if (f.options.default.deprecated) { - renderOptions( - f.options.protokt.deprecationMessage - ) - } else { - null - } - - private fun annotateStandard(f: StandardField): TypeName = - if (f.map) { - val mapTypes = resolveMapEntryTypes(f, ctx) - Map::class - .asTypeName() - .parameterizedBy( - mapTypes.kType, - mapTypes.vType - ) - } else { - val parameter = - interceptTypeName( - f, - f.typePClass.toTypeName(), - ctx - ) - - if (f.repeated) { - List::class.asTypeName().parameterizedBy(parameter) - } else { - parameter - } - } - - private fun Field.defaultValue(ctx: Context) = - when (this) { - is StandardField -> - interceptDefaultValue( - this, - when { - this.map -> CodeBlock.of("emptyMap()") - this.repeated -> CodeBlock.of("emptyList()") - type == FieldType.MESSAGE -> CodeBlock.of("null") - type == FieldType.ENUM -> CodeBlock.of("%T.from(0)", this.typePClass.toTypeName()) - this.nullable -> CodeBlock.of("null") - else -> this.type.defaultValue - }, - ctx - ) - is Oneof -> CodeBlock.of("null") - } - - private fun name(f: StandardField) = when (f.type) { - FieldType.ENUM -> f.typePClass.qualifiedName - else -> "" - } - - companion object { - fun annotateProperties(msg: Message, ctx: Context) = - PropertyAnnotator(msg, ctx).annotateProperties() - } -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/Renderers.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/Renderers.kt deleted file mode 100644 index dc4b18905..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/Renderers.kt +++ /dev/null @@ -1,56 +0,0 @@ -package com.toasttab.protokt.codegen.annotators - -import com.squareup.kotlinpoet.ClassName -import com.squareup.kotlinpoet.CodeBlock -import com.squareup.kotlinpoet.ParameterizedTypeName -import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy -import com.toasttab.protokt.codegen.impl.runtimeFunction -import com.toasttab.protokt.codegen.template.Message.Message.PropertyInfo - -fun deserializeType(p: PropertyInfo) = - if (p.repeated || p.map) { - p.deserializeType as ParameterizedTypeName - ClassName(p.deserializeType.rawType.packageName, "Mutable" + p.deserializeType.rawType.simpleName) - .parameterizedBy(p.deserializeType.typeArguments) - .copy(nullable = true) - } else { - p.deserializeType - } - -fun deserializeValue(p: PropertyInfo) = - if (p.repeated || p.wrapped || p.nullable || p.fieldType == "MESSAGE") { - CodeBlock.of("null") - } else { - p.defaultValue - } - -fun deserializeVar(p: PropertyInfo) = - if (p.fieldType == "MESSAGE" || p.repeated || p.oneof || p.nullable || p.wrapped) { - CodeBlock.of("%L : %T = %L", p.name, deserializeType(p), deserializeValue(p)) - } else { - CodeBlock.of("%L = %L", p.name, deserializeValue(p)) - } - -fun deserializeWrapper(p: PropertyInfo) = - if (p.nonNullOption) { - CodeBlock.builder() - .add("requireNotNull(%L)·{", p.name) - .add("%S", "${p.name} specified nonnull with (protokt.${if (p.oneof) "oneof" else "property" }).non_null but was null") - .add("}") - .build() - } else { - if (p.map) { - CodeBlock.of("%M(${p.name})", runtimeFunction("finishMap")) - } else if (p.repeated) { - CodeBlock.of("%M(${p.name})", runtimeFunction("finishList")) - } else { - CodeBlock.of( - p.name + - if (p.wrapped && !p.nullable) { - " ?: ${p.defaultValue}" - } else { - "" - } - ) - } - } diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/SerializerAnnotator.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/SerializerAnnotator.kt deleted file mode 100644 index ea8ba1d7d..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/SerializerAnnotator.kt +++ /dev/null @@ -1,197 +0,0 @@ - /* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.annotators - -import arrow.core.None -import arrow.core.Option -import arrow.core.Some -import com.squareup.kotlinpoet.CodeBlock -import com.squareup.kotlinpoet.FunSpec -import com.squareup.kotlinpoet.KModifier -import com.squareup.kotlinpoet.buildCodeBlock -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.impl.Nullability.hasNonNullOption -import com.toasttab.protokt.codegen.impl.Wrapper.interceptValueAccess -import com.toasttab.protokt.codegen.impl.runtimeFunction -import com.toasttab.protokt.codegen.protoc.Message -import com.toasttab.protokt.codegen.protoc.Oneof -import com.toasttab.protokt.codegen.protoc.StandardField -import com.toasttab.protokt.codegen.template.ConditionalParams -import com.toasttab.protokt.codegen.template.Message.Message.SerializerInfo -import com.toasttab.protokt.rt.KtMessageSerializer -import com.toasttab.protokt.rt.Tag -import com.toasttab.protokt.rt.UInt32 - -internal class SerializerAnnotator -private constructor( - private val msg: Message, - private val ctx: Context -) { - private fun annotateSerializerNew(): FunSpec { - val fieldSerializations = - msg.fields.map { - when (it) { - is StandardField -> - if (!it.hasNonNullOption) { - buildCodeBlock { - beginControlFlow("if ${it.nonDefault(ctx)}") - add(serializeString(it)) - endControlFlow() - } - } else { - serializeString(it) - } - is Oneof -> - buildCodeBlock { - beginControlFlow("when (${it.fieldName})") - conditionals(it).forEach(::add) - endControlFlow() - } - } - } - - return FunSpec.builder("serialize") - .addModifiers(KModifier.OVERRIDE) - .addParameter("serializer", KtMessageSerializer::class) - .apply { - fieldSerializations.forEach(::addCode) - addCode("serializer.writeUnknown(unknownFields)") - } - .build() - } - - private fun conditionals(f: Oneof): List = - f.fields - .sortedBy { it.number } - .map { - buildCodeBlock { - beginControlFlow("is ${oneOfSer(f, it, msg.name).condition} ->") - add(serializeString(it, Some(f.fieldName))) - endControlFlow() - } - }.let { - if (f.hasNonNullOption) { - it - } else { - it + buildCodeBlock { - addStatement("null·-> Unit") - } - } - } - - private fun annotateSerializerOld(): List { - return msg.fields.map { - when (it) { - is StandardField -> - SerializerInfo( - it.fieldName, - listOf( - ConditionalParams( - it.nonDefault(ctx), - serializeString(it) - ) - ) - ) - is Oneof -> - SerializerInfo( - it.fieldName, - it.fields - .sortedBy { f -> f.number } - .map { f -> oneOfSer(it, f, msg.name) } - ) - } - } - } - - private fun serializeString( - f: StandardField, - t: Option = None - ): CodeBlock { - val fieldAccess = - t.fold( - { - interceptValueAccess( - f, - ctx, - if (f.repeated) { "it" } else { f.fieldName } - ) - }, - { - interceptValueAccess( - f, - ctx, - "$it.${f.fieldName}" - ) - } - ) - - val map = mutableMapOf( - "tag" to Tag::class, - "uInt32" to UInt32::class, - "name" to f.fieldName, - "sizeof" to runtimeFunction("sizeof") - ) - return when { - f.repeated && f.packed -> buildCodeBlock { - map += "boxed" to f.box("it") - addNamed( - "serializer.write(%tag:T(${f.tag.value}))" + - ".write(%uInt32:T(%name:L.sumOf{%sizeof:M(%boxed:L)}))\n", - map - ) - addNamed("%name:L.forEach·{ serializer.write(%boxed:L) }\n", map) - } - f.map -> buildCodeBlock { - map += "boxed" to f.boxMap(ctx) - addNamed( - "%name:L.entries.forEach·{ " + - "serializer.write(%tag:T(${f.tag.value}))" + - ".write(%boxed:L) }\n", - map - ) - } - f.repeated -> buildCodeBlock { - map += "boxed" to f.box(fieldAccess) - addNamed( - "%name:L.forEach·{ " + - "serializer.write(%tag:T(${f.tag.value})).write(%boxed:L) }\n", - map - ) - } - - else -> buildCodeBlock { - map += "boxed" to f.box(fieldAccess) - addNamed("serializer.write(%tag:T(${f.tag.value})).write(%boxed:L)\n", map) - } - } - } - - private fun oneOfSer(f: Oneof, ff: StandardField, type: String) = - ConditionalParams( - CodeBlock.of( - "%L.%L", oneOfScope(f, type), f.fieldTypeNames.getValue(ff.fieldName) - ), - serializeString(ff, Some(f.fieldName)) - ) - - companion object { - fun annotateSerializerOld(msg: Message, ctx: Context) = - SerializerAnnotator(msg, ctx).annotateSerializerOld() - - fun annotateSerializerNew(msg: Message, ctx: Context) = - SerializerAnnotator(msg, ctx).annotateSerializerNew() - } -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/ServiceAnnotator.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/ServiceAnnotator.kt deleted file mode 100644 index f42174051..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/ServiceAnnotator.kt +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 2020 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.annotators - -import com.squareup.kotlinpoet.ClassName -import com.squareup.kotlinpoet.CodeBlock -import com.squareup.kotlinpoet.FunSpec -import com.squareup.kotlinpoet.KModifier -import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy -import com.squareup.kotlinpoet.PropertySpec -import com.squareup.kotlinpoet.TypeSpec -import com.squareup.kotlinpoet.asTypeName -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.impl.bindMargin -import com.toasttab.protokt.codegen.model.PClass -import com.toasttab.protokt.codegen.model.possiblyQualify -import com.toasttab.protokt.codegen.protoc.Method -import com.toasttab.protokt.codegen.protoc.Service -import com.toasttab.protokt.codegen.util.decapitalize -import com.toasttab.protokt.grpc.SchemaDescriptor -import io.grpc.MethodDescriptor -import io.grpc.ServiceDescriptor - -internal object ServiceAnnotator { - fun annotateService(s: Service, ctx: Context, generateService: Boolean): List { - val service = - if (generateService) { - TypeSpec.objectBuilder(s.name + "Grpc") - .addProperty( - PropertySpec.builder("SERVICE_NAME", String::class) - .addModifiers(KModifier.CONST) - .initializer("\"" + renderQualifiedName(s, ctx) + "\"") - .build() - ) - .addProperty( - PropertySpec.builder("_serviceDescriptor", ServiceDescriptor::class) - .addModifiers(KModifier.PRIVATE) - .delegate( - """ - |lazy { - | ServiceDescriptor.newBuilder(SERVICE_NAME) - |${serviceLines(s, ctx)} - |} - """.bindMargin() - ) - .build() - ) - .addProperties( - s.methods.map { - PropertySpec.builder( - "_" + it.name.decapitalize() + "Method", - MethodDescriptor::class - .asTypeName() - .parameterizedBy( - it.inputType.toTypeName(), - it.outputType.toTypeName() - ) - ) - .addModifiers(KModifier.PRIVATE) - .delegate( - """ - |lazy { - | MethodDescriptor.newBuilder<${it.inputType.renderName(ctx.desc.kotlinPackage)}, ${it.outputType.renderName(ctx.desc.kotlinPackage)}>() - | .setType(MethodDescriptor.MethodType.${methodType(it)}) - | .setFullMethodName(MethodDescriptor.generateFullMethodName(SERVICE_NAME, "${it.name}")) - | .setRequestMarshaller(${it.qualifiedRequestMarshaller(ctx)}) - | .setResponseMarshaller(${it.qualifiedResponseMarshaller(ctx)}) - | .build() - |} - """.bindMargin() - ) - .build() - } - ) - .addFunction( - FunSpec.builder("getServiceDescriptor") - .addCode("return _serviceDescriptor") - .addAnnotation(JvmStatic::class) - .build() - ) - .addFunctions( - s.methods.map { - FunSpec.builder("get" + it.name + "Method") - .addCode("return _" + it.name.decapitalize() + "Method") - .addAnnotation(JvmStatic::class) - .build() - } - ) - .build() - } else { - null - } - - val descriptor = - if (!ctx.desc.context.onlyGenerateGrpc && !ctx.desc.context.lite) { - TypeSpec.objectBuilder(s.name) - .addProperty( - PropertySpec.builder("descriptor", ClassName("com.toasttab.protokt", "ServiceDescriptor")) - .delegate( - """ - |lazy { - | ${ctx.desc.context.fileDescriptorObjectName}.descriptor.services[${s.index}] - |} - """.bindMargin() - ) - .build() - ) - .build() - } else { - null - } - - return listOfNotNull(service, descriptor) - } - - private fun Method.qualifiedRequestMarshaller(ctx: Context) = - options.protokt.requestMarshaller.takeIf { it.isNotEmpty() } - ?.let { - PClass.fromName(options.protokt.requestMarshaller) - .possiblyQualify(ctx.desc.kotlinPackage) - .qualifiedName - } ?: "com.toasttab.protokt.grpc.KtMarshaller(${inputType.renderName(ctx.desc.kotlinPackage)})" - - private fun Method.qualifiedResponseMarshaller(ctx: Context) = - options.protokt.responseMarshaller.takeIf { it.isNotEmpty() } - ?.let { - PClass.fromName(options.protokt.responseMarshaller) - .possiblyQualify(ctx.desc.kotlinPackage) - .qualifiedName - } ?: "com.toasttab.protokt.grpc.KtMarshaller(${outputType.renderName(ctx.desc.kotlinPackage)})" - - private fun serviceLines(s: Service, ctx: Context): CodeBlock { - return CodeBlock.of( - s.methods.joinToString("\n") { - " .addMethod(_${it.name.decapitalize()}Method)" - } + "\n .setSchemaDescriptor(%T(className = %S, fileDescriptorClassName = %S))" + - "\n .build()", - SchemaDescriptor::class, - "${ctx.desc.kotlinPackage}.${s.name}", - "${ctx.desc.kotlinPackage}.${ctx.desc.context.fileDescriptorObjectName}" - ) - } - - private fun renderQualifiedName(s: Service, ctx: Context) = - if (ctx.desc.kotlinPackage.default) { - s.name - } else { - "${ctx.desc.protoPackage}.${s.name}" - } - - private fun methodType(m: Method) = when { - m.clientStreaming && m.serverStreaming -> "BIDI_STREAMING" - m.clientStreaming -> "CLIENT_STREAMING" - m.serverStreaming -> "SERVER_STREAMING" - else -> "UNARY" - } -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/StandardFieldExt.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/StandardFieldExt.kt deleted file mode 100644 index 02b4c7f86..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/StandardFieldExt.kt +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.annotators - -import com.squareup.kotlinpoet.CodeBlock -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.impl.Wrapper.interceptValueAccess -import com.toasttab.protokt.codegen.impl.Wrapper.mapKeyConverter -import com.toasttab.protokt.codegen.impl.Wrapper.mapValueConverter -import com.toasttab.protokt.codegen.impl.defaultValue -import com.toasttab.protokt.codegen.model.FieldType -import com.toasttab.protokt.codegen.protoc.StandardField -import com.toasttab.protokt.codegen.protoc.Tag -import com.toasttab.protokt.rt.Bytes - -internal val StandardField.tag - get() = - if (repeated && packed) { - Tag.Packed(number) - } else { - Tag.Unpacked(number, type.wireType) - } - -internal val StandardField.tagList - get() = - tag.let { - if (repeated) { - // For repeated fields, catch the other (packed or non-packed) - // possiblity. - keepIfDifferent( - it, - if (packed) { - Tag.Unpacked(number, type.wireType) - } else { - Tag.Packed(number) - } - ) - } else { - listOf(it) - } - }.sorted() - -private fun keepIfDifferent(tag: Tag, other: Tag) = - if (tag.value == other.value) { - listOf(tag) - } else { - listOf(tag, other) - } - -internal val StandardField.deprecated - get() = options.default.deprecated - -internal fun StandardField.nonDefault(ctx: Context): CodeBlock { - val name = interceptValueAccess(this, ctx) - return when { - this.optional -> CodeBlock.of("(${this.fieldName} != null)") - this.repeated -> CodeBlock.of("(${this.fieldName}.isNotEmpty())") - type == FieldType.MESSAGE -> CodeBlock.of("(${this.fieldName} != null)") - type == FieldType.BYTES || type == FieldType.STRING -> CodeBlock.of("($name.isNotEmpty())") - type == FieldType.ENUM -> CodeBlock.of("($name.value != 0)") - type == FieldType.BOOL -> CodeBlock.of("($name)") - type.scalar -> CodeBlock.of("($name != %L)", type.defaultValue) - else -> throw IllegalStateException("Field doesn't have good nondefault check: $this, ${this.type}") - } -} - -internal fun StandardField.boxMap(ctx: Context): CodeBlock { - if (type != FieldType.MESSAGE) { - return CodeBlock.of("") - } - val keyParam = mapKeyConverter(this, ctx)?.let { CodeBlock.of("$it.unwrap(it.key)") } ?: CodeBlock.of("it.key") - val valParam = mapValueConverter(this, ctx)?.let { - maybeConstructBytes(CodeBlock.of("$it.unwrap(it.value)")) - } ?: CodeBlock.of("it.value") - return CodeBlock.of("%T(%L, %L)", typePClass.toTypeName(), keyParam, valParam) -} - -internal fun StandardField.maybeConstructBytes(arg: CodeBlock) = when (mapEntry!!.value.type) { - FieldType.BYTES -> CodeBlock.of("%T($arg)", Bytes::class) - else -> arg -} - -internal fun StandardField.box(s: String) = if (type.boxed) CodeBlock.of("%T($s)", type.boxer) else CodeBlock.of(s) diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/ClassLookup.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/ClassLookup.kt deleted file mode 100644 index b31516418..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/ClassLookup.kt +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.impl - -import arrow.core.Either -import arrow.core.None -import arrow.core.Some -import arrow.core.getOrHandle -import arrow.core.memoize -import com.toasttab.protokt.codegen.model.PClass -import com.toasttab.protokt.codegen.protoc.ProtocolContext -import com.toasttab.protokt.ext.Converter -import java.io.File -import java.net.URLClassLoader - -internal object ClassLookup { - val getClass = - { pClass: PClass, ctx: ProtocolContext -> - fun loadClass(pClass: PClass) = - Either.catchingAll { - getClassLoader(ctx.classpath) - .loadClass(pClass.qualifiedName) - .kotlin - } - - loadClass(pClass).getOrHandle { - throw Exception("Class not found: ${pClass.qualifiedName}") - } - }.memoize() - - // Either.catch does not catch LinkageError, of which NoClassDefFoundError - // is a subtype. We want to catch those here. - private fun Either.Companion.catchingAll( - f: () -> R - ): Either = - try { - Either.Right(f()) - } catch (t: Throwable) { - Either.Left(t) - } - - val getClassLoader = { classpath: List -> - val current = Thread.currentThread().contextClassLoader - - when { - classpath.isEmpty() -> current - else -> - URLClassLoader( - classpath - .map { File(it).toURI().toURL() } - .toTypedArray(), - current - ) - } - }.memoize() - - val getClassOrNone = - { pClass: PClass, ctx: ProtocolContext -> - try { - Some(getClass(pClass, ctx)) - } catch (_: Exception) { - None - } - }.memoize() - - val converters = { classpath: List -> - val loader = getClassLoader(classpath) - loader.getResources("META-INF/services/${Converter::class.qualifiedName}").toList().flatMap { url -> - url.openStream().bufferedReader().readLines().map { - it.substringBefore("#").trim() - }.filter { it.isNotEmpty() }.map { - loader.loadClass(it).kotlin.objectInstance as Converter<*, *> - } - } - }.memoize() -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/DefaultValues.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/DefaultValues.kt deleted file mode 100644 index 53cfa0fae..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/DefaultValues.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.toasttab.protokt.codegen.impl - -import com.squareup.kotlinpoet.CodeBlock -import com.toasttab.protokt.codegen.model.FieldType - -val FieldType.defaultValue: CodeBlock - get() = when (this) { - FieldType.MESSAGE -> CodeBlock.of("null") - FieldType.ENUM -> throw IllegalAccessException( - "|An Enum type doesn't have a standard default value. " + - "If you have `enum Foo`, you can use Foo.from(0)" - ) - FieldType.BOOL -> CodeBlock.of("false") - FieldType.FIXED32, FieldType.INT32, FieldType.SFIXED32, FieldType.SINT32, FieldType.UINT32 -> CodeBlock.of("0") - FieldType.FIXED64, FieldType.INT64, FieldType.SFIXED64, FieldType.SINT64, FieldType.UINT64 -> CodeBlock.of("0L") - FieldType.FLOAT -> CodeBlock.of("0.0F") - FieldType.DOUBLE -> CodeBlock.of("0.0") - FieldType.BYTES -> CodeBlock.of("%T.empty()", com.toasttab.protokt.rt.Bytes::class) - FieldType.STRING -> CodeBlock.of("\"\"") - } diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/FileBuilder.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/FileBuilder.kt deleted file mode 100644 index 95628c416..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/FileBuilder.kt +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.impl - -import com.squareup.kotlinpoet.FileSpec -import com.toasttab.protokt.codegen.annotators.Annotator -import com.toasttab.protokt.codegen.descriptor.FileDescriptorResolver -import com.toasttab.protokt.codegen.protoc.Protocol -import com.toasttab.protokt.codegen.protoc.fileName - -object FileBuilder { - fun buildFile( - protocol: Protocol - ): FileSpec? { - val descs = Annotator.apply(protocol) - if (descs.isEmpty() && protocol.desc.context.lite) { - return null - } - - val builder = - FileSpec.builder( - protocol.desc.kotlinPackage.toString(), - fileName(protocol.desc.kotlinPackage, protocol.desc.name) - ).apply { - // https://github.com/square/kotlinpoet/pull/533 - addFileComment( - """ - Generated by protokt version ${protocol.desc.context.version}. Do not modify. - Source: ${protocol.desc.name} - """.trimIndent() - ) - indent(" ") - } - - descs.forEach { - builder.addType(it.type.typeSpec) - } - - val fileDescriptorInfo = FileDescriptorResolver.resolveFileDescriptor(protocol) - - if (fileDescriptorInfo != null) { - builder.addType(fileDescriptorInfo.fdp) - fileDescriptorInfo.properties.forEach(builder::addProperty) - } - - return builder.build() - } -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/PackageResolution.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/PackageResolution.kt deleted file mode 100644 index a5e468d1d..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/PackageResolution.kt +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2020 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.impl - -import arrow.core.None -import arrow.core.getOrElse -import arrow.core.orElse -import com.google.protobuf.DescriptorProtos.DescriptorProto -import com.google.protobuf.DescriptorProtos.EnumDescriptorProto -import com.google.protobuf.DescriptorProtos.FileDescriptorProto -import com.toasttab.protokt.codegen.annotators.Annotator.protoktPkg -import com.toasttab.protokt.codegen.annotators.Annotator.rootGoogleProto -import com.toasttab.protokt.codegen.model.PPackage -import com.toasttab.protokt.codegen.protoc.FileOptions -import com.toasttab.protokt.codegen.protoc.fileOptions - -fun packagesByTypeName( - protoFileList: List, - respectJavaPackage: Boolean -): Map { - val map = mutableMapOf() - - protoFileList.forEach { fdp -> - fdp.messageTypeList.forEach { dp -> - gatherPackages(fdp, dp, emptyList(), respectJavaPackage, map) - } - - fdp.enumTypeList.forEach { edp -> - map[edp.foreignFullyQualifiedName(fdp)] = - resolvePackage(fdp, respectJavaPackage) - } - } - - return map -} - -private fun EnumDescriptorProto.foreignFullyQualifiedName( - fdp: FileDescriptorProto -) = - "${fdp.fullQualification}.$name" - -private fun gatherPackages( - fdp: FileDescriptorProto, - dp: DescriptorProto, - parents: List, - respectJavaPackage: Boolean, - map: MutableMap -) { - val enclosingName = - parents.joinToString(".") { it.name }.emptyOrFollowWithDot() - - map[dp.fullyQualifiedName(fdp, enclosingName)] = - resolvePackage(fdp, respectJavaPackage) - - dp.nestedTypeList.forEach { - gatherPackages(fdp, it, parents + dp, respectJavaPackage, map) - } - - dp.enumTypeList.forEach { edp -> - map[edp.nestedFullyQualifiedName(fdp, enclosingName, dp)] = - resolvePackage(fdp, respectJavaPackage) - } -} - -private fun DescriptorProto.fullyQualifiedName( - fdp: FileDescriptorProto, - enclosingName: String -) = - "${fdp.fullQualification}.$enclosingName$name" - -private fun EnumDescriptorProto.nestedFullyQualifiedName( - fdp: FileDescriptorProto, - enclosingName: String, - dp: DescriptorProto -) = - "${fdp.fullQualification}.$enclosingName${dp.name}.$name" - -private val FileDescriptorProto.fullQualification - get() = `package`.emptyOrPrecedeWithDot() - -internal fun resolvePackage( - fdp: FileDescriptorProto, - respectJavaPackage: Boolean -) = - resolvePackage(fdp.fileOptions, fdp.`package`, respectJavaPackage) - -internal fun resolvePackage( - fileOptions: FileOptions, - protoPackage: String, - respectJavaPackage: Boolean -) = - fileOptions.protokt.kotlinPackage.emptyToNone() - .orElse { javaPackage(respectJavaPackage, fileOptions) } - .orElse { protoPackage.emptyToNone() } - .map { overrideComGoogleProtobuf(it) } - .getOrElse { PPackage.DEFAULT } - -private fun javaPackage(respectJavaPackage: Boolean, fileOptions: FileOptions) = - if (respectJavaPackage) { - fileOptions.default.javaPackage.emptyToNone() - } else { - None - } - -private fun overrideComGoogleProtobuf(type: String) = - PPackage.fromString(overrideGoogleProtobuf(type, "com.$rootGoogleProto")) - -internal fun overrideGoogleProtobuf(type: String, prefix: String) = - if (type.startsWith(prefix)) { - protoktPkg + type.removePrefix(prefix) - } else { - type - } diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/StringExt.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/StringExt.kt deleted file mode 100644 index 03eb7986a..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/StringExt.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.toasttab.protokt.codegen.impl - -import arrow.core.None -import arrow.core.Some - -internal fun String.emptyToNone() = when { - isEmpty() -> None - else -> Some(this) -} - -internal fun String.emptyOrPrecedeWithDot() = - emptyToNone().fold({ "" }, { ".$it" }) - -internal fun String.emptyOrFollowWithDot() = - emptyToNone().fold({ "" }, { "$it." }) diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/WellKnownTypes.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/WellKnownTypes.kt deleted file mode 100644 index 3d56380b8..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/WellKnownTypes.kt +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2020 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.impl - -import arrow.core.None -import arrow.core.Option -import arrow.core.orElse -import com.toasttab.protokt.codegen.annotators.Annotator.googleProto -import com.toasttab.protokt.codegen.protoc.StandardField - -object WellKnownTypes { - val StandardField.wrapWithWellKnownInterception - get() = - options.protokt.wrap.emptyToNone() - .orElse { - if (protoTypeName.startsWith("$googleProto.")) { - classNameForWellKnownType(protoTypeName.removePrefix("$googleProto.")) - } else { - None - } - } - fun classNameForWellKnownType(type: String) = Option.fromNullable( - when (type) { - "DoubleValue" -> "java.lang.Double" - "FloatValue" -> "java.lang.Float" - "Int64Value" -> "java.lang.Long" - "UInt64Value" -> "java.lang.Long" - "Int32Value" -> "java.lang.Integer" - "UInt32Value" -> "java.lang.Integer" - "BoolValue" -> "java.lang.Boolean" - "StringValue" -> "java.lang.String" - "BytesValue" -> "com.toasttab.protokt.rt.Bytes" - else -> null - } - ) -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/Wrapper.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/Wrapper.kt deleted file mode 100644 index a55323e3f..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/Wrapper.kt +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.impl - -import arrow.core.None -import arrow.core.Option -import arrow.core.Some -import arrow.core.memoize -import com.squareup.kotlinpoet.CodeBlock -import com.squareup.kotlinpoet.TypeName -import com.squareup.kotlinpoet.asTypeName -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.annotators.box -import com.toasttab.protokt.codegen.impl.ClassLookup.converters -import com.toasttab.protokt.codegen.impl.ClassLookup.getClass -import com.toasttab.protokt.codegen.impl.WellKnownTypes.wrapWithWellKnownInterception -import com.toasttab.protokt.codegen.model.FieldType -import com.toasttab.protokt.codegen.model.PClass -import com.toasttab.protokt.codegen.model.PPackage -import com.toasttab.protokt.codegen.model.possiblyQualify -import com.toasttab.protokt.codegen.protoc.ProtocolContext -import com.toasttab.protokt.codegen.protoc.StandardField -import com.toasttab.protokt.ext.OptimizedSizeofConverter -import com.toasttab.protokt.rt.BytesSlice -import kotlin.reflect.KClass -import kotlin.reflect.full.hasAnnotation - -object Wrapper { - val StandardField.wrapped - get() = wrapWithWellKnownInterception.isDefined() - - val StandardField.keyWrap - get() = options.protokt.keyWrap.emptyToNone() - - val StandardField.keyWrapped - get() = keyWrap.isDefined() - - val StandardField.valueWrap - get() = options.protokt.valueWrap.emptyToNone() - - val StandardField.valueWrapped - get() = valueWrap.isDefined() - - fun StandardField.foldWrap( - wrap: Option, - pkg: PPackage, - ctx: ProtocolContext, - ifEmpty: () -> R, - ifSome: (wrapper: KClass<*>, wrapped: KClass<*>) -> R - ) = - wrap.fold( - ifEmpty, - { - ifSome( - getClass(PClass.fromName(it).possiblyQualify(pkg), ctx), - protoTypeName.emptyToNone().fold( - { - // Protobuf primitives have no typeName - requireNotNull(type.kotlinRepresentation) { - "no kotlin representation for type of " + - "$fieldName: $type" - } - }, - { getClass(typePClass, ctx) } - ) - ) - } - ) - - private fun StandardField.foldFieldWrap( - ctx: Context, - ifEmpty: () -> R, - ifSome: (wrapper: KClass<*>, wrapped: KClass<*>) -> R - ) = - foldWrap( - wrapWithWellKnownInterception, - ctx.desc.kotlinPackage, - ctx.desc.context, - ifEmpty, - ifSome - ) - - fun interceptSizeof( - f: StandardField, - s: String, - ctx: Context - ) = - f.foldFieldWrap( - ctx, - { interceptValueAccess(f, ctx, s) }, - { wrapper, wrapped -> - if ( - converter(wrapper, wrapped, ctx) is - OptimizedSizeofConverter<*, *> - ) { - s - } else { - interceptValueAccess(f, ctx, s) - } - } - ) - - fun interceptFieldSizeof( - f: StandardField, - s: String, - ctx: Context - ) = - f.foldFieldWrap( - ctx, - { - CodeBlock.of("%M(%L)", runtimeFunction("sizeof"), f.box(s)) - }, - { wrapper, wrapped -> - if ( - converter(wrapper, wrapped, ctx) is - OptimizedSizeofConverter<*, *> - ) { - CodeBlock.of("%T.sizeof(%L)", unqualifiedConverterWrap(wrapper, wrapped, ctx), s) - } else { - CodeBlock.of("%M(%L)", runtimeFunction("sizeof"), f.box(s)) - } - } - ) - - fun interceptValueAccess( - f: StandardField, - ctx: Context, - s: String = f.fieldName - ) = - f.foldFieldWrap( - ctx, - { s }, - { wrapper, wrapped -> - "${unqualifiedConverterWrap(wrapper, wrapped, ctx)}.unwrap($s)" - } - ) - - private fun interceptDeserializedValue( - f: StandardField, - s: CodeBlock, - ctx: Context - ) = - wrapperName(f, ctx).fold( - { s }, - { - wrapField( - wrapName = it.toString(), - arg = s, - f = f.type, - oneof = true - ) - } - ) - - fun wrapField(wrapName: String, arg: CodeBlock, f: FieldType?, oneof: Boolean) = when { - f == FieldType.BYTES -> CodeBlock.of("%L.wrap(%L.bytes)", wrapName, arg) - f == FieldType.MESSAGE && !oneof -> CodeBlock.of("%L.wrap(%L!!)", wrapName, arg) - else -> CodeBlock.of("%L.wrap(%L)", wrapName, arg) - } - - fun wrapperName(f: StandardField, ctx: Context) = - f.foldFieldWrap( - ctx, - { None }, - { wrapper, wrapped -> - Some(unqualifiedConverterWrap(wrapper, wrapped, ctx)) - } - ) - - fun interceptReadFn(f: StandardField, s: String) = - f.foldBytesSlice( - { s }, - { "readBytesSlice()" } - ) - - fun interceptDefaultValue(f: StandardField, s: CodeBlock, ctx: Context) = - f.foldBytesSlice( - { - f.foldSingularMessage( - { interceptDeserializedValue(f, s, ctx) }, - { s } - ) - }, - { CodeBlock.of("%T.empty()", BytesSlice::class) } - ) - - fun interceptTypeName(f: StandardField, t: TypeName, ctx: Context): TypeName = - f.foldBytesSlice( - { f.foldFieldWrap(ctx, { t }, unqualifiedWrap()) }, - { BytesSlice::class.asTypeName() } - ) - - private fun StandardField.foldBytesSlice( - ifNotSlice: () -> R, - ifSlice: () -> R - ) = - if (options.protokt.bytesSlice) { - ifSlice() - } else { - ifNotSlice() - } - - private fun StandardField.foldSingularMessage( - ifNotSingularMessage: () -> R, - ifSingularMessage: () -> R - ) = - if (type == FieldType.MESSAGE && !repeated) { - ifSingularMessage() - } else { - ifNotSingularMessage() - } - - private fun StandardField.foldKeyWrap( - ctx: Context, - ifEmpty: () -> R, - ifSome: (wrapper: KClass<*>, wrapped: KClass<*>) -> R - ) = - mapEntry?.key - ?.foldWrap(keyWrap, ctx.desc.kotlinPackage, ctx.desc.context, ifEmpty, ifSome) - - fun interceptMapKeyTypeName(f: StandardField, t: TypeName, ctx: Context) = - f.foldKeyWrap(ctx, { t }, unqualifiedWrap()) - - fun mapKeyConverter(f: StandardField, ctx: Context) = - f.foldKeyWrap( - ctx, - { null }, - { wrapper, wrapped -> unqualifiedWrap(converter(wrapper, wrapped, ctx)::class) } - ) - - private fun StandardField.foldValueWrap( - ctx: Context, - ifEmpty: () -> R, - ifSome: (wrapper: KClass<*>, wrapped: KClass<*>) -> R - ) = - mapEntry?.value - ?.foldWrap(valueWrap, ctx.desc.kotlinPackage, ctx.desc.context, ifEmpty, ifSome) - - fun interceptMapValueTypeName(f: StandardField, t: TypeName, ctx: Context) = - f.foldValueWrap(ctx, { t }, unqualifiedWrap()) - - fun mapValueConverter(f: StandardField, ctx: Context) = - f.foldValueWrap( - ctx, - { null }, - { wrapper, wrapped -> - unqualifiedConverterWrap(wrapper, wrapped, ctx) - } - ) - - private fun unqualifiedConverterWrap( - wrapper: KClass<*>, - wrapped: KClass<*>, - ctx: Context - ) = - unqualifiedWrap(converter(wrapper, wrapped, ctx)::class) - - private fun unqualifiedWrap() = - fun(wrapper: KClass<*>, _: Any) = - unqualifiedWrap(wrapper) - - private fun unqualifiedWrap(wrap: KClass<*>) = - PClass.fromClass(wrap).toTypeName() - - private fun converter(wrapper: KClass<*>, wrapped: KClass<*>, ctx: Context) = - converter(wrapper, wrapped, ctx.desc.context) - - val converter = { wrapper: KClass<*>, wrapped: KClass<*>, ctx: ProtocolContext -> - val converters = - converters(ctx.classpath) - .filter { it.wrapper == wrapper && it.wrapped == wrapped } - - require(converters.isNotEmpty()) { - "${ctx.fileName}: No converter found for wrapper type " + - "${wrapper.qualifiedName} from type ${wrapped.qualifiedName}" - } - - converters - .filterNot { it::class.hasAnnotation() } - .firstOrNull() ?: converters.first() - }.memoize() -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/FieldType.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/FieldType.kt deleted file mode 100644 index c7b47f83e..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/FieldType.kt +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2020 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.model - -import com.toasttab.protokt.rt.Bytes -import com.toasttab.protokt.rt.KtEnum -import com.toasttab.protokt.rt.KtMessage -import com.toasttab.protokt.rt.wireType -import kotlin.reflect.KClass -import kotlin.reflect.full.declaredMemberProperties - -enum class FieldType( - private val type: TypeImpl -) { - BOOL(Scalar.Bool), - BYTES(Nonscalar.Bytes), - DOUBLE(Scalar.Double), - ENUM(Nonscalar.Enum), - FIXED32(Boxed.Fixed32), - FIXED64(Boxed.Fixed64), - FLOAT(Scalar.Float), - INT32(Boxed.Int32), - INT64(Boxed.Int64), - MESSAGE(Nonscalar.Message), - SFIXED32(Boxed.SFixed32), - SFIXED64(Boxed.SFixed64), - SINT32(Boxed.SInt32), - SINT64(Boxed.SInt64), - STRING(Nonscalar.String), - UINT32(Boxed.UInt32), - UINT64(Boxed.UInt64); - - val protoktFieldType - get() = when (type) { - is Nonscalar.Bytes -> Bytes::class - else -> - requireNotNull(type.kotlinRepresentation) { - "no protokt field type for $this" - } - } - - val packable - get() = - type != Nonscalar.Bytes && - type != Nonscalar.Message && - type != Nonscalar.String - - val scalar - get() = type.scalar - - val boxed - get() = type.inlineRepresentation != null - - val boxer - get() = - requireNotNull(type.inlineRepresentation) { - "no boxer for $this" - } - - val wireType - get() = type.wireType - - val kotlinRepresentation - get() = type.kotlinRepresentation -} - -private sealed class TypeImpl { - open val kotlinRepresentation: KClass<*>? = null - open val inlineRepresentation: KClass<*>? = null - open val ktRepresentation: KClass<*>? = null - - abstract val scalar: Boolean - - val wireType - get() = wireType( - (inlineRepresentation ?: ktRepresentation ?: kotlinRepresentation)!! - ) -} - -private sealed class Nonscalar( - override val kotlinRepresentation: KClass<*>? = null, - override val ktRepresentation: KClass<*>? = null, -) : TypeImpl() { - override val scalar = false - - object Enum : Nonscalar(ktRepresentation = KtEnum::class) - object Message : Nonscalar(ktRepresentation = KtMessage::class) - object String : Nonscalar(kotlin.String::class) - object Bytes : Nonscalar( - ByteArray::class, - com.toasttab.protokt.rt.Bytes::class - ) -} - -private sealed class Scalar( - override val kotlinRepresentation: KClass<*>? = null -) : TypeImpl() { - override val scalar = true - - object Bool : Scalar(Boolean::class) - object Double : Scalar(kotlin.Double::class) - object Float : Scalar(kotlin.Float::class) -} - -private sealed class Boxed( - override val inlineRepresentation: KClass<*> -) : Scalar() { - override val kotlinRepresentation - get() = inlineRepresentation.declaredMemberProperties - .single { it.name == com.toasttab.protokt.rt.Fixed32::value.name } - .returnType - .classifier as KClass<*> - - object Fixed32 : Boxed(com.toasttab.protokt.rt.Fixed32::class) - object Fixed64 : Boxed(com.toasttab.protokt.rt.Fixed64::class) - object Int32 : Boxed(com.toasttab.protokt.rt.Int32::class) - object Int64 : Boxed(com.toasttab.protokt.rt.Int64::class) - object SFixed32 : Boxed(com.toasttab.protokt.rt.SFixed32::class) - object SFixed64 : Boxed(com.toasttab.protokt.rt.SFixed64::class) - object SInt32 : Boxed(com.toasttab.protokt.rt.SInt32::class) - object SInt64 : Boxed(com.toasttab.protokt.rt.SInt64::class) - object UInt32 : Boxed(com.toasttab.protokt.rt.UInt32::class) - object UInt64 : Boxed(com.toasttab.protokt.rt.UInt64::class) -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/Import.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/Import.kt deleted file mode 100644 index 3dfe0c45e..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/Import.kt +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2020 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.model - -import com.squareup.kotlinpoet.FileSpec -import kotlin.reflect.KCallable -import kotlin.reflect.KClass - -sealed class Import { - abstract val qualifiedName: String - abstract val simpleName: String - abstract val pkg: PPackage - abstract val nested: Boolean - - data class Class(val pClass: PClass) : Import() { - override val qualifiedName = pClass.qualifiedName - override val pkg = pClass.ppackage - override val simpleName = pClass.simpleName - override val nested = pClass.enclosing.isDefined() - } - - data class PackageMethod( - override val pkg: PPackage, - val name: String - ) : Import() { - override val qualifiedName = pkg.qualify(name) - override val simpleName = name - override val nested = false - } - - data class ClassMethod( - val value: FileSpec.Builder.() -> Unit - ) : Import() { - override val pkg = PPackage.DEFAULT - override val qualifiedName = "" - override val simpleName = "" - override val nested = true - } - - data class Literal(val value: FileSpec.Builder.() -> Unit) : Import() { - override val qualifiedName = "" - override val simpleName = "" - override val pkg = PPackage.DEFAULT - override val nested = false // unknown, really - } -} - -fun method(pkg: String, name: String): Import = - Import.PackageMethod(PPackage.fromString(pkg), name) - -fun rtMethod(callable: KCallable<*>): Import = - Import.PackageMethod(PPackage.PROTOKT_RT, callable.name) - -fun pclass(kclass: KClass<*>): Import = - Import.Class(PClass.fromClass(kclass)) diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/PClass.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/PClass.kt deleted file mode 100644 index e1f98b1bc..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/PClass.kt +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.model - -import arrow.core.None -import arrow.core.Option -import arrow.core.Some -import com.squareup.kotlinpoet.ClassName -import kotlinx.collections.immutable.persistentListOf -import kotlin.reflect.KClass - -data class PClass( - val simpleName: String, - val ppackage: PPackage, - val enclosing: Option -) { - val qualifiedName - get() = ppackage.qualify(nestedName) - - val nestedName: String - get() = - enclosing.fold( - { simpleName }, - { "${it.nestedName}.$simpleName" } - ) - - fun renderName(pkg: PPackage) = - if (ppackage == pkg || ppackage == PPackage.fromString("kotlin")) { - enclosing.fold( - { simpleName }, - { nestedName.substringAfter('.') } - ) - } else { - qualifiedName - } - - fun qualify(pkg: PPackage): PClass { - check(ppackage.default) { - "cannot qualify non-default package class: $this, $pkg" - } - return if (pkg.default) { - this - } else { - fromName(pkg.qualify(nestedName)) - } - } - - fun toTypeName() = - ClassName(ppackage.toString(), names()) - - private fun names(): List = - enclosing.fold({ persistentListOf(simpleName) }, { it.names() + simpleName }) - - companion object { - fun fromClass(klass: KClass<*>) = - fromName(klass.qualifiedName!!) - - fun fromName(name: String) = - PPackage.fromClassName(name).let { - PClass( - name.substringAfterLast('.'), - it, - enclosing(name, it) - ) - } - - private fun enclosing( - fqName: String, - ppackage: PPackage - ): Option { - if (!fqName.contains(".")) { - return None - } - - val withoutLastDot = fqName.substringBeforeLast('.') - val components = withoutLastDot.split('.') - components.forEach { check(it.isNotEmpty()) { "$fqName invalid" } } - - return if (ppackage.default) { - if (components.size == 1) { - Some(PClass(components.single(), ppackage, None)) - } else { - Some( - PClass( - components.last(), - ppackage, - enclosing(withoutLastDot, ppackage) - ) - ) - } - } else { - if ( - components.isEmpty() || - components.last().first().isLowerCase() - ) { - None - } else { - Some( - PClass( - components.last(), - ppackage, - enclosing(withoutLastDot, ppackage) - ) - ) - } - } - } - } -} - -fun PClass.possiblyQualify(pkg: PPackage) = - if (ppackage.default) { - qualify(pkg) - } else { - this - } diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/PPackage.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/PPackage.kt deleted file mode 100644 index 063584d08..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/PPackage.kt +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.model - -import com.toasttab.protokt.codegen.annotators.Annotator.protoktPkg -import com.toasttab.protokt.codegen.annotators.Annotator.protoktRtPkg - -class PPackage -private constructor( - private val components: List -) { - init { - require(components.none { it.isEmpty() }) { - "invalid package name components: $components" - } - } - - val default = components.isEmpty() - - fun qualify(name: String) = - if (this == DEFAULT) { - name - } else { - "$this.$name" - } - - override fun toString() = - components.joinToString(".") - - override fun equals(other: Any?) = - other is PPackage && other.components == components - - override fun hashCode() = - components.hashCode() - - companion object { - val DEFAULT = PPackage(emptyList()) - val KOTLIN = fromString("kotlin") - val PROTOKT = fromString(protoktPkg) - val PROTOKT_RT = fromString(protoktRtPkg) - - fun fromString(`package`: String) = - if (`package`.isEmpty()) { - DEFAULT - } else { - PPackage(`package`.split('.')) - } - - fun fromClassName( - name: String - ): PPackage { - val classNameStartIdx = name.indexOfFirst { it.isUpperCase() } - validate(classNameStartIdx, name) - - // Sometimes fullyQualifiedTypeName is unqualified. - // e.g. String, Int, GeneratedCodeInfo.Annotation, etc. - return if (classNameStartIdx == 0) { - DEFAULT - } else { - PPackage( - name - .substring(0..(classNameStartIdx - 2)) - .split('.') - ) - } - } - - private fun validate(classNameStartIdx: Int, name: String) { - if (classNameStartIdx == -1) { - throw IllegalArgumentException("No capital letter found: $name") - } - - if (classNameStartIdx == 1) { - throw IllegalArgumentException( - "Invalid name; cannot have a package with separator in one " + - "char: $name" - ) - } - - if (classNameStartIdx != 0 && name[classNameStartIdx - 1] != '.') { - throw IllegalArgumentException( - "Char before first capital letter must be a package separator" - ) - } - } - } -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/WireFormat.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/WireFormat.kt deleted file mode 100644 index 84c5124e3..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/model/WireFormat.kt +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2020 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.rt - -import kotlin.reflect.KClass - -private val TYPE_0 by lazy { - listOf( - Boolean::class, - KtEnum::class, - Int32::class, - Int64::class, - SInt32::class, - SInt64::class, - UInt32::class, - UInt64::class - ) -} - -private val TYPE_1 by lazy { - listOf( - Double::class, - Fixed64::class, - SFixed64::class - ) -} - -private val TYPE_2 by lazy { - listOf( - Bytes::class, - KtMessage::class, - String::class - ) -} - -private val TYPE_5 by lazy { - listOf( - Float::class, - Fixed32::class, - SFixed32::class - ) -} - -private val WIRE_TYPES by lazy { - TYPE_0.associateWith { 0 } + - TYPE_1.associateWith { 1 } + - TYPE_2.associateWith { 2 } + - TYPE_5.associateWith { 5 } -} - -fun wireType(klass: KClass<*>) = - WIRE_TYPES.getValue(klass) - -fun computeTag(fieldNumber: Int, wireType: Int) = - (fieldNumber shl 3) or wireType diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/protoc/Format.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/protoc/Format.kt deleted file mode 100644 index e6383bcb5..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/protoc/Format.kt +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.protoc - -import com.google.protobuf.DescriptorProtos.FileDescriptorProto -import com.toasttab.protokt.codegen.model.PPackage -import com.toasttab.protokt.codegen.util.capitalize -import com.toasttab.protokt.codegen.util.decapitalize - -internal object Keywords { - val reserved = - setOf( - "Boolean", - "Double", - "Float", - "Int", - "List", - "Long", - "Map", - "String", - "Unit", - "Enum", - "Int32", - "Int64", - "Fixed32", - "Fixed64", - "SFixed32", - "SFixed64", - "SInt32", - "SInt64", - "UInt32", - "UInt64", - "Bytes", - "Deserializer", - "KtDeserializer", - "KtSerializer", - "KtMessageSerializer", - "Tag", - "deserializer", - "serializer", - "messageSize", - "emptyList" - ) - - val kotlinReserved = - setOf( - "as", - "break", - "class", - "continue", - "do", - "else", - "false", - "for", - "fun", - "if", - "in", - "interface", - "is", - "null", - "object", - "package", - "return", - "super", - "this", - "throw", - "true", - "try", - "typealias", - "val", - "var", - "when", - "while" - ) -} - -internal fun snakeToCamel(str: String): String { - var ret = str - var lastIndex = -1 - while (true) { - lastIndex = - ret.indexOf('_', lastIndex + 1) - .also { - if (it == -1) { - return ret - } - } - ret = ret.substring(0, lastIndex) + - ret.substring(lastIndex + 1).capitalize() - } -} - -internal fun newTypeNameFromCamel( - preferred: String, - set: Set = emptySet() -) = - newTypeNameFromPascal(snakeToCamel(preferred).capitalize(), set) - -internal fun newTypeNameFromPascal( - preferred: String, - set: Set = emptySet() -) = - appendUnderscores(preferred, set) - -internal fun newFieldName(preferred: String, set: Set): String { - var name = snakeToCamel(preferred).decapitalize() - name = appendUnderscores(name, set) - if (Keywords.kotlinReserved.contains(name)) { - name = "`$name`" - } - return name -} - -private fun appendUnderscores(orig: String, set: Set): String { - var name = orig - while (set.contains(name) || Keywords.reserved.contains(name)) { - name += '_' - } - return name -} - -internal fun newEnumValueName( - enumTypeNamePrefix: String?, - preferred: String, - set: Set -): String { - var name = preferred - - if (enumTypeNamePrefix != null) { - name = name.removePrefix(enumTypeNamePrefix) - } - - while (set.contains(name)) { - name += '_' - } - - return name -} - -internal fun camelToUpperSnake(str: String) = - str.replace(Regex("(?<=[a-z])([A-Z0-9])"), "_$1").uppercase() - -internal fun fileName(pkg: PPackage?, name: String): String { - return (pkg?.toString()?.replace('.', '/')?.plus('/') ?: "") + - name.substringAfterLast('/').removeSuffix(".proto") + - ".kt" -} - -internal fun generateFdpObjectNames(files: List): Map = - files.associate { fdp -> - Pair( - fdp.name, - fdp.fileOptions.protokt.fileDescriptorObjectName.takeIf { it.isNotEmpty() } - ?: fdp.fileOptions.default.javaOuterClassname.takeIf { it.isNotEmpty() } - ?: (fdp.name.substringBefore(".proto").substringAfterLast('/') + "_file_descriptor") - ) - } diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/protoc/Protocol.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/protoc/Protocol.kt deleted file mode 100644 index c9fc5f34a..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/protoc/Protocol.kt +++ /dev/null @@ -1,517 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.protoc - -import arrow.core.None -import arrow.core.Option -import arrow.core.Some -import arrow.core.Tuple4 -import arrow.core.firstOrNone -import com.google.protobuf.DescriptorProtos -import com.google.protobuf.DescriptorProtos.DescriptorProto -import com.google.protobuf.DescriptorProtos.EnumDescriptorProto -import com.google.protobuf.DescriptorProtos.FieldDescriptorProto -import com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Label.LABEL_OPTIONAL -import com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Label.LABEL_REPEATED -import com.google.protobuf.DescriptorProtos.FileDescriptorProto -import com.google.protobuf.DescriptorProtos.OneofDescriptorProto -import com.google.protobuf.DescriptorProtos.ServiceDescriptorProto -import com.squareup.kotlinpoet.ClassName -import com.toasttab.protokt.codegen.annotators.Annotator.rootGoogleProto -import com.toasttab.protokt.codegen.annotators.resolveMapEntry -import com.toasttab.protokt.codegen.impl.overrideGoogleProtobuf -import com.toasttab.protokt.codegen.impl.resolvePackage -import com.toasttab.protokt.codegen.model.FieldType -import com.toasttab.protokt.codegen.model.PClass -import com.toasttab.protokt.codegen.model.PPackage -import com.toasttab.protokt.ext.ProtoktProto -import kotlinx.collections.immutable.PersistentList -import kotlinx.collections.immutable.PersistentSet -import kotlinx.collections.immutable.persistentListOf -import kotlinx.collections.immutable.persistentMapOf -import kotlinx.collections.immutable.persistentSetOf -import kotlinx.collections.immutable.plus - -/** - * Converts a message in the format used by protoc to the unannotated AST used by protokt. - */ -fun toProtocol(ctx: ProtocolContext): Protocol { - val kotlinPackage = resolvePackage(ctx.fdp.fileOptions, ctx.fdp.`package`, ctx.respectJavaPackage) - return Protocol( - FileDesc( - name = ctx.fdp.name, - protoPackage = ctx.fdp.`package`, - kotlinPackage = kotlinPackage, - options = ctx.fdp.fileOptions, - context = ctx, - sourceCodeInfo = ctx.fdp.sourceCodeInfo - ), - types = toTypeList( - ctx, - kotlinPackage, - ctx.fdp.enumTypeList, - ctx.fdp.messageTypeList, - ctx.fdp.serviceList - ) - ) -} - -val FileDescriptorProto.fileOptions - get() = - FileOptions( - options, - options.getExtension(ProtoktProto.file) - ) - -private fun toFieldType(type: FieldDescriptorProto.Type) = - when (type) { - FieldDescriptorProto.Type.TYPE_BOOL -> FieldType.BOOL - FieldDescriptorProto.Type.TYPE_BYTES -> FieldType.BYTES - FieldDescriptorProto.Type.TYPE_DOUBLE -> FieldType.DOUBLE - FieldDescriptorProto.Type.TYPE_ENUM -> FieldType.ENUM - FieldDescriptorProto.Type.TYPE_FIXED32 -> FieldType.FIXED32 - FieldDescriptorProto.Type.TYPE_FIXED64 -> FieldType.FIXED64 - FieldDescriptorProto.Type.TYPE_FLOAT -> FieldType.FLOAT - FieldDescriptorProto.Type.TYPE_INT32 -> FieldType.INT32 - FieldDescriptorProto.Type.TYPE_INT64 -> FieldType.INT64 - FieldDescriptorProto.Type.TYPE_MESSAGE -> FieldType.MESSAGE - FieldDescriptorProto.Type.TYPE_SFIXED32 -> FieldType.SFIXED32 - FieldDescriptorProto.Type.TYPE_SFIXED64 -> FieldType.SFIXED64 - FieldDescriptorProto.Type.TYPE_SINT32 -> FieldType.SINT32 - FieldDescriptorProto.Type.TYPE_SINT64 -> FieldType.SINT64 - FieldDescriptorProto.Type.TYPE_STRING -> FieldType.STRING - FieldDescriptorProto.Type.TYPE_UINT32 -> FieldType.UINT32 - FieldDescriptorProto.Type.TYPE_UINT64 -> FieldType.UINT64 - else -> error("Unknown type: $type") - } - -private fun toTypeList( - ctx: ProtocolContext, - pkg: PPackage, - enums: List, - messages: List, - services: List = emptyList(), - enclosingMessages: List = emptyList() -): PersistentList = - enums.foldIndexed( - Pair(persistentSetOf(), persistentListOf()) - ) { idx, acc, t -> - val e = toEnum(idx, t, acc.first, enclosingMessages, pkg.toString()) - Pair(acc.first + e.name, acc.second + e) - }.second + - - messages.foldIndexed( - Pair(persistentSetOf(), persistentListOf()) - ) { idx, acc, t -> - val m = toMessage(idx, ctx, pkg, t, acc.first, enclosingMessages) - Pair(acc.first + m.name, acc.second + m) - }.second + - - services.foldIndexed( - Pair(persistentSetOf(), persistentListOf()) - ) { idx, acc, t -> - val s = toService(idx, t, ctx, acc.first) - Pair(acc.first + s.type, acc.second + s) - }.second - -private fun toEnum( - idx: Int, - desc: EnumDescriptorProto, - names: PersistentSet, - enclosingMessages: List, - pkg: String -): Enum { - val typeName = newTypeNameFromCamel(desc.name, names) - - val enumTypeNamePrefixToStrip = - (camelToUpperSnake(desc.name) + '_') - .takeIf { prefix -> - desc.valueList.all { it.name.startsWith(prefix) } - } - - return Enum( - name = typeName, - values = desc.valueList.foldIndexed( - Pair( - names + typeName, - persistentListOf() - ) - ) { enumIdx, acc, t -> - val n = newEnumValueName(enumTypeNamePrefixToStrip, t.name, acc.first) - val v = - Enum.Value( - t.number, - t.name, - n, - EnumValueOptions( - t.options, - t.options.getExtension(ProtoktProto.enumValue) - ), - enumIdx - ) - Pair(acc.first + n, acc.second + v) - }.second, - index = idx, - options = EnumOptions( - desc.options, - desc.options.getExtension(ProtoktProto.enum_) - ), - typeName = ClassName(pkg, enclosingMessages + typeName), - deserializerTypeName = ClassName(pkg, enclosingMessages + typeName + "Deserializer") - ) -} - -private fun toMessage( - idx: Int, - ctx: ProtocolContext, - pkg: PPackage, - desc: DescriptorProto, - names: Set, - enclosingMessages: List -): Message { - val typeName = newTypeNameFromPascal(desc.name, names) - val fieldList = toFields(ctx, pkg, desc, enclosingMessages + typeName, names + typeName) - return Message( - name = typeName, - fields = fieldList.sortedBy { - when (it) { - is StandardField -> it - is Oneof -> it.fields.first() - }.number - }, - nestedTypes = toTypeList(ctx, pkg, desc.enumTypeList, desc.nestedTypeList, enclosingMessages = enclosingMessages + typeName), - mapEntry = desc.options?.mapEntry == true, - options = MessageOptions( - desc.options, - desc.options.getExtension(ProtoktProto.class_) - ), - index = idx, - fullProtobufTypeName = "${ctx.fdp.`package`}.${desc.name}", - typeName = ClassName(pkg.toString(), enclosingMessages + typeName), - deserializerTypeName = ClassName(pkg.toString(), enclosingMessages + typeName + "Deserializer"), - dslTypeName = ClassName(pkg.toString(), enclosingMessages + typeName + "${typeName}Dsl") - ) -} - -private fun toService( - idx: Int, - desc: ServiceDescriptorProto, - ctx: ProtocolContext, - names: Set -) = - Service( - name = desc.name, - type = newTypeNameFromPascal(desc.name, names), - methods = desc.methodList.map { toMethod(it, ctx) }, - deprecated = desc.options.deprecated, - options = ServiceOptions( - desc.options, - desc.options.getExtension(ProtoktProto.service) - ), - index = idx - ) - -private fun toMethod( - desc: DescriptorProtos.MethodDescriptorProto, - ctx: ProtocolContext -) = - Method( - desc.name, - requalifyProtoType(desc.inputType, ctx), - requalifyProtoType(desc.outputType, ctx), - desc.clientStreaming, - desc.serverStreaming, - desc.options.deprecated, - MethodOptions( - desc.options, - desc.options.getExtension(ProtoktProto.method) - ) - ) - -private fun toFields( - ctx: ProtocolContext, - pkg: PPackage, - desc: DescriptorProto, - enclosingMessages: List, - typeNames: Set, - ids: Set = persistentSetOf() -): PersistentList = - desc.fieldList.foldIndexed( - Tuple4( - typeNames, - ids, - persistentSetOf(), - persistentListOf() - ) - ) { idx, acc, t -> - when (t.type) { - FieldDescriptorProto.Type.TYPE_GROUP -> acc - else -> { - val i = if (t.hasOneofIndex()) Some(t.oneofIndex) else None - i.fold({ - val f = toStandard(idx, ctx, pkg, t, emptySet()) - Tuple4(acc.first + f.fieldName, acc.second, acc.third, acc.fourth + f) - }, { - if (it in acc.second || desc.oneofDeclList.isEmpty()) { - acc - } else { - val ood = desc.getOneofDecl(it) - Tuple4( - acc.first, - acc.second + it, - acc.third + ood.name, - acc.fourth + toOneof(idx, ctx, pkg, enclosingMessages, desc, ood, t, acc.first, acc.fourth) - ) - } - }) - } - } - }.fourth - -private fun toOneof( - idx: Int, - ctx: ProtocolContext, - pkg: PPackage, - enclosingMessages: List, - desc: DescriptorProto, - oneof: OneofDescriptorProto, - field: FieldDescriptorProto, - typeNames: Set, - fields: PersistentList -): Field { - val newName = newFieldName(oneof.name, typeNames) - - if (field.proto3Optional) { - return toStandard(idx, ctx, pkg, field, typeNames) - } - - val standardTuple = desc.fieldList.filter { - it.hasOneofIndex() && it.oneofIndex == field.oneofIndex - }.foldIndexed( - Triple( - persistentMapOf(), - persistentSetOf(), - persistentListOf() - ) - ) { oneofIdx, acc, t -> - val ftn = newTypeNameFromCamel(t.name, acc.second) - Triple( - acc.first + (newFieldName(t.name, acc.second) to ftn), - acc.second + ftn, - acc.third + toStandard(idx + oneofIdx, ctx, pkg, t, emptySet(), true) - ) - } - val name = newTypeNameFromCamel(oneof.name, typeNames) - return Oneof( - name = name, - typeName = ClassName(pkg.toString(), enclosingMessages + name), - fieldTypeNames = standardTuple.first, - fieldName = newName, - fields = standardTuple.third, - options = OneofOptions( - oneof.options, - oneof.options.getExtension(ProtoktProto.oneof) - ), - // index relative to all oneofs in this message - index = idx - fields.filterIsInstance().count() - ) -} - -private fun toStandard( - idx: Int, - ctx: ProtocolContext, - pkg: PPackage, - fdp: FieldDescriptorProto, - usedFieldNames: Set, - withinOneof: Boolean = false -): StandardField = - toFieldType(fdp.type).let { type -> - val protoktOptions = fdp.options.getExtension(ProtoktProto.property) - val repeated = fdp.label == LABEL_REPEATED - val mapEntry = mapEntry(usedFieldNames, fdp, ctx, pkg) - val optional = optional(fdp, ctx) - - if (protoktOptions.nonNull) { - validateNonNullOption(fdp, type, repeated, mapEntry, withinOneof, optional) - } - - StandardField( - number = fdp.number, - type = type, - repeated = repeated, - optional = !withinOneof && optional, - packed = packed(type, fdp, ctx), - mapEntry = mapEntry, - fieldName = newFieldName(fdp.name, usedFieldNames), - options = FieldOptions(fdp.options, protoktOptions), - protoTypeName = fdp.typeName, - typePClass = typePClass(fdp.typeName, ctx, type), - index = idx - ) - } - -private fun validateNonNullOption( - fdp: FieldDescriptorProto, - type: FieldType, - repeated: Boolean, - mapEntry: MapEntry?, - withinOneof: Boolean, - optional: Boolean -) { - fun FieldType.typeName() = - name.lowercase() - - fun name(field: StandardField) = - if (field.type == FieldType.ENUM) { - field.protoTypeName - } else { - field.type.typeName() - } - - val typeName = - when (type) { - FieldType.ENUM, FieldType.MESSAGE -> fdp.typeName - else -> type.typeName() - } - - require(!optional) { - "(protokt.property).non_null is not applicable to optional fields " + - "and is inapplicable to optional $typeName" - } - require(!withinOneof) { - "(protokt.property).non_null is only applicable to top level types " + - "and is inapplicable to oneof field $typeName" - } - require(type == FieldType.MESSAGE && !repeated) { - "(protokt.property).non_null is only applicable to message types " + - "and is inapplicable to non-message " + - when { - mapEntry != null -> - "map<${name(mapEntry.key)}, ${name(mapEntry.value)}>" - repeated -> - "repeated $typeName" - else -> - type.typeName() - } - } -} - -private fun optional(fdp: FieldDescriptorProto, ctx: ProtocolContext) = - (fdp.label == LABEL_OPTIONAL && ctx.proto2) || - fdp.proto3Optional - -private fun packed(type: FieldType, fdp: FieldDescriptorProto, ctx: ProtocolContext) = - type.packable && - // marginal support for proto2 - ( - (ctx.proto2 && fdp.options.packed) || - // packed if: proto3 and `packed` isn't set, or proto3 - // and `packed` is true. If proto3, only explicitly - // setting `packed` to false disables packing, since - // the default value for an unset boolean is false. - (ctx.proto3 && (!fdp.options.hasPacked() || (fdp.options.hasPacked() && fdp.options.packed))) - ) - -private fun mapEntry( - usedFieldNames: Set, - fdp: FieldDescriptorProto, - ctx: ProtocolContext, - pkg: PPackage -) = - if (fdp.label == LABEL_REPEATED && - fdp.type == FieldDescriptorProto.Type.TYPE_MESSAGE - ) { - findMapEntry(ctx.fdp, fdp.typeName).filter { it.options.mapEntry } - .fold( - { null }, - { - resolveMapEntry( - toMessage(-1, ctx, pkg, it, usedFieldNames, emptyList()) - ) - } - ) - } else { - null - } - -private fun findMapEntry( - fdp: FileDescriptorProto, - name: String, - parent: Option = None -): Option { - val (typeList, typeName) = - parent.fold( - { - fdp.messageTypeList.filterNotNull() to - name.removePrefix(".${fdp.`package`}.") - }, - { it.nestedTypeList.filterNotNull() to name } - ) - - typeName.indexOf('.').let { idx -> - return if (idx == -1) { - typeList.firstOrNone { it.name == typeName } - } else { - findMapEntry( - fdp, - typeName.substring(idx + 1), - typeList.firstOrNone { it.name == typeName.substring(0, idx) } - ) - } - } -} - -private fun typePClass( - protoTypeName: String, - ctx: ProtocolContext, - fieldType: FieldType -): PClass { - val fullyProtoQualified = protoTypeName.startsWith(".") - - return if (fullyProtoQualified) { - requalifyProtoType(protoTypeName, ctx) - } else { - newTypeNameFromPascal(protoTypeName).let { - if (it.isEmpty()) { - PClass.fromClass(fieldType.protoktFieldType) - } else { - PClass.fromName(it) - } - } - } -} - -private fun requalifyProtoType(typeName: String, ctx: ProtocolContext): PClass { - val withOverriddenGoogleProtoPackage = - PClass.fromName( - overrideGoogleProtobuf(typeName.removePrefix("."), rootGoogleProto) - ) - - val withOverriddenReservedName = - PClass( - newTypeNameFromPascal(withOverriddenGoogleProtoPackage.simpleName), - withOverriddenGoogleProtoPackage.ppackage, - withOverriddenGoogleProtoPackage.enclosing - ) - - return if (ctx.respectJavaPackage) { - PClass.fromName( - withOverriddenReservedName.nestedName - ).qualify(ctx.allPackagesByTypeName.getValue(typeName)) - } else { - withOverriddenReservedName - } -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/protoc/ProtocolContext.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/protoc/ProtocolContext.kt deleted file mode 100644 index 50372dc78..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/protoc/ProtocolContext.kt +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2020 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.protoc - -import com.google.common.base.CaseFormat.LOWER_CAMEL -import com.google.common.base.CaseFormat.LOWER_UNDERSCORE -import com.google.protobuf.DescriptorProtos.FileDescriptorProto -import com.toasttab.protokt.codegen.impl.packagesByTypeName -import com.toasttab.protokt.codegen.impl.resolvePackage -import com.toasttab.protokt.gradle.GENERATE_GRPC -import com.toasttab.protokt.gradle.KOTLIN_EXTRA_CLASSPATH -import com.toasttab.protokt.gradle.LITE -import com.toasttab.protokt.gradle.ONLY_GENERATE_DESCRIPTORS -import com.toasttab.protokt.gradle.ONLY_GENERATE_GRPC -import com.toasttab.protokt.gradle.ProtoktExtension -import com.toasttab.protokt.gradle.RESPECT_JAVA_PACKAGE -import com.toasttab.protokt.util.getProtoktVersion -import java.net.URLDecoder -import kotlin.reflect.full.declaredMemberProperties - -class ProtocolContext( - val fdp: FileDescriptorProto, - params: Map, - private val filesToGenerate: Set, - allFiles: List -) { - val classpath = - params.getOrDefault(KOTLIN_EXTRA_CLASSPATH, "").split(";").map { - URLDecoder.decode(it, "UTF-8") - } - - val respectJavaPackage = respectJavaPackage(params) - val generateGrpc = params.getOrDefault(GENERATE_GRPC) - val onlyGenerateGrpc = params.getOrDefault(ONLY_GENERATE_GRPC) - val lite = params.getOrDefault(LITE) - val onlyGenerateDescriptors = params.getOrDefault(ONLY_GENERATE_DESCRIPTORS) - - val fileName = fdp.name - val version = getProtoktVersion(ProtocolContext::class) - - val proto2 = !fdp.hasSyntax() || fdp.syntax == "proto2" - val proto3 = fdp.syntax == "proto3" - - val allPackagesByTypeName = - packagesByTypeName(allFiles, respectJavaPackage(params)) - - val allPackagesByFileName = - allFiles.associate { - it.name to - resolvePackage( - it, - it.name !in filesToGenerate || - respectJavaPackage(params) - ) - } - - val allFilesByName = allFiles.associateBy { it.name } - - val allDescriptorClassNamesByDescriptorName = generateFdpObjectNames(allFiles) - - val fileDescriptorObjectName = - allDescriptorClassNamesByDescriptorName.getValue(fdp.name) -} - -fun respectJavaPackage(params: Map) = - params.getOrDefault(RESPECT_JAVA_PACKAGE) - -private fun Map.getOrDefault(key: String): Boolean { - val defaultExtension = ProtoktExtension() - - val defaultValue = - defaultExtension::class.declaredMemberProperties - .single { it.name == LOWER_UNDERSCORE.to(LOWER_CAMEL, key) } - .call(defaultExtension) as Boolean - - return get(key)?.toBoolean() ?: defaultValue -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/template/Message.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/template/Message.kt deleted file mode 100644 index 1060182db..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/template/Message.kt +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2020 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.template - -import com.squareup.kotlinpoet.CodeBlock -import com.squareup.kotlinpoet.TypeName -import com.toasttab.protokt.codegen.impl.Deprecation -import com.toasttab.protokt.codegen.model.PClass - -object Message { - object Message { - interface FieldInfo { - val name: String - } - - class PropertyInfo( - override val name: String, - val propertyType: TypeName, - val deserializeType: TypeName, - val dslPropertyType: TypeName, - val defaultValue: CodeBlock, - val nullable: Boolean, - val nonNullOption: Boolean, - val pClass: PClass? = null, - val fieldType: String = "", - val repeated: Boolean = false, - val map: Boolean = false, - val oneof: Boolean = false, - val wrapped: Boolean = false, - val overrides: Boolean = false, - val documentation: List, - val deprecation: Deprecation.RenderOptions? = null - ) : FieldInfo - - interface FieldWriteInfo : FieldInfo { - val fieldName: String - val conditionals: List - - override val name: String - get() = fieldName - } - - class SizeofInfo( - override val fieldName: String, - /** A singleton list for standard fields; one per type for enum fields */ - override val conditionals: List - ) : FieldWriteInfo - - class SerializerInfo( - override val fieldName: String, - /** A singleton list for standard fields; one per type for enum fields */ - override val conditionals: List - ) : FieldWriteInfo - - class DeserializerInfo( - val repeated: Boolean, - val tag: Int, - val assignment: Assignment - ) : FieldInfo { - class Assignment( - val fieldName: String, - val value: String - ) - - override val name - get() = assignment.fieldName - } - } -} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/util/StringExt.kt b/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/util/StringExt.kt deleted file mode 100644 index 9053389e2..000000000 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/util/StringExt.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.toasttab.protokt.codegen.util - -fun String.decapitalize() = - replaceFirstChar { it.lowercaseChar() } - -fun String.capitalize() = - replaceFirstChar { it.uppercaseChar() } diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/Main.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/Main.kt new file mode 100644 index 000000000..aed60cda6 --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/Main.kt @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen + +import com.google.protobuf.ExtensionRegistry +import com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest +import com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse +import com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.Feature +import com.squareup.kotlinpoet.FileSpec +import com.toasttab.protokt.v1.ProtoktProto +import protokt.v1.codegen.generate.generateFile +import protokt.v1.codegen.util.ErrorContext.withFileName +import protokt.v1.codegen.util.GeneratorContext +import protokt.v1.codegen.util.PluginParams +import protokt.v1.codegen.util.formatErrorMessage +import protokt.v1.codegen.util.generateGrpcKotlinStubs +import protokt.v1.codegen.util.parseFileContents +import protokt.v1.codegen.util.tidy +import java.io.InputStream +import java.io.OutputStream +import java.io.PrintStream +import kotlin.system.exitProcess + +fun main() { + exitProcess(main(System.`in`, System.out, System.err)) +} + +internal fun main(`in`: InputStream, out: OutputStream, err: PrintStream) = + try { + main(`in`, out) + 0 + } catch (t: Throwable) { + err.println(formatErrorMessage()) + t.printStackTrace(err) + -1 + } + +private fun main(`in`: InputStream, out: OutputStream) { + val req = parseCodeGeneratorRequest(`in`) + val params = PluginParams(parseParams(req)) + val filesToGenerate = req.fileToGenerateList.toSet() + + val files = req.protoFileList + .filter { filesToGenerate.contains(it.name) } + .mapNotNull { fdp -> + val context = GeneratorContext(fdp, params, req.protoFileList) + val fileSpec = withFileName(fdp.name) { generateFile(parseFileContents(context)) } + fileSpec?.let { response(it, context) } + } + + val grpcKotlinFiles = generateGrpcKotlinStubs(params, req) + + if (files.isNotEmpty() || grpcKotlinFiles.isNotEmpty()) { + CodeGeneratorResponse.newBuilder() + .setSupportedFeatures(Feature.FEATURE_PROTO3_OPTIONAL.number.toLong()) + .addAllFile(files) + .addAllFile(grpcKotlinFiles) + .build() + .writeTo(out) + } +} + +private fun response(fileSpec: FileSpec, context: GeneratorContext) = + CodeGeneratorResponse.File + .newBuilder() + .setContent(tidy(fileSpec.toString(), context)) + .setName(fileSpec.name) + .build() + +private fun parseParams(req: CodeGeneratorRequest) = + if (req.parameter == null || req.parameter.isEmpty()) { + emptyMap() + } else { + req.parameter + .split(',') + .associate { it.substringBefore('=') to it.substringAfter('=', "") } + } + +private fun parseCodeGeneratorRequest(`in`: InputStream) = + CodeGeneratorRequest.parseFrom( + `in`, + ExtensionRegistry.newInstance() + .also { ProtoktProto.registerAllExtensions(it) } + ) diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/CodeGenerator.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/CodeGenerator.kt new file mode 100644 index 000000000..a775d7cf2 --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/CodeGenerator.kt @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.squareup.kotlinpoet.TypeSpec +import protokt.v1.codegen.util.Enum +import protokt.v1.codegen.util.ErrorContext.withEnumName +import protokt.v1.codegen.util.ErrorContext.withMessageName +import protokt.v1.codegen.util.ErrorContext.withServiceName +import protokt.v1.codegen.util.GeneratedType +import protokt.v1.codegen.util.Message +import protokt.v1.codegen.util.ProtoFileContents +import protokt.v1.codegen.util.ProtoFileInfo +import protokt.v1.codegen.util.Service +import protokt.v1.codegen.util.TopLevelType + +object CodeGenerator { + data class Context( + val enclosing: List, + val info: ProtoFileInfo + ) + + fun generate(contents: ProtoFileContents) = + contents.types.flatMap { + generate( + it, + Context(emptyList(), contents.info) + ) + .map { type -> GeneratedType(it, type) } + } + + fun generate(type: TopLevelType, ctx: Context): Iterable = + when (type) { + is Message -> + withMessageName(type.className) { + listOfNotNull( + generateMessage( + type, + ctx.copy(enclosing = ctx.enclosing + type) + ) + ) + } + is Enum -> + withEnumName(type.className) { + listOfNotNull(generateEnum(type, ctx)) + } + is Service -> + withServiceName(type.name) { + generateService( + type, + ctx, + ctx.info.context.appliedKotlinPlugin + ) + } + } +} diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/ConstructorMethodSupport.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/ConstructorMethodSupport.kt new file mode 100644 index 000000000..66a2c1f55 --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/ConstructorMethodSupport.kt @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.squareup.kotlinpoet.FunSpec +import com.squareup.kotlinpoet.LambdaTypeName +import com.squareup.kotlinpoet.asTypeName +import protokt.v1.codegen.generate.Deprecation.handleDeprecation +import protokt.v1.codegen.util.Message + +fun addConstructorFunction(msg: Message, addFunction: (FunSpec) -> Unit) { + addFunction( + FunSpec.builder(msg.className.simpleName) + .returns(msg.className) + .addParameter( + "dsl", + LambdaTypeName.get( + msg.dslClassName, + emptyList(), + Unit::class.asTypeName() + ) + ) + .addStatement("return %T().apply(dsl).build()", msg.dslClassName) + .handleDeprecation(msg) + .build() + ) +} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/Deprecation.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/Deprecation.kt similarity index 70% rename from protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/Deprecation.kt rename to protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/Deprecation.kt index b3fe0ba9a..d88cda667 100644 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/Deprecation.kt +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/Deprecation.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,17 +13,18 @@ * limitations under the License. */ -package com.toasttab.protokt.codegen.impl +package protokt.v1.codegen.generate import com.squareup.kotlinpoet.AnnotationSpec +import com.squareup.kotlinpoet.FileSpec +import com.squareup.kotlinpoet.FunSpec import com.squareup.kotlinpoet.PropertySpec import com.squareup.kotlinpoet.TypeSpec -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.annotators.deprecated -import com.toasttab.protokt.codegen.protoc.Enum -import com.toasttab.protokt.codegen.protoc.Message -import com.toasttab.protokt.codegen.protoc.Oneof -import com.toasttab.protokt.codegen.protoc.StandardField +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.util.Enum +import protokt.v1.codegen.util.Message +import protokt.v1.codegen.util.Oneof +import protokt.v1.codegen.util.StandardField object Deprecation { fun enclosingDeprecation(ctx: Context): Boolean { @@ -41,8 +42,8 @@ object Deprecation { options.default.deprecated || fields.any { when (it) { - is StandardField -> it.deprecated - is Oneof -> it.fields.any(StandardField::deprecated) + is StandardField -> it.options.default.deprecated + is Oneof -> it.fields.any { f -> f.options.default.deprecated } } } || nestedTypes.any { @@ -86,6 +87,17 @@ object Deprecation { } } + fun FunSpec.Builder.handleDeprecation(msg: Message) = + apply { + if (msg.options.default.deprecated) { + addAnnotation( + AnnotationSpec.builder(Deprecated::class) + .handleDeprecationMessage(msg.options.protokt.deprecationMessage) + .build() + ) + } + } + private fun AnnotationSpec.Builder.handleDeprecationMessage(message: String) = apply { if (message.isNotEmpty()) { @@ -95,17 +107,12 @@ object Deprecation { } } - fun TypeSpec.Builder.handleDeprecationSuppression(hasDeprecation: Boolean, ctx: Context) { - if (hasDeprecation && !enclosingDeprecation(ctx)) { - addDeprecationSuppression() - } + fun FileSpec.Builder.addDeprecationSuppression() { + addAnnotation(deprecationSuppression()) } - fun TypeSpec.Builder.addDeprecationSuppression() { - addAnnotation( - AnnotationSpec.builder(Suppress::class) - .addMember("DEPRECATION".embed()) - .build() - ) - } + private fun deprecationSuppression() = + AnnotationSpec.builder(Suppress::class) + .addMember("DEPRECATION".embed()) + .build() } diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/DeserializerGenerator.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/DeserializerGenerator.kt new file mode 100644 index 000000000..ea495850b --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/DeserializerGenerator.kt @@ -0,0 +1,289 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.squareup.kotlinpoet.AnnotationSpec +import com.squareup.kotlinpoet.ClassName +import com.squareup.kotlinpoet.CodeBlock +import com.squareup.kotlinpoet.KModifier +import com.squareup.kotlinpoet.LambdaTypeName +import com.squareup.kotlinpoet.MemberName +import com.squareup.kotlinpoet.ParameterizedTypeName +import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy +import com.squareup.kotlinpoet.TypeSpec +import com.squareup.kotlinpoet.asClassName +import com.squareup.kotlinpoet.asTypeName +import com.squareup.kotlinpoet.buildCodeBlock +import com.squareup.kotlinpoet.withIndent +import protokt.v1.AbstractKtDeserializer +import protokt.v1.KtMessageDeserializer +import protokt.v1.UnknownFieldSet +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.generate.Wrapper.interceptRead +import protokt.v1.codegen.generate.Wrapper.mapKeyConverter +import protokt.v1.codegen.generate.Wrapper.mapValueConverter +import protokt.v1.codegen.generate.Wrapper.wrapField +import protokt.v1.codegen.generate.Wrapper.wrapper +import protokt.v1.codegen.util.FieldType +import protokt.v1.codegen.util.FieldType.Enum +import protokt.v1.codegen.util.FieldType.SFixed32 +import protokt.v1.codegen.util.FieldType.SFixed64 +import protokt.v1.codegen.util.FieldType.SInt32 +import protokt.v1.codegen.util.FieldType.SInt64 +import protokt.v1.codegen.util.FieldType.UInt32 +import protokt.v1.codegen.util.FieldType.UInt64 +import protokt.v1.codegen.util.Message +import protokt.v1.codegen.util.Oneof +import protokt.v1.codegen.util.StandardField +import protokt.v1.codegen.util.Tag + +fun generateDeserializer(msg: Message, ctx: Context, properties: List) = + DeserializerGenerator(msg, ctx, properties).generate() + +private class DeserializerGenerator( + private val msg: Message, + private val ctx: Context, + private val properties: List +) { + fun generate(): TypeSpec { + val deserializerInfo = deserializerInfo() + + return TypeSpec.companionObjectBuilder(msg.deserializerClassName.simpleName) + .superclass( + AbstractKtDeserializer::class + .asTypeName() + .parameterizedBy(msg.className) + ) + .addFunction( + buildFunSpec("deserialize") { + addModifiers(KModifier.OVERRIDE) + addParameter("deserializer", KtMessageDeserializer::class) + returns(msg.className) + if (properties.isNotEmpty()) { + properties.forEach { + addStatement("var %L", declareDeserializeVar(it)) + } + } + addStatement("var·unknownFields:·%T?·=·null\n", UnknownFieldSet.Builder::class) + beginControlFlow("while (true)") + beginControlFlow("when (deserializer.readTag())") + val constructor = + buildCodeBlock { + add("0·->·return·%T(\n", msg.className) + withIndent { + constructorLines(properties).forEach(::add) + } + add("\n)") + } + addStatement("%L", constructor) + deserializerInfo.forEach { + addStatement( + "%L -> %N = %L", + it.tag, + it.fieldName, + it.value + ) + } + val unknownFieldBuilder = + buildCodeBlock { + add("(unknownFields ?: %T.Builder())", UnknownFieldSet::class) + beginControlFlow(".also") + add("it.add(deserializer.readUnknown())\n") + endControlFlowWithoutNewline() + } + addStatement("else -> unknownFields =\n%L", unknownFieldBuilder) + endControlFlow() + endControlFlow() + } + ) + .apply { + msg.nestedTypes + .filterIsInstance() + .filterNot { it.mapEntry } + .forEach { addConstructorFunction(it, ::addFunction) } + } + .addFunction( + buildFunSpec("invoke") { + returns(msg.className) + addAnnotation( + AnnotationSpec.builder(Deprecated::class) + .addMember("for ABI backwards compatibility only".embed()) + .addMember( + CodeBlock.of( + "level = %M", + MemberName(DeprecationLevel::class.asClassName(), DeprecationLevel.HIDDEN.name) + ) + ) + .build() + ) + addParameter( + "dsl", + LambdaTypeName.get( + msg.dslClassName, + emptyList(), + Unit::class.asTypeName() + ) + ) + addStatement("return %T().apply(dsl).build()", msg.dslClassName) + build() + } + ) + .build() + } + + private fun declareDeserializeVar(p: PropertyInfo): CodeBlock { + val initialState = deserializeVarInitialState(p) + return if (p.fieldType == FieldType.Message || p.repeated || p.oneof || p.nullable || p.wrapped) { + CodeBlock.of("%N: %T = %L", p.name, deserializeType(p), initialState) + } else { + CodeBlock.of("%N = %L", p.name, initialState) + } + } + + private fun deserializeType(p: PropertyInfo) = + if (p.repeated || p.map) { + p.deserializeType as ParameterizedTypeName + ClassName(p.deserializeType.rawType.packageName, "Mutable" + p.deserializeType.rawType.simpleName) + .parameterizedBy(p.deserializeType.typeArguments) + .copy(nullable = true) + } else { + p.deserializeType + } + + private fun constructorLines(properties: List) = + properties.map { CodeBlock.of("%L,\n", wrapDeserializedValueForConstructor(it)) } + + CodeBlock.of("%T.from(unknownFields)", UnknownFieldSet::class) + + private class DeserializerInfo( + val tag: Int, + val fieldName: String, + val value: CodeBlock + ) + + private fun deserializerInfo(): List = + msg.flattenedSortedFields().flatMap { (field, oneOf) -> + field.tagList.map { tag -> + DeserializerInfo( + tag.value, + oneOf?.fieldName ?: field.fieldName, + oneOf?.let { oneofDes(it, field) } ?: deserialize(field, ctx, tag is Tag.Packed) + ) + } + } + + private val StandardField.tagList + get() = + tag.let { + if (repeated) { + // For repeated fields, catch the other (packed or non-packed) + // possibility. + keepIfDifferent( + it, + if (packed) { + Tag.Unpacked(number, type.wireType) + } else { + Tag.Packed(number) + } + ) + } else { + listOf(it) + } + }.sorted() + + private fun keepIfDifferent(tag: Tag, other: Tag) = + if (tag.value == other.value) { + listOf(tag) + } else { + listOf(tag, other) + } + + private fun Message.flattenedSortedFields() = + fields.flatMap { + when (it) { + is StandardField -> listOf(FlattenedField(it)) + is Oneof -> it.fields.map { f -> FlattenedField(f, it) } + } + }.sortedBy { it.field.number } + + private data class FlattenedField( + val field: StandardField, + val oneof: Oneof? = null + ) + + private fun oneofDes(f: Oneof, ff: StandardField) = + CodeBlock.of("%T(%L)", f.qualify(ff), deserialize(ff, ctx)) +} + +fun deserialize(f: StandardField, ctx: Context, packed: Boolean = false): CodeBlock { + val read = CodeBlock.of("deserializer.%L", interceptRead(f, f.readFn())) + val wrappedRead = wrapper(f, ctx)?.let { wrapField(it, read) } ?: read + + return when { + f.map -> deserializeMap(f, ctx, read) + f.repeated -> + buildCodeBlock { + add("\n(%N ?: mutableListOf())", f.fieldName) + beginControlFlow(".apply") + beginControlFlow("deserializer.readRepeated($packed)") + add("add(%L)\n", wrappedRead) + endControlFlow() + endControlFlowWithoutNewline() + } + else -> wrappedRead + } +} + +private fun deserializeMap(f: StandardField, ctx: Context, read: CodeBlock): CodeBlock { + val key = + mapKeyConverter(f, ctx) + ?.let { wrapField(it, CodeBlock.of("it.key")) } + ?: CodeBlock.of("it.key") + + val value = + mapValueConverter(f, ctx) + ?.let { wrapField(it, CodeBlock.of("it.value")) } + ?: CodeBlock.of("it.value") + + return buildCodeBlock { + add("\n(%N ?: mutableMapOf())", f.fieldName) + beginControlFlow(".apply") + beginControlFlow("deserializer.readRepeated(false)") + add(read) + beginControlFlow(".let") + add("put(%L, %L)\n", key, value) + endControlFlow() + endControlFlow() + endControlFlowWithoutNewline() + } +} + +private fun StandardField.readFn() = + when (type) { + SFixed32 -> CodeBlock.of("readSFixed32()") + SFixed64 -> CodeBlock.of("readSFixed64()") + SInt32 -> CodeBlock.of("readSInt32()") + SInt64 -> CodeBlock.of("readSInt64()") + UInt32 -> CodeBlock.of("readUInt32()") + UInt64 -> CodeBlock.of("readUInt64()") + // by default for DOUBLE we get readDouble, for BOOL we get readBool(), etc. + else -> buildCodeBlock { + add("read${type::class.simpleName}(") + if (type == Enum || type == FieldType.Message) { + add("%T", className) + } + add(")") + } + } diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/DeserializerSupport.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/DeserializerSupport.kt new file mode 100644 index 000000000..e2176570e --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/DeserializerSupport.kt @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2021 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.squareup.kotlinpoet.CodeBlock +import com.squareup.kotlinpoet.buildCodeBlock +import com.squareup.kotlinpoet.withIndent +import protokt.v1.codegen.util.FieldType + +fun deserializeVarInitialState(p: PropertyInfo) = + if (p.repeated || p.wrapped || p.nullable || p.fieldType == FieldType.Message) { + CodeBlock.of("null") + } else { + p.defaultValue + } + +fun wrapDeserializedValueForConstructor(p: PropertyInfo) = + if (p.nonNullOption) { + buildCodeBlock { + beginControlFlow("requireNotNull(%N)", p.name) + add("StringBuilder(\"%N\")\n", p.name) + withIndent { + add( + ( + ".append(\" specified nonnull with (protokt." + + "${if (p.oneof) "oneof" else "property"}).non_null " + + "but was null\")" + ).bindSpaces() + ) + add("\n") + } + endControlFlowWithoutNewline() + } + } else { + if (p.map) { + CodeBlock.of("%M(%N)", runtimeFunction("finishMap"), p.name) + } else if (p.repeated) { + CodeBlock.of("%M(%N)", runtimeFunction("finishList"), p.name) + } else { + buildCodeBlock { + add("%N", p.name) + if (p.wrapped && !p.nullable) { + add(" ?: %L", p.defaultValue) + } + } + } + } diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/DslAnnotator.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/DslGenerator.kt similarity index 55% rename from protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/DslAnnotator.kt rename to protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/DslGenerator.kt index f4c7601c1..8924287ca 100644 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/DslAnnotator.kt +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/DslGenerator.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,9 +13,8 @@ * limitations under the License. */ -package com.toasttab.protokt.codegen.annotators +package protokt.v1.codegen.generate -import com.squareup.kotlinpoet.AnnotationSpec import com.squareup.kotlinpoet.CodeBlock import com.squareup.kotlinpoet.FunSpec import com.squareup.kotlinpoet.LambdaTypeName @@ -23,65 +22,52 @@ import com.squareup.kotlinpoet.PropertySpec import com.squareup.kotlinpoet.TypeSpec import com.squareup.kotlinpoet.asTypeName import com.squareup.kotlinpoet.buildCodeBlock -import com.toasttab.protokt.codegen.impl.runtimeFunction -import com.toasttab.protokt.codegen.protoc.Message -import com.toasttab.protokt.codegen.template.Message.Message.PropertyInfo -import com.toasttab.protokt.rt.UnknownFieldSet +import com.squareup.kotlinpoet.withIndent +import protokt.v1.KtDsl +import protokt.v1.UnknownFieldSet +import protokt.v1.codegen.generate.Deprecation.handleDeprecation +import protokt.v1.codegen.util.FieldType +import protokt.v1.codegen.util.Message -class DslAnnotator( +internal fun TypeSpec.Builder.handleDsl(msg: Message, properties: List) = + apply { DslGenerator(msg, properties).addDsl(this) } + +private class DslGenerator( private val msg: Message, private val properties: List ) { fun addDsl(builder: TypeSpec.Builder) { builder.addFunction( FunSpec.builder("copy") - .returns(msg.typeName) + .returns(msg.className) .addParameter( "dsl", LambdaTypeName.get( - msg.dslTypeName, + msg.dslClassName, emptyList(), Unit::class.asTypeName() ) ) .addCode( - ( - "return " + msg.name + ".Deserializer {\n" + - if (properties.isEmpty()) { - "" - } else { - dslLines() + "\n" - } + - """ - | unknownFields = this@${msg.name}.unknownFields - | dsl() - |} - """.trimMargin() - ).replace(" ", "·") + buildCodeBlock { + beginControlFlow("return %T().apply", msg.dslClassName) + dslLines().forEach { add("%L\n", it) } + addStatement("unknownFields = this@%L.unknownFields", msg.className.simpleName) + addStatement("dsl()") + endControlFlowWithoutNewline() + add(".build()") + } ) .build() ) builder.addType( - TypeSpec.classBuilder(msg.name + "Dsl") + TypeSpec.classBuilder(msg.dslClassName) + .addAnnotation(KtDsl::class) .addProperties( properties.map { - PropertySpec.builder(it.name.removePrefix("`").removeSuffix("`"), it.dslPropertyType) + PropertySpec.builder(it.name, it.dslPropertyType) .mutable(true) - .apply { - if (it.deprecation != null) { - addAnnotation( - AnnotationSpec.builder(Deprecated::class) - .apply { - if (it.deprecation.message != null) { - addMember("\"" + it.deprecation.message + "\"") - } else { - addMember("\"deprecated in proto\"") - } - } - .build() - ) - } - } + .handleDeprecation(it.deprecation) .apply { if (it.map) { setter( @@ -103,7 +89,7 @@ class DslAnnotator( when { it.map -> CodeBlock.of("emptyMap()") it.repeated -> CodeBlock.of("emptyList()") - it.fieldType == "MESSAGE" || it.wrapped || it.nullable -> CodeBlock.of("null") + it.fieldType == FieldType.Message || it.wrapped || it.nullable -> CodeBlock.of("null") else -> it.defaultValue } ) @@ -113,17 +99,26 @@ class DslAnnotator( .addProperty( PropertySpec.builder("unknownFields", UnknownFieldSet::class) .mutable(true) - .initializer("UnknownFieldSet.empty()") + .initializer("%T.empty()", UnknownFieldSet::class) .build() ) .addFunction( FunSpec.builder("build") - .returns(msg.typeName) + .returns(msg.className) .addCode( if (properties.isEmpty()) { - CodeBlock.of("return %L(unknownFields)", msg.name) + CodeBlock.of("return %T(unknownFields)", msg.className) } else { - CodeBlock.of("return %L(%L %L)", msg.name, buildLines(), "unknownFields") + buildCodeBlock { + add("return %T(\n", msg.className) + withIndent { + properties + .map(::wrapDeserializedValueForConstructor) + .forEach { add("%L,\n", it) } + add("unknownFields\n") + } + add(")") + } } ) .build() @@ -133,17 +128,12 @@ class DslAnnotator( } private fun dslLines() = - properties.joinToString("\n") { - " ${it.name} = this@${msg.name}.${it.name}" - } - - private fun buildLines() = - buildCodeBlock { - properties.forEach { - add("%L,\n", deserializeWrapper(it)) - } + properties.map { + CodeBlock.of( + "%N = this@%L.%N", + it.name, + msg.className.simpleName, + it.name + ) } } - -fun TypeSpec.Builder.handleDsl(msg: Message, properties: List) = - apply { DslAnnotator(msg, properties).addDsl(this) } diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/EnumBuilder.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/EnumGenerator.kt similarity index 60% rename from protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/EnumBuilder.kt rename to protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/EnumGenerator.kt index 5bbb5648c..28a7b817c 100644 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/EnumBuilder.kt +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/EnumGenerator.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * limitations under the License. */ -package com.toasttab.protokt.codegen.impl +package protokt.v1.codegen.generate import com.google.protobuf.DescriptorProtos.DescriptorProto.ENUM_TYPE_FIELD_NUMBER import com.google.protobuf.DescriptorProtos.EnumDescriptorProto.VALUE_FIELD_NUMBER @@ -22,53 +22,48 @@ import com.squareup.kotlinpoet.KModifier import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy import com.squareup.kotlinpoet.TypeSpec import com.squareup.kotlinpoet.asTypeName -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.annotators.MessageDocumentationAnnotator.baseLocation -import com.toasttab.protokt.codegen.annotators.cleanDocumentation -import com.toasttab.protokt.codegen.annotators.formatDoc -import com.toasttab.protokt.codegen.impl.Deprecation.handleDeprecation -import com.toasttab.protokt.codegen.impl.Deprecation.handleDeprecationSuppression -import com.toasttab.protokt.codegen.impl.Deprecation.hasDeprecation -import com.toasttab.protokt.codegen.protoc.Enum -import com.toasttab.protokt.rt.KtEnum -import com.toasttab.protokt.rt.KtEnumDeserializer +import com.squareup.kotlinpoet.buildCodeBlock +import protokt.v1.KtEnum +import protokt.v1.KtEnumDeserializer +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.generate.Deprecation.handleDeprecation +import protokt.v1.codegen.util.Enum -class EnumBuilder( +fun generateEnum(e: Enum, ctx: Context) = + if (ctx.info.context.generateTypes) { + EnumGenerator(e, ctx).generate() + } else { + null + } + +private class EnumGenerator( val e: Enum, val ctx: Context ) { private val enumPath = listOf(ENUM_TYPE_FIELD_NUMBER, e.index) - fun build() = - TypeSpec.classBuilder(e.name).apply { + fun generate() = + TypeSpec.classBuilder(e.className).apply { addModifiers(KModifier.SEALED) superclass(KtEnum::class) addKDoc() handleDeprecation(e.options.default.deprecated, e.options.protokt.deprecationMessage) - handleDeprecationSuppression(e.hasDeprecation, ctx) addConstructor() addEnumValues() addDeserializer() }.build() private fun TypeSpec.Builder.addKDoc() { - val documentation = baseLocation(ctx, enumPath).cleanDocumentation() - if (documentation.isNotEmpty()) { - addKdoc(formatDoc(documentation)) - } + baseLocation(ctx, enumPath) + ?.cleanDocumentation() + ?.let { addKdoc(formatDoc(it)) } } private fun TypeSpec.Builder.addKDoc(value: Enum.Value) = apply { - val documentation = - baseLocation( - ctx, - enumPath + listOf(VALUE_FIELD_NUMBER, value.index) - ).cleanDocumentation() - - if (documentation.isNotEmpty()) { - addKdoc(formatDoc(documentation)) - } + baseLocation(ctx, enumPath + listOf(VALUE_FIELD_NUMBER, value.index)) + ?.cleanDocumentation() + ?.let { addKdoc(formatDoc(it)) } } private fun TypeSpec.Builder.addConstructor() { @@ -86,7 +81,7 @@ class EnumBuilder( addTypes( e.values.map { TypeSpec.objectBuilder(it.valueName).apply { - superclass(e.typeName) + superclass(e.className) addKDoc(it) addSuperclassConstructorParameter(it.number.toString()) addSuperclassConstructorParameter("\"${it.valueName}\"") @@ -96,7 +91,7 @@ class EnumBuilder( ) addType( TypeSpec.classBuilder("UNRECOGNIZED") - .superclass(e.typeName) + .superclass(e.className) .addSuperclassConstructorParameter("value") .addSuperclassConstructorParameter("\"UNRECOGNIZED\"") .primaryConstructor( @@ -110,26 +105,26 @@ class EnumBuilder( private fun TypeSpec.Builder.addDeserializer() { addType( - TypeSpec.companionObjectBuilder("Deserializer") + TypeSpec.companionObjectBuilder(e.deserializerClassName.simpleName) .addSuperinterface( KtEnumDeserializer::class .asTypeName() - .parameterizedBy(e.typeName) + .parameterizedBy(e.className) ) .addFunction( - FunSpec.builder("from") - .addModifiers(KModifier.OVERRIDE) - .returns(e.typeName) - .addParameter("value", Int::class) - .addCode( - """ - |return when (value) { - |${cases()} - | else -> UNRECOGNIZED(value) - |} - """.bindMargin() + buildFunSpec("from") { + addModifiers(KModifier.OVERRIDE) + returns(e.className) + addParameter("value", Int::class) + addCode( + buildCodeBlock { + beginControlFlow("return when (value)") + cases().forEach(::addStatement) + addStatement("else -> UNRECOGNIZED(value)") + endControlFlowWithoutNewline() + } ) - .build() + } ) .build() ) @@ -138,5 +133,5 @@ class EnumBuilder( private fun cases() = e.values .distinctBy { it.number } - .joinToString("\n") { " " + it.number + " -> " + it.valueName } + .map { "${it.number} -> ${it.valueName}" } } diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/descriptor/FileDescriptorEncoding.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/FileDescriptorEncoding.kt similarity index 97% rename from protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/descriptor/FileDescriptorEncoding.kt rename to protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/FileDescriptorEncoding.kt index 19887adff..edd46adc1 100644 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/descriptor/FileDescriptorEncoding.kt +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/FileDescriptorEncoding.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * limitations under the License. */ -package com.toasttab.protokt.codegen.descriptor +package protokt.v1.codegen.generate import com.google.protobuf.DescriptorProtos.FileDescriptorProto diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/descriptor/FileDescriptorResolver.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/FileDescriptorResolver.kt similarity index 71% rename from protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/descriptor/FileDescriptorResolver.kt rename to protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/FileDescriptorResolver.kt index 99c399d5c..694339f18 100644 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/descriptor/FileDescriptorResolver.kt +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/FileDescriptorResolver.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,23 +13,25 @@ * limitations under the License. */ -package com.toasttab.protokt.codegen.descriptor +package protokt.v1.codegen.generate import com.google.protobuf.DescriptorProtos import com.squareup.kotlinpoet.AnnotationSpec import com.squareup.kotlinpoet.ClassName +import com.squareup.kotlinpoet.CodeBlock import com.squareup.kotlinpoet.FunSpec import com.squareup.kotlinpoet.PropertySpec import com.squareup.kotlinpoet.TypeName import com.squareup.kotlinpoet.TypeSpec -import com.toasttab.protokt.codegen.impl.bindMargin -import com.toasttab.protokt.codegen.impl.embed -import com.toasttab.protokt.codegen.impl.namedCodeBlock -import com.toasttab.protokt.codegen.protoc.Enum -import com.toasttab.protokt.codegen.protoc.Message -import com.toasttab.protokt.codegen.protoc.Protocol -import com.toasttab.protokt.codegen.protoc.TopLevelType -import com.toasttab.protokt.rt.KtGeneratedFileDescriptor +import com.squareup.kotlinpoet.buildCodeBlock +import com.squareup.kotlinpoet.joinToCode +import com.squareup.kotlinpoet.withIndent +import protokt.v1.KtGeneratedFileDescriptor +import protokt.v1.codegen.util.Enum +import protokt.v1.codegen.util.Message +import protokt.v1.codegen.util.ProtoFileContents +import protokt.v1.codegen.util.TopLevelType +import protokt.v1.codegen.util.protoktV1GoogleProto class FileDescriptorInfo( val fdp: TypeSpec, @@ -38,43 +40,36 @@ class FileDescriptorInfo( class FileDescriptorResolver private constructor( - private val protocol: Protocol + private val contents: ProtoFileContents ) { - private val ctx = protocol.desc.context - - private fun resolveFileDescriptor(): FileDescriptorInfo? { - if (ctx.lite || ctx.onlyGenerateGrpc) { - return null - } + private val ctx = contents.info.context + private fun resolveFileDescriptor(): FileDescriptorInfo { val dependencies = dependencies() val type = TypeSpec.objectBuilder(ctx.fileDescriptorObjectName) .addAnnotation(KtGeneratedFileDescriptor::class) + .addAnnotation(@Suppress("DEPRECATION") com.toasttab.protokt.rt.KtGeneratedFileDescriptor::class) .addProperty( - PropertySpec.builder("descriptor", ClassName("com.toasttab.protokt", "FileDescriptor")) + PropertySpec.builder("descriptor", ClassName(protoktV1GoogleProto, "FileDescriptor")) .delegate( - namedCodeBlock( - """ - |lazy { - | val descriptorData = arrayOf( - | %descriptorData:L - | ) - | - | %fileDescriptor:T.buildFrom( - | descriptorData, - | listOf( - | ${dependencyLines(dependencies)} - | ) - | ) - |} - """.bindMargin(), - mapOf( - "descriptorData" to descriptorLines(), - "fileDescriptor" to ClassName("com.toasttab.protokt", "FileDescriptor") - ) + dependencies.withIndex().associateBy { "param${it.index}" }.mapValues { it.value.value } - ) + buildCodeBlock { + beginControlFlow("lazy") + add("val descriptorData = arrayOf(\n") + withIndent { add(descriptorLines()) } + add("\n)\n\n") + + add("%T.buildFrom(\n", ClassName(protoktV1GoogleProto, "FileDescriptor")) + withIndent { + add("descriptorData,\n") + add("listOf(\n") + withIndent { add(dependencyLines(dependencies)) } + add("\n)") + } + add("\n)\n") + endControlFlowWithoutNewline() + } ).build() ) .build() @@ -85,9 +80,13 @@ private constructor( } private fun descriptorLines() = - fileDescriptorParts().joinToString(",\n") { - " " + it.joinToString(" +\n ") { line -> line.embed() } - } + fileDescriptorParts() + .map { arrayParts -> + arrayParts + .map { CodeBlock.of("\"%L\"", it) } + .joinToCode(" +\n") + } + .joinToCode(",\n") private fun fileDescriptorParts() = encodeFileDescriptor( @@ -99,7 +98,9 @@ private constructor( ) private fun dependencyLines(dependencies: List) = - dependencies.withIndex().joinToString(",\n") { "%param${it.index}:T.descriptor" } + dependencies + .map { CodeBlock.of("%T.descriptor", it) } + .joinToCode(",\n") private fun clearJsonInfo(fileDescriptorProto: DescriptorProtos.FileDescriptorProto) = fileDescriptorProto.toBuilder() @@ -138,16 +139,16 @@ private constructor( } }.map { ClassName( - ctx.allPackagesByFileName.getValue(it).toString(), - ctx.allDescriptorClassNamesByDescriptorName.getValue(it) + ctx.allPackagesByFileName.getValue(it), + ctx.allDescriptorClassNamesByFileName.getValue(it) ) } private fun enumDescriptorExtensionProperties() = - protocol.types.flatMap { findEnums(emptyList(), it) } + contents.types.flatMap { findEnums(emptyList(), it) } .map { (enum, containingTypes) -> - PropertySpec.builder("descriptor", ClassName("com.toasttab.protokt", "EnumDescriptor")) - .receiver(enum.deserializerTypeName) + PropertySpec.builder("descriptor", ClassName(protoktV1GoogleProto, "EnumDescriptor")) + .receiver(enum.deserializerClassName) .getter( FunSpec.getterBuilder() .addCode( @@ -191,10 +192,10 @@ private constructor( m.nestedTypes.flatMap { findEnums(enclosingMessages, it) } private fun messageDescriptorExtensionProperties() = - protocol.types.flatMap { findMessages(emptyList(), it) } + contents.types.flatMap { findMessages(emptyList(), it) } .map { (msg, containingTypes) -> - PropertySpec.builder("descriptor", ClassName("com.toasttab.protokt", "Descriptor")) - .receiver(msg.deserializerTypeName) + PropertySpec.builder("descriptor", ClassName(protoktV1GoogleProto, "Descriptor")) + .receiver(msg.deserializerClassName) .getter( FunSpec.getterBuilder() .addCode( @@ -243,15 +244,15 @@ private constructor( private fun qualification(enclosingMessages: List) = if (enclosingMessages.isNotEmpty()) { - enclosingMessages.joinToString(".") { it.name } + "." + enclosingMessages.joinToString(".") { it.className.simpleName } + "." } else { null } companion object { - fun resolveFileDescriptor(protocol: Protocol) = - if (protocol.types.isNotEmpty()) { - FileDescriptorResolver(protocol).resolveFileDescriptor() + fun resolveFileDescriptor(contents: ProtoFileContents) = + if (contents.types.isNotEmpty()) { + FileDescriptorResolver(contents).resolveFileDescriptor() } else { null } diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/FileGenerator.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/FileGenerator.kt new file mode 100644 index 000000000..da5cea04c --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/FileGenerator.kt @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.squareup.kotlinpoet.FileSpec +import protokt.v1.codegen.generate.Deprecation.addDeprecationSuppression +import protokt.v1.codegen.util.Message +import protokt.v1.codegen.util.ProtoFileContents + +fun generateFile(contents: ProtoFileContents) = + FileGenerator(contents).generate() + +private class FileGenerator( + private val contents: ProtoFileContents +) { + fun generate(): FileSpec? { + val descs = CodeGenerator.generate(contents) + + val builder = + FileSpec.builder( + contents.info.kotlinPackage, + fileName(contents) + ).apply { + addDeprecationSuppression() + // https://github.com/square/kotlinpoet/pull/533 + addFileComment( + """ + Generated by protokt version ${contents.info.context.protoktVersion}. Do not modify. + Source: ${contents.info.name} + """.trimIndent() + ) + indent(" ") + } + + var anyCodeAdded = false + + descs.forEach { + anyCodeAdded = true + builder.addType(it.typeSpec) + } + + descs + .map { it.rawType } + .filterIsInstance() + .forEach { + anyCodeAdded = true + addConstructorFunction(it, builder::addFunction) + } + + if (contents.info.context.generateDescriptors) { + val fileDescriptorInfo = FileDescriptorResolver.resolveFileDescriptor(contents) + + if (fileDescriptorInfo != null) { + anyCodeAdded = true + builder.addType(fileDescriptorInfo.fdp) + fileDescriptorInfo.properties.forEach(builder::addProperty) + } + } + + return if (anyCodeAdded) builder.build() else null + } +} + +private fun fileName(contents: ProtoFileContents): String { + val pkg = contents.info.kotlinPackage + val name = contents.info.name + val dir = pkg.replace('.', '/') + '/' + val fileNameBase = name.substringAfterLast('/').removeSuffix(".proto") + + return dir + fileNameBase + suffixes(contents).joinToString("") + ".kt" +} + +private fun suffixes(contents: ProtoFileContents): List { + val suffixes = mutableListOf() + if (!contents.info.context.generateTypes) { + if (contents.info.context.generateDescriptors) { + suffixes.add("_descriptors") + } + if (contents.info.context.generateGrpcDescriptors) { + suffixes.add("_grpc") + } + if (contents.info.context.generateGrpcKotlinStubs) { + suffixes.add("_grpc_kotlin") + } + } + return suffixes +} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/Implements.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/Implements.kt similarity index 57% rename from protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/Implements.kt rename to protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/Implements.kt index 36f8e02d0..23fe0331b 100644 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/Implements.kt +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/Implements.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,40 +13,30 @@ * limitations under the License. */ -package com.toasttab.protokt.codegen.impl +package protokt.v1.codegen.generate import com.squareup.kotlinpoet.ClassName import com.squareup.kotlinpoet.TypeSpec -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.annotators.OneofAnnotator -import com.toasttab.protokt.codegen.impl.ClassLookup.getClass -import com.toasttab.protokt.codegen.model.PClass -import com.toasttab.protokt.codegen.model.possiblyQualify -import com.toasttab.protokt.codegen.protoc.Message -import com.toasttab.protokt.codegen.protoc.StandardField +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.util.Message +import protokt.v1.codegen.util.StandardField -internal object Implements { +object Implements { fun StandardField.overrides( ctx: Context, msg: Message ) = msg.superInterface(ctx) - ?.let { classIncludesProperty(it, fieldName, ctx) } + ?.let { fieldName in ctx.info.context.classLookup.properties(it) } ?: false - private fun classIncludesProperty(pClass: PClass, prop: String, ctx: Context) = - getClass(pClass, ctx.desc.context) - .members.map { m -> m.name } - .contains(prop) - - fun TypeSpec.Builder.handleSuperInterface(options: OneofAnnotator.Options, v: OneofAnnotator.Info? = null) = + fun TypeSpec.Builder.handleSuperInterface(implements: ClassName?, v: OneofGeneratorInfo? = null) = apply { - if (options.implements != null) { - // TODO: qualify this with the package or allow it to be literal? + if (implements != null) { if (v == null) { - addSuperinterface(ClassName.bestGuess(options.implements)) + addSuperinterface(implements) } else { - addSuperinterface(ClassName.bestGuess(options.implements), v.fieldName) + addSuperinterface(implements, v.fieldName) } } } @@ -61,7 +51,7 @@ internal object Implements { msg.options.protokt.implements.substringAfter(" by ") ) } else { - addSuperinterface(msg.superInterface(ctx)!!.toTypeName()) + addSuperinterface(msg.superInterface(ctx)!!) } } } @@ -72,7 +62,7 @@ internal object Implements { private fun Message.superInterface(ctx: Context) = options.protokt.implements.let { if (it.isNotEmpty() && !it.delegates()) { - PClass.fromName(it).possiblyQualify(ctx.desc.kotlinPackage) + inferClassName(it, ctx) } else { null } diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/KotlinPoetUtil.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/KotlinPoetUtil.kt similarity index 70% rename from protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/KotlinPoetUtil.kt rename to protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/KotlinPoetUtil.kt index 3150897b1..7d58e7f7b 100644 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/KotlinPoetUtil.kt +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/KotlinPoetUtil.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,14 +13,17 @@ * limitations under the License. */ -package com.toasttab.protokt.codegen.impl +package protokt.v1.codegen.generate +import com.squareup.kotlinpoet.ClassName import com.squareup.kotlinpoet.CodeBlock import com.squareup.kotlinpoet.FunSpec import com.squareup.kotlinpoet.KModifier import com.squareup.kotlinpoet.MemberName import com.squareup.kotlinpoet.PropertySpec import com.squareup.kotlinpoet.TypeName +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.util.protoktV1 import kotlin.reflect.KClass fun String.embed() = @@ -29,12 +32,6 @@ fun String.embed() = fun String.bindSpaces() = replace(" ", "·") -fun String.bindMargin() = - trimMargin().bindSpaces() - -fun String.bindIndent() = - trimIndent().bindSpaces() - fun constructorProperty(name: String, type: KClass<*>, override: Boolean = false) = PropertySpec.builder(name, type).apply { initializer(name) @@ -58,4 +55,21 @@ fun buildFunSpec(name: String, funSpecBuilder: FunSpec.Builder.() -> Unit): FunS fun namedCodeBlock(format: String, arguments: Map) = CodeBlock.builder().addNamed(format, arguments).build() -fun runtimeFunction(name: String) = MemberName("com.toasttab.protokt.rt", name) +fun runtimeFunction(name: String) = MemberName(protoktV1, name) + +fun CodeBlock.Builder.endControlFlowWithoutNewline() { + unindent() + add("}") +} + +fun inferClassName(className: String, ctx: Context) = + inferClassName(className, ctx.info.kotlinPackage) + +fun inferClassName(className: String, pkg: String): ClassName { + val inferred = ClassName.bestGuess(className) + return if (inferred.packageName == "") { + ClassName(pkg, className.split(".")) + } else { + inferred + } +} diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/MapEntryGenerator.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/MapEntryGenerator.kt new file mode 100644 index 000000000..1464b50fe --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/MapEntryGenerator.kt @@ -0,0 +1,191 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.squareup.kotlinpoet.CodeBlock +import com.squareup.kotlinpoet.FunSpec +import com.squareup.kotlinpoet.KModifier +import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy +import com.squareup.kotlinpoet.PropertySpec +import com.squareup.kotlinpoet.TypeSpec +import com.squareup.kotlinpoet.asTypeName +import com.squareup.kotlinpoet.buildCodeBlock +import protokt.v1.AbstractKtDeserializer +import protokt.v1.AbstractKtMessage +import protokt.v1.KtMessage +import protokt.v1.KtMessageDeserializer +import protokt.v1.KtMessageSerializer +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.util.DESERIALIZER +import protokt.v1.codegen.util.FieldType +import protokt.v1.codegen.util.MapEntry +import protokt.v1.codegen.util.Message +import protokt.v1.codegen.util.StandardField +import kotlin.reflect.KProperty0 + +fun generateMapEntry(msg: Message, ctx: Context) = + MapEntryGenerator(msg, ctx).generate() + +private class MapEntryGenerator( + private val msg: Message, + private val ctx: Context +) { + private val key = msg.fields[0] as StandardField + private val value = msg.fields[1] as StandardField + + fun generate() = + TypeSpec.classBuilder(msg.className).apply { + addModifiers(KModifier.PRIVATE) + superclass(AbstractKtMessage::class) + addProperty(constructorProperty("key", key.className)) + addProperty(constructorProperty("value", value.className)) + addConstructor() + addMessageSize() + addSerialize() + addDeserializer() + }.build() + + private fun TypeSpec.Builder.addConstructor() { + primaryConstructor( + FunSpec.constructorBuilder() + .addParameter("key", key.className) + .addParameter("value", value.className) + .build() + ) + } + + private fun TypeSpec.Builder.addMessageSize() { + addProperty( + PropertySpec.builder(KtMessage::messageSize.name, Int::class) + .addModifiers(KModifier.OVERRIDE) + .getter( + FunSpec.getterBuilder() + .addCode( + "return·%L", + sizeOfCall( + MapEntry(key, value), + CodeBlock.of("key"), + CodeBlock.of("value") + ) + ) + .build() + ) + .build() + ) + } + + private fun TypeSpec.Builder.addSerialize() { + addFunction( + buildFunSpec("serialize") { + addModifiers(KModifier.OVERRIDE) + addParameter("serializer", KtMessageSerializer::class) + addStatement("%L", serialize(key, ctx)) + addStatement("%L", serialize(value, ctx)) + } + ) + } + + private fun TypeSpec.Builder.addDeserializer() { + val propInfo = annotateProperties(msg, ctx) + + addType( + TypeSpec.companionObjectBuilder(DESERIALIZER) + .superclass( + AbstractKtDeserializer::class + .asTypeName() + .parameterizedBy(msg.className) + ) + .addFunction( + buildFunSpec("entrySize") { + returns(Int::class) + if (key.type.sizeFn is FieldType.Method) { + addParameter("key", key.className) + } + if (value.type.sizeFn is FieldType.Method) { + addParameter("value", value.className) + } + addStatement("return %L + %L", sizeOf(key, ctx), sizeOf(value, ctx)) + } + ) + .addFunction( + buildFunSpec("deserialize") { + addModifiers(KModifier.OVERRIDE) + addParameter("deserializer", KtMessageDeserializer::class) + returns(msg.className) + addStatement("%L", deserializeVar(propInfo, ::key)) + addStatement("%L", deserializeVar(propInfo, ::value)) + addCode("\n") + beginControlFlow("while (true)") + beginControlFlow("when (deserializer.readTag())") + addStatement("%L", constructOnZero(value)) + addStatement( + "${key.tag.value} -> key = %L", + deserialize(key, ctx) + ) + addStatement( + "${value.tag.value} -> value = %L", + deserialize(value, ctx) + ) + endControlFlow() + endControlFlow() + } + ) + .build() + ) + } + + private fun deserializeVar(propInfo: List, accessor: KProperty0): CodeBlock { + val field = accessor.get() + val prop = propInfo.single { it.name == field.fieldName } + + return namedCodeBlock( + "var ${accessor.name}" + + if (field.type == FieldType.Message) { + ": %type:T" + } else { + "" + } + " = %value:L", + mapOf( + "type" to prop.deserializeType, + "value" to deserializeVarInitialState(prop) + ) + ) + } + + private fun constructOnZero(f: StandardField) = + buildCodeBlock { + add("0 -> return %T(key, value", msg.className) + if (f.type == FieldType.Message) { + add(" ?: %T{}", value.className) + } + add(")") + } +} + +fun sizeOfCall(mapEntry: MapEntry, keyStr: CodeBlock, valueStr: CodeBlock) = + if (mapEntry.key.type.sizeFn is FieldType.Method) { + if (mapEntry.value.type.sizeFn is FieldType.Method) { + CodeBlock.of("entrySize(%L,·%L)", keyStr, valueStr) + } else { + CodeBlock.of("entrySize(%L)", keyStr) + } + } else { + if (mapEntry.value.type.sizeFn is FieldType.Method) { + CodeBlock.of("entrySize(%L)", valueStr) + } else { + CodeBlock.of("entrySize()") + } + } diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/MessageDocumentationAnnotator.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/MessageDocumentationAnnotator.kt new file mode 100644 index 000000000..a0038773e --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/MessageDocumentationAnnotator.kt @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.google.protobuf.DescriptorProtos.DescriptorProto.NESTED_TYPE_FIELD_NUMBER +import com.google.protobuf.DescriptorProtos.FileDescriptorProto.MESSAGE_TYPE_FIELD_NUMBER +import com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location +import protokt.v1.codegen.generate.CodeGenerator.Context + +fun annotateMessageDocumentation(ctx: Context) = + baseLocation(ctx)?.cleanDocumentation() + +fun baseLocation(ctx: Context, extraPath: List = emptyList()) = + ctx.info.sourceCodeInfo.locationList.firstOrNull { it.pathList == basePath(ctx) + extraPath } + +private fun basePath(ctx: Context): List { + val path = mutableListOf() + + ctx.enclosing.forEachIndexed { idx, it -> + if (idx == 0) { + path.add(MESSAGE_TYPE_FIELD_NUMBER) + path.add(it.index) + } else { + path.add(NESTED_TYPE_FIELD_NUMBER) + path.add(it.index) + } + } + + return path +} + +// todo: see if an empty list passed upwards behaves the same as null, and if so, end this with a call to .orEmpty() +fun Location.cleanDocumentation(): List? = + leadingComments + .takeIf { it.isNotEmpty() } + ?.run { + substringBeforeLast("\n") + .split("\n") + .map { line -> + // Escape possibly accidentally nested comments + // + // Will not render correctly inside backticks: + // https://youtrack.jetbrains.com/issue/KT-28979 + line + .replace("/*", "/*") + .replace("*/", "*/") + } + } diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/MessageGenerator.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/MessageGenerator.kt new file mode 100644 index 000000000..fca2a46ff --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/MessageGenerator.kt @@ -0,0 +1,253 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.squareup.kotlinpoet.AnnotationSpec +import com.squareup.kotlinpoet.CodeBlock +import com.squareup.kotlinpoet.FunSpec +import com.squareup.kotlinpoet.KModifier +import com.squareup.kotlinpoet.ParameterSpec +import com.squareup.kotlinpoet.PropertySpec +import com.squareup.kotlinpoet.TypeSpec +import com.squareup.kotlinpoet.asTypeName +import com.squareup.kotlinpoet.buildCodeBlock +import protokt.v1.AbstractKtMessage +import protokt.v1.KtGeneratedMessage +import protokt.v1.UnknownFieldSet +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.generate.CodeGenerator.generate +import protokt.v1.codegen.generate.Deprecation.enclosingDeprecation +import protokt.v1.codegen.generate.Deprecation.handleDeprecation +import protokt.v1.codegen.generate.Deprecation.hasDeprecation +import protokt.v1.codegen.generate.Implements.handleSuperInterface +import protokt.v1.codegen.util.Message + +fun generateMessage(msg: Message, ctx: Context) = + if (ctx.info.context.generateTypes) { + MessageGenerator(msg, ctx).generate() + } else { + null + } + +private class MessageGenerator( + private val msg: Message, + private val ctx: Context +) { + fun generate() = + if (msg.mapEntry) { + generateMapEntry(msg, ctx) + } else { + val properties = annotateProperties(msg, ctx) + + TypeSpec.classBuilder(msg.className).apply { + annotateMessageDocumentation(ctx)?.let { addKdoc(formatDoc(it)) } + handleAnnotations() + handleConstructor(properties) + addTypes(annotateOneofs(msg, ctx)) + handleMessageSize() + addFunction(generateMessageSize(msg, ctx)) + addFunction(generateSerializer(msg, ctx)) + handleEquals(properties) + handleHashCode(properties) + handleToString(properties) + handleDsl(msg, properties) + addType(generateDeserializer(msg, ctx, properties)) + addTypes(msg.nestedTypes.flatMap { generate(it, ctx) }) + }.build() + } + + private fun TypeSpec.Builder.handleAnnotations() = apply { + addAnnotation( + AnnotationSpec.builder(KtGeneratedMessage::class) + .addMember(msg.fullProtobufTypeName.embed()) + .build() + ) + handleDeprecatedKtGeneratedMessage() + // put this back when handleDeprecatedKtGeneratedMessage() is removed + // if (suppressDeprecation()) { + // addDeprecationSuppression() + // } + handleDeprecation( + msg.options.default.deprecated, + msg.options.protokt.deprecationMessage + ) + } + + private fun TypeSpec.Builder.handleDeprecatedKtGeneratedMessage() { + addAnnotation( + @Suppress("DEPRECATION") + AnnotationSpec.builder(com.toasttab.protokt.rt.KtGeneratedMessage::class) + .addMember(msg.fullProtobufTypeName.embed()) + .build() + ) + } + + private fun TypeSpec.Builder.handleConstructor( + properties: List + ) = apply { + superclass(AbstractKtMessage::class) + addProperties( + properties.map { property -> + PropertySpec.builder(property.name, property.propertyType).apply { + initializer(property.name) + if (property.overrides) { + addModifiers(KModifier.OVERRIDE) + } + property.documentation?.let { addKdoc(formatDoc(it)) } + handleDeprecation(property.deprecation) + }.build() + } + ) + addProperty( + PropertySpec.builder("unknownFields", UnknownFieldSet::class) + .initializer("unknownFields") + .build() + ) + primaryConstructor( + FunSpec.constructorBuilder() + .addModifiers(KModifier.PRIVATE) + .addParameters(properties.map { ParameterSpec(it.name, it.propertyType) }) + .addParameter( + ParameterSpec.builder("unknownFields", UnknownFieldSet::class) + .defaultValue("%T.empty()", UnknownFieldSet::class) + .build() + ) + .build() + ) + handleSuperInterface(msg, ctx) + } + + private fun TypeSpec.Builder.handleMessageSize() = + addProperty( + PropertySpec.builder("messageSize", Int::class) + .addModifiers(KModifier.OVERRIDE) + .delegate("lazy { messageSize() }") + .build() + ) + + private fun TypeSpec.Builder.handleEquals( + properties: List + ) = + addFunction( + FunSpec.builder(Any::equals.name) + .returns(Boolean::class) + .addModifiers(KModifier.OVERRIDE) + .addParameter("other", Any::class.asTypeName().copy(nullable = true)) + .addCode( + if (properties.isEmpty()) { + CodeBlock.of( + "return other is %T && other.unknownFields == unknownFields".bindSpaces(), + msg.className + ) + } else { + buildCodeBlock { + add( + "return \nother is %T &&\n".bindSpaces(), + msg.className + ) + equalsLines(properties).forEach(::add) + add("other.unknownFields == unknownFields".bindSpaces()) + } + } + ) + .build() + ) + + private fun equalsLines(properties: List) = + properties.map { + CodeBlock.of("other.%N == %N &&\n".bindSpaces(), it.name, it.name) + } + + private fun TypeSpec.Builder.handleHashCode( + properties: List + ) = + addFunction( + FunSpec.builder(Any::hashCode.name) + .returns(Int::class) + .addModifiers(KModifier.OVERRIDE) + .addCode( + if (properties.isEmpty()) { + CodeBlock.of("return unknownFields.hashCode()") + } else { + buildCodeBlock { + addStatement("var result = unknownFields.hashCode()") + hashCodeLines(properties).forEach(::add) + addStatement("return result") + } + } + ) + .build() + ) + + private fun hashCodeLines(properties: List) = + properties.map { + CodeBlock.of("result = 31 * result + %N.hashCode()\n".bindSpaces(), it.name) + } + + private fun TypeSpec.Builder.handleToString( + properties: List + ) = + addFunction( + FunSpec.builder(Any::toString.name) + .returns(String::class) + .addModifiers(KModifier.OVERRIDE) + .addCode( + if (properties.isEmpty()) { + CodeBlock.of( + "return \"%L(\${${unknownFieldsToString(prefix = "")}}\"", + msg.className.simpleName + ) + } else { + buildCodeBlock { + add("return \"%L(\" +\n", msg.className.simpleName) + toStringLines(properties).forEach(::add) + add(unknownFieldsToString(prefix = ", ")) + } + } + ) + .build() + ) + + private fun unknownFieldsToString(prefix: String) = + "if (unknownFields.isEmpty()) \")\" else \"${prefix}unknownFields=\$unknownFields)\"".bindSpaces() + + private fun toStringLines(properties: List) = + properties.mapIndexed { idx, prop -> + CodeBlock.of( + "\"%N=\$%N" + if (idx == properties.size - 1) "\" + \n" else ", \" +\n".bindSpaces(), + prop.name, + prop.name + ) + } + + private fun suppressDeprecation() = + msg.hasDeprecation && (!enclosingDeprecation(ctx) || messageIsTopLevel()) + + private fun messageIsTopLevel() = + msg.className.simpleNames.size == 1 +} + +fun formatDoc(lines: List) = + CodeBlock.of( + "%L", // escape the entire comment block + lines.joinToString(" ") { + if (it.isBlank()) { + "\n\n" + } else { + it.removePrefix(" ") + } + } + ) diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/MessageSizeGenerator.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/MessageSizeGenerator.kt new file mode 100644 index 000000000..d6b069f0a --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/MessageSizeGenerator.kt @@ -0,0 +1,205 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.squareup.kotlinpoet.CodeBlock +import com.squareup.kotlinpoet.FunSpec +import com.squareup.kotlinpoet.KModifier +import com.squareup.kotlinpoet.buildCodeBlock +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.generate.Nullability.hasNonNullOption +import protokt.v1.codegen.generate.Wrapper.interceptFieldSizeof +import protokt.v1.codegen.generate.Wrapper.interceptSizeof +import protokt.v1.codegen.generate.Wrapper.interceptValueAccess +import protokt.v1.codegen.generate.Wrapper.mapKeyConverter +import protokt.v1.codegen.generate.Wrapper.mapValueConverter +import protokt.v1.codegen.util.FieldType +import protokt.v1.codegen.util.Message +import protokt.v1.codegen.util.Oneof +import protokt.v1.codegen.util.StandardField + +fun generateMessageSize(msg: Message, ctx: Context) = + MessageSizeGenerator(msg, ctx).generate() + +private class MessageSizeGenerator( + private val msg: Message, + private val ctx: Context +) { + private val resultVarName = + run { + var name = "result" + while (msg.fields.any { it.fieldName == name }) { + name += "_" + } + name + } + + fun generate(): FunSpec { + val fieldSizes = + msg.mapFields( + ctx, + false, + { CodeBlock.of("$resultVarName·+=·%L", sizeOf(it, ctx)) }, + { oneof, std -> sizeofOneof(oneof, std) }, + { + if (it.hasNonNullOption) { + add("$resultVarName·+=·") + } + } + ) + + return FunSpec.builder("messageSize") + .addModifiers(KModifier.PRIVATE) + .returns(Int::class) + .addCode( + if (fieldSizes.isEmpty()) { + CodeBlock.of("return·unknownFields.size()") + } else { + buildCodeBlock { + addStatement("var·$resultVarName·=·0") + fieldSizes.forEach { fs -> add(fs) } + addStatement("$resultVarName·+=·unknownFields.size()") + addStatement("return·$resultVarName") + } + } + ) + .build() + } + + private fun sizeofOneof(o: Oneof, f: StandardField) = + sizeOf( + f, + ctx, + interceptSizeof( + f, + CodeBlock.of("%N.%N", o.fieldName, f.fieldName), + ctx + ) + ).let { s -> + if (o.hasNonNullOption) { + s + } else { + CodeBlock.of("$resultVarName·+=·%L", s) + } + } +} + +fun sizeOf( + f: StandardField, + ctx: Context, + oneOfFieldAccess: CodeBlock? = null +): CodeBlock { + val name = + oneOfFieldAccess + ?: if (f.repeated) { + CodeBlock.of("%N", f.fieldName) + } else { + interceptSizeof(f, CodeBlock.of("%N", f.fieldName), ctx) + } + + return when { + f.map -> sizeOfMap(f, name, ctx) + f.repeated && f.packed -> { + namedCodeBlock( + "sizeOf(${f.tag}u) + " + + "%elementsSize:L.let·{·it·+·%sizeOf:M(it.toUInt())·}", + mapOf( + "sizeOf" to runtimeFunction("sizeOf"), + "elementsSize" to f.elementsSize() + ) + ) + } + f.repeated -> { + namedCodeBlock( + "(%sizeOf:M(${f.tag}u) * %name:L.size) + %elementsSize:L", + mapOf( + "sizeOf" to runtimeFunction("sizeOf"), + "name" to name, + "elementsSize" to + f.elementsSize( + interceptValueAccess(f, ctx, CodeBlock.of("it")), + parenthesize = false + ) + ) + ) + } + else -> { + buildCodeBlock { + add( + "%M(${f.tag}u) + %L", + runtimeFunction("sizeOf"), + interceptFieldSizeof(f, name, ctx) + ) + } + } + } +} + +private fun sizeOfMap( + f: StandardField, + name: CodeBlock, + ctx: Context +): CodeBlock { + val key = + mapKeyConverter(f, ctx) + ?.let { CodeBlock.of("%T.unwrap(k)", it) } + ?: CodeBlock.of("k") + + val value = + mapValueConverter(f, ctx) + ?.let { CodeBlock.of("%T.unwrap(v)", it) } + ?: CodeBlock.of("v") + + val mapEntry = f.mapEntry!! + val sizeOfCall = sizeOfCall(mapEntry, key, value) + + return buildCodeBlock { + add( + "%M($name, ${f.tag}u)·{·%L,·%L·->\n", + runtimeFunction("sizeOfMap"), + mapEntry.key.loopVar("k"), + mapEntry.value.loopVar("v") + ) + indent() + add("%T.%L\n", f.className, sizeOfCall) + endControlFlowWithoutNewline() + } +} + +private fun StandardField.loopVar(name: String) = + if (type.sizeFn is FieldType.Method) { + name + } else { + "_" + } + +fun StandardField.sizeOf(value: CodeBlock): CodeBlock = + when (val fn = type.sizeFn) { + is FieldType.Const -> CodeBlock.of(fn.size.toString()) + is FieldType.Method -> CodeBlock.of("%M(%L)", runtimeFunction(fn.name), value) + } + +fun StandardField.elementsSize( + fieldAccess: CodeBlock = CodeBlock.of("it"), + parenthesize: Boolean = true +) = + when (val sizeFn = type.sizeFn) { + is FieldType.Const -> + CodeBlock.of("(%N.size * %L)", fieldName, sizeFn.size) + .let { if (parenthesize) CodeBlock.of("(%L)", it) else it } + is FieldType.Method -> + CodeBlock.of("%N.sumOf·{·%L·}", fieldName, sizeOf(fieldAccess)) + } diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/Nullability.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/Nullability.kt similarity index 78% rename from protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/Nullability.kt rename to protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/Nullability.kt index f005c3de4..139e2b78d 100644 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/impl/Nullability.kt +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/Nullability.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,16 +13,16 @@ * limitations under the License. */ -package com.toasttab.protokt.codegen.impl +package protokt.v1.codegen.generate import com.squareup.kotlinpoet.TypeName -import com.toasttab.protokt.codegen.impl.Wrapper.wrapped -import com.toasttab.protokt.codegen.model.FieldType -import com.toasttab.protokt.codegen.protoc.Field -import com.toasttab.protokt.codegen.protoc.Oneof -import com.toasttab.protokt.codegen.protoc.StandardField +import protokt.v1.codegen.generate.Wrapper.wrapped +import protokt.v1.codegen.util.Field +import protokt.v1.codegen.util.FieldType +import protokt.v1.codegen.util.Oneof +import protokt.v1.codegen.util.StandardField -internal object Nullability { +object Nullability { val Field.hasNonNullOption get() = when (this) { @@ -37,7 +37,7 @@ internal object Nullability { private val Field.isKotlinRepresentationNullable get() = when (this) { - is StandardField -> (type == FieldType.MESSAGE && !repeated) || optional + is StandardField -> (type == FieldType.Message && !repeated) || optional is Oneof -> true } @@ -45,13 +45,13 @@ internal object Nullability { get() = wrapped && !repeated && - type !in setOf(FieldType.MESSAGE, FieldType.ENUM) + type !in setOf(FieldType.Message, FieldType.Enum) fun propertyType(o: Oneof) = if (o.hasNonNullOption) { - o.typeName + o.className } else { - o.typeName.copy(nullable = true) + o.className.copy(nullable = true) } fun propertyType(f: StandardField, type: TypeName) = diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/OneofGenerator.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/OneofGenerator.kt new file mode 100644 index 000000000..a199df9b6 --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/OneofGenerator.kt @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.squareup.kotlinpoet.AnnotationSpec +import com.squareup.kotlinpoet.FunSpec +import com.squareup.kotlinpoet.KModifier +import com.squareup.kotlinpoet.PropertySpec +import com.squareup.kotlinpoet.TypeName +import com.squareup.kotlinpoet.TypeSpec +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.generate.Deprecation.renderOptions +import protokt.v1.codegen.generate.Implements.handleSuperInterface +import protokt.v1.codegen.generate.Wrapper.interceptTypeName +import protokt.v1.codegen.generate.Wrapper.wrapped +import protokt.v1.codegen.util.Message +import protokt.v1.codegen.util.Oneof +import protokt.v1.codegen.util.StandardField + +fun annotateOneofs(msg: Message, ctx: Context) = + OneofGenerator(msg, ctx).generate() + +private class OneofGenerator( + private val msg: Message, + private val ctx: Context +) { + fun generate(): List = + msg.fields.filterIsInstance().map { oneof -> + val types = oneof.fields.associate { oneof(oneof, it) } + val implements = + oneof.options.protokt.implements + .takeIf { it.isNotEmpty() } + ?.let { inferClassName(it, ctx.info.kotlinPackage) } + + TypeSpec.classBuilder(oneof.name) + .addModifiers(KModifier.SEALED) + .handleSuperInterface(implements) + .addTypes( + types.map { (k, v) -> + TypeSpec.classBuilder(k) + .addModifiers(KModifier.DATA) + .superclass(oneof.className) + .apply { + v.documentation?.let { addKdoc(formatDoc(it)) } + } + .apply { + if (v.deprecation != null) { + addAnnotation( + AnnotationSpec.builder(Deprecated::class) + .apply { + if (v.deprecation.message != null) { + addMember("\"" + v.deprecation.message + "\"") + } else { + addMember("\"deprecated in proto\"") + } + } + .build() + ) + } + } + .addProperty( + PropertySpec.builder(v.fieldName, v.type) + .initializer(v.fieldName) + .build() + ) + .primaryConstructor( + FunSpec.constructorBuilder() + .addParameter(v.fieldName, v.type) + .build() + ) + .handleSuperInterface(implements, v) + .build() + } + ) + .build() + } + + private fun oneof(f: Oneof, ff: StandardField) = + f.fieldTypeNames.getValue(ff.fieldName).let { oneofFieldTypeName -> + oneofFieldTypeName to info(ff) + } + + private fun info(f: StandardField) = + OneofGeneratorInfo( + fieldName = f.fieldName, + type = + if (f.wrapped) { + interceptTypeName(f, ctx) ?: f.className + } else { + f.className + }, + documentation = annotatePropertyDocumentation(f, ctx), + deprecation = deprecation(f) + ) + + private fun deprecation(f: StandardField) = + if (f.options.default.deprecated) { + renderOptions( + f.options.protokt.deprecationMessage + ) + } else { + null + } +} + +class OneofGeneratorInfo( + val fieldName: String, + val type: TypeName, + val documentation: List?, + val deprecation: Deprecation.RenderOptions? +) diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/PropertyAnnotator.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/PropertyAnnotator.kt new file mode 100644 index 000000000..a8b9b6c88 --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/PropertyAnnotator.kt @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.squareup.kotlinpoet.CodeBlock +import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy +import com.squareup.kotlinpoet.TypeName +import com.squareup.kotlinpoet.asTypeName +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.generate.Deprecation.renderOptions +import protokt.v1.codegen.generate.Implements.overrides +import protokt.v1.codegen.generate.Nullability.deserializeType +import protokt.v1.codegen.generate.Nullability.dslPropertyType +import protokt.v1.codegen.generate.Nullability.hasNonNullOption +import protokt.v1.codegen.generate.Nullability.nullable +import protokt.v1.codegen.generate.Nullability.propertyType +import protokt.v1.codegen.generate.Wrapper.interceptDefaultValue +import protokt.v1.codegen.generate.Wrapper.interceptMapKeyTypeName +import protokt.v1.codegen.generate.Wrapper.interceptMapValueTypeName +import protokt.v1.codegen.generate.Wrapper.interceptTypeName +import protokt.v1.codegen.generate.Wrapper.wrapped +import protokt.v1.codegen.util.ErrorContext.withFieldName +import protokt.v1.codegen.util.Field +import protokt.v1.codegen.util.FieldType +import protokt.v1.codegen.util.Message +import protokt.v1.codegen.util.Oneof +import protokt.v1.codegen.util.StandardField + +fun annotateProperties(msg: Message, ctx: Context) = + PropertyAnnotator(msg, ctx).annotate() + +private class PropertyAnnotator( + private val msg: Message, + private val ctx: Context +) { + fun annotate(): List = + msg.fields.map { withFieldName(it.fieldName) { annotate(it) } } + + private fun annotate(field: Field): PropertyInfo { + val documentation = annotatePropertyDocumentation(field, ctx) + + return when (field) { + is StandardField -> { + annotateStandard(field).let { type -> + PropertyInfo( + name = field.fieldName, + propertyType = propertyType(field, type), + deserializeType = deserializeType(field, type), + dslPropertyType = dslPropertyType(field, type), + defaultValue = field.defaultValue(ctx), + fieldType = field.type, + repeated = field.repeated, + map = field.map, + nullable = field.nullable || field.optional, + nonNullOption = field.hasNonNullOption, + overrides = field.overrides(ctx, msg), + wrapped = field.wrapped, + documentation = documentation, + deprecation = deprecation(field) + ) + } + } + is Oneof -> + PropertyInfo( + name = field.fieldName, + propertyType = propertyType(field), + deserializeType = field.className.copy(nullable = true), + dslPropertyType = field.className.copy(nullable = true), + defaultValue = field.defaultValue(ctx), + oneof = true, + nullable = field.nullable, + nonNullOption = field.hasNonNullOption, + documentation = documentation + ) + } + } + + private fun deprecation(f: StandardField) = + if (f.options.default.deprecated) { + renderOptions( + f.options.protokt.deprecationMessage + ) + } else { + null + } + + private fun annotateStandard(f: StandardField): TypeName = + if (f.map) { + val mapTypes = resolveMapEntryTypes(f, ctx) + Map::class + .asTypeName() + .parameterizedBy(mapTypes.kType, mapTypes.vType) + } else { + val parameter = interceptTypeName(f, ctx) ?: f.className + + if (f.repeated) { + List::class.asTypeName().parameterizedBy(parameter) + } else { + parameter + } + } + + private fun resolveMapEntryTypes(f: StandardField, ctx: Context) = + f.mapEntry!!.let { + MapTypeParams( + interceptMapKeyTypeName(f, ctx) ?: it.key.className, + interceptMapValueTypeName(f, ctx) ?: it.value.className + ) + } + + private class MapTypeParams( + val kType: TypeName, + val vType: TypeName + ) + + private fun Field.defaultValue(ctx: Context) = + when (this) { + is StandardField -> + interceptDefaultValue( + this, + when { + map -> CodeBlock.of("emptyMap()") + repeated -> CodeBlock.of("emptyList()") + type == FieldType.Message -> CodeBlock.of("null") + type == FieldType.Enum -> CodeBlock.of("%T.from(0)", className) + nullable -> CodeBlock.of("null") + else -> type.defaultValue + }, + ctx + ) + is Oneof -> CodeBlock.of("null") + } +} + +class PropertyInfo( + val name: String, + val propertyType: TypeName, + val deserializeType: TypeName, + val dslPropertyType: TypeName, + val defaultValue: CodeBlock, + val nullable: Boolean, + val nonNullOption: Boolean, + val fieldType: FieldType? = null, + val repeated: Boolean = false, + val map: Boolean = false, + val oneof: Boolean = false, + val wrapped: Boolean = false, + val overrides: Boolean = false, + val documentation: List?, + val deprecation: Deprecation.RenderOptions? = null +) diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/PropertyDocumentationAnnotator.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/PropertyDocumentationAnnotator.kt similarity index 58% rename from protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/PropertyDocumentationAnnotator.kt rename to protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/PropertyDocumentationAnnotator.kt index 2bafdd991..cccd167b4 100644 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/annotators/PropertyDocumentationAnnotator.kt +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/PropertyDocumentationAnnotator.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,32 +13,28 @@ * limitations under the License. */ -package com.toasttab.protokt.codegen.annotators +package protokt.v1.codegen.generate import com.google.protobuf.DescriptorProtos.DescriptorProto.FIELD_FIELD_NUMBER import com.google.protobuf.DescriptorProtos.DescriptorProto.ONEOF_DECL_FIELD_NUMBER -import com.toasttab.protokt.codegen.annotators.Annotator.Context -import com.toasttab.protokt.codegen.annotators.MessageDocumentationAnnotator.baseLocation -import com.toasttab.protokt.codegen.protoc.Field -import com.toasttab.protokt.codegen.protoc.Oneof -import com.toasttab.protokt.codegen.protoc.StandardField +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.util.Field +import protokt.v1.codegen.util.Oneof +import protokt.v1.codegen.util.StandardField -internal class PropertyDocumentationAnnotator -private constructor( +fun annotatePropertyDocumentation(field: Field, ctx: Context) = + PropertyDocumentationAnnotator(field, ctx).annotate() + +private class PropertyDocumentationAnnotator( private val field: Field, private val ctx: Context ) { - private fun annotatePropertyDocumentation() = + fun annotate() = baseLocation( ctx, when (field) { is StandardField -> listOf(FIELD_FIELD_NUMBER, field.index) is Oneof -> listOf(ONEOF_DECL_FIELD_NUMBER, field.index) } - ).cleanDocumentation() - - companion object { - fun annotatePropertyDocumentation(field: Field, ctx: Context) = - PropertyDocumentationAnnotator(field, ctx).annotatePropertyDocumentation() - } + )?.cleanDocumentation() } diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/SerializeAndSizeSupport.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/SerializeAndSizeSupport.kt new file mode 100644 index 000000000..b8cdd93ae --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/SerializeAndSizeSupport.kt @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.squareup.kotlinpoet.CodeBlock +import com.squareup.kotlinpoet.buildCodeBlock +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.generate.Nullability.hasNonNullOption +import protokt.v1.codegen.generate.Wrapper.interceptValueAccess +import protokt.v1.codegen.util.FieldType +import protokt.v1.codegen.util.Message +import protokt.v1.codegen.util.Oneof +import protokt.v1.codegen.util.StandardField + +fun Message.mapFields( + ctx: Context, + skipConditionalForUnpackedRepeatedFields: Boolean, + std: (StandardField) -> CodeBlock, + oneof: (Oneof, StandardField) -> CodeBlock, + oneofPreControlFlow: CodeBlock.Builder.(Oneof) -> Unit = {} +): List = + fields.map { field -> + when (field) { + is StandardField -> + standardFieldExecution(ctx, field, skipConditionalForUnpackedRepeatedFields) { std(field) } + is Oneof -> + oneofFieldExecution(field, { oneof(field, it) }, oneofPreControlFlow) + } + } + +private fun standardFieldExecution( + ctx: Context, + field: StandardField, + skipConditional: Boolean, + stmt: () -> CodeBlock +): CodeBlock { + fun CodeBlock.Builder.addStmt() { + add(stmt()) + add("\n") + } + + return if (field.hasNonNullOption) { + buildCodeBlock { addStmt() } + } else { + buildCodeBlock { + if (field.repeated && !field.packed && skipConditional) { + // skip isNotEmpty check when not packed; will short circuit correctly + addStmt() + } else { + beginControlFlow("if (%L)", field.nonDefault(ctx)) + addStmt() + endControlFlow() + } + } + } +} + +private fun StandardField.nonDefault(ctx: Context): CodeBlock { + val name = interceptValueAccess(this, ctx, CodeBlock.of("%N", fieldName)) + return when { + optional -> CodeBlock.of("%N != null", fieldName) + repeated -> CodeBlock.of("%N.isNotEmpty()", fieldName) + type == FieldType.Message -> CodeBlock.of("%N != null", fieldName) + type == FieldType.Bytes || type == FieldType.String -> CodeBlock.of("%L.isNotEmpty()", name) + type == FieldType.Enum -> CodeBlock.of("%L.value != 0", name) + type == FieldType.Bool -> name + type.scalar -> CodeBlock.of("%L != %L", name, type.defaultValue) + else -> error("Field doesn't have nondefault check: $this, $type") + } +} + +private fun oneofFieldExecution( + field: Oneof, + stmt: (StandardField) -> CodeBlock, + preControlFlow: CodeBlock.Builder.(Oneof) -> Unit +): CodeBlock = + buildCodeBlock { + preControlFlow(field) + beginControlFlow("when (%N)", field.fieldName) + oneofInstanceConditionals(field) { stmt(it) }.forEach(::add) + endControlFlow() + } + +private fun oneofInstanceConditionals(f: Oneof, stmt: (StandardField) -> CodeBlock) = + f.fields + .sortedBy { it.number } + .map { + buildCodeBlock { + addStatement("is·%T·->\n%L", f.qualify(it), stmt(it)) + } + } + .let { + if (f.hasNonNullOption) { + it + } else { + it + buildCodeBlock { addStatement("null·->·Unit") } + } + } + +fun Oneof.qualify(f: StandardField) = + className.nestedClass(fieldTypeNames.getValue(f.fieldName)) diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/SerializerGenerator.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/SerializerGenerator.kt new file mode 100644 index 000000000..ca8a800b2 --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/SerializerGenerator.kt @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.squareup.kotlinpoet.CodeBlock +import com.squareup.kotlinpoet.FunSpec +import com.squareup.kotlinpoet.KModifier +import com.squareup.kotlinpoet.buildCodeBlock +import protokt.v1.KtMessageSerializer +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.generate.Wrapper.interceptValueAccess +import protokt.v1.codegen.generate.Wrapper.mapKeyConverter +import protokt.v1.codegen.generate.Wrapper.mapValueConverter +import protokt.v1.codegen.util.FieldType +import protokt.v1.codegen.util.Message +import protokt.v1.codegen.util.Oneof +import protokt.v1.codegen.util.StandardField + +fun generateSerializer(msg: Message, ctx: Context) = + SerializerGenerator(msg, ctx).generate() + +private class SerializerGenerator( + private val msg: Message, + private val ctx: Context +) { + fun generate(): FunSpec { + val fieldSerializations = + msg.mapFields( + ctx, + true, + { serialize(it, ctx) }, + { oneof, std -> serialize(std, ctx, oneof) } + ) + + return buildFunSpec("serialize") { + addModifiers(KModifier.OVERRIDE) + addParameter("serializer", KtMessageSerializer::class) + fieldSerializations.forEach(::addCode) + addCode("serializer.writeUnknown(unknownFields)") + } + } +} + +fun serialize( + f: StandardField, + ctx: Context, + o: Oneof? = null +): CodeBlock { + val fieldAccess = + if (o == null) { + interceptValueAccess( + f, + ctx, + if (f.repeated) { CodeBlock.of("it") } else { CodeBlock.of("%N", f.fieldName) } + ) + } else { + interceptValueAccess(f, ctx, CodeBlock.of("%N.%N", o.fieldName, f.fieldName)) + } + + return when { + f.repeated && f.packed -> buildCodeBlock { + addNamed( + "serializer.writeTag(${f.tag.value}u)" + + ".%writeUInt32:L(%elementsSize:L.toUInt())\n", + mapOf( + "writeUInt32" to KtMessageSerializer::writeUInt32.name, + "elementsSize" to f.elementsSize() + ) + ) + add("%N.forEach·{·serializer.%L·}", f.fieldName, f.write(CodeBlock.of("it"))) + } + f.map -> buildCodeBlock { + beginControlFlow("${f.fieldName}.entries.forEach") + add( + "serializer.writeTag(${f.tag.value}u).write(%L)\n", + f.boxMap(ctx) + ) + endControlFlowWithoutNewline() + } + f.repeated -> buildCodeBlock { + addNamed( + "%name:N.forEach·{·" + + "serializer.writeTag(${f.tag.value}u).%write:L·}", + mapOf( + "name" to f.fieldName, + "write" to f.write(fieldAccess) + ) + ) + } + + else -> buildCodeBlock { + add( + "serializer.writeTag(${f.tag.value}u).%L", + f.write(fieldAccess) + ) + } + } +} + +private fun StandardField.boxMap(ctx: Context): CodeBlock { + if (type != FieldType.Message) { + return CodeBlock.of("") + } + val keyParam = + mapKeyConverter(this, ctx) + ?.let { CodeBlock.of("%T.unwrap(it.key)", it) } + ?: CodeBlock.of("it.key") + + val valParam = + mapValueConverter(this, ctx) + ?.let { CodeBlock.of("%T.unwrap(it.value)", it) } + ?: CodeBlock.of("it.value") + + return CodeBlock.of("%T(%L, %L)", className, keyParam, valParam) +} + +private fun StandardField.write(value: CodeBlock) = + CodeBlock.of("%L(%L)", type.writeFn, value) diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/ServiceGenerator.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/ServiceGenerator.kt new file mode 100644 index 000000000..3fb3d481d --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/ServiceGenerator.kt @@ -0,0 +1,475 @@ +/* + * Copyright (c) 2020 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.google.common.base.CaseFormat.LOWER_CAMEL +import com.google.common.base.CaseFormat.UPPER_UNDERSCORE +import com.squareup.kotlinpoet.ClassName +import com.squareup.kotlinpoet.CodeBlock +import com.squareup.kotlinpoet.FunSpec +import com.squareup.kotlinpoet.KModifier +import com.squareup.kotlinpoet.MemberName.Companion.member +import com.squareup.kotlinpoet.ParameterSpec +import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy +import com.squareup.kotlinpoet.PropertySpec +import com.squareup.kotlinpoet.TypeSpec +import com.squareup.kotlinpoet.asClassName +import com.squareup.kotlinpoet.asTypeName +import com.squareup.kotlinpoet.buildCodeBlock +import com.squareup.kotlinpoet.withIndent +import io.grpc.BindableService +import io.grpc.ChannelCredentials +import io.grpc.MethodDescriptor +import io.grpc.MethodDescriptor.MethodType +import io.grpc.ServerMethodDefinition +import io.grpc.ServerServiceDefinition +import io.grpc.ServiceDescriptor +import io.grpc.Status +import io.grpc.StatusException +import io.grpc.kotlin.AbstractCoroutineServerImpl +import io.grpc.kotlin.AbstractCoroutineStub +import io.grpc.kotlin.ClientCalls +import io.grpc.kotlin.ServerCalls +import kotlinx.coroutines.flow.Flow +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.util.KotlinPlugin +import protokt.v1.codegen.util.Method +import protokt.v1.codegen.util.Service +import protokt.v1.codegen.util.protoktV1GoogleProto +import protokt.v1.grpc.KtMarshaller +import protokt.v1.grpc.SchemaDescriptor +import kotlin.coroutines.CoroutineContext +import kotlin.coroutines.EmptyCoroutineContext +import kotlin.reflect.KClass +import kotlin.reflect.KFunction1 +import kotlin.reflect.KFunction3 + +fun generateService(s: Service, ctx: Context, kotlinPlugin: KotlinPlugin?) = + ServiceGenerator(s, ctx, kotlinPlugin).generate() + +private class ServiceGenerator( + private val s: Service, + private val ctx: Context, + private val kotlinPlugin: KotlinPlugin? +) { + fun generate(): List = + (grpcImplementations() + serviceDescriptor()).filterNotNull() + + private fun grpcImplementations(): List = + if (supportedPlugin()) { + val getMethodFunctions = + s.methods.map { method -> + buildFunSpec("get" + method.name + "Method") { + returns(pivotClassName(MethodDescriptor::class).parameterizedBy(method.inputType, method.outputType)) + addCode("return _" + method.name.decapitalize() + "Method") + staticIfAppropriate() + } + } + + val getServiceDescriptorFunction = + buildFunSpec("getServiceDescriptor") { + returns(pivotClassName(ServiceDescriptor::class)) + addCode("return _serviceDescriptor") + staticIfAppropriate() + } + + val grpcServiceObjectClassName = ClassName(ctx.info.kotlinPackage, s.name + "Grpc") + val grpcServiceObject = + if (ctx.info.context.generateGrpcDescriptors) { + TypeSpec.objectBuilder(grpcServiceObjectClassName) + .addProperty( + PropertySpec.builder("SERVICE_NAME", String::class) + .addModifiers(KModifier.CONST) + .initializer("\"" + renderQualifiedName() + "\"") + .build() + ) + .addServiceDescriptor() + .addMethodProperties() + .addFunction(getServiceDescriptorFunction) + .addFunctions(getMethodFunctions) + .build() + } else { + null + } + + val grpcKtObject = + if (kotlinPlugin == KotlinPlugin.JS && ctx.info.context.generateGrpcKotlinStubs) { + val grpcKtClassName = ClassName(ctx.info.kotlinPackage, s.name + "GrpcKt") + TypeSpec.objectBuilder(grpcKtClassName) + .addType( + coroutineServerBase( + grpcServiceObjectClassName, + getServiceDescriptorFunction, + getMethodFunctions + ) + ) + .addType( + coroutineStub( + grpcKtClassName, + grpcServiceObjectClassName, + getServiceDescriptorFunction, + getMethodFunctions + ) + ) + .build() + } else { + null + } + + listOfNotNull(grpcServiceObject, grpcKtObject) + } else { + emptyList() + } + + private fun TypeSpec.Builder.addServiceDescriptor() = + addProperty( + PropertySpec.builder("_serviceDescriptor", pivotClassName(ServiceDescriptor::class)) + .addModifiers(KModifier.PRIVATE) + .delegate( + buildCodeBlock { + beginControlFlow("lazy") + add( + "%M(SERVICE_NAME)\n", + staticOrCompanion(ServiceDescriptor::class).member("newBuilder") + ) + withIndent { serviceLines(ctx).filterNotNull().forEach(::add) } + endControlFlowWithoutNewline() + } + ) + .build() + ) + + private fun TypeSpec.Builder.addMethodProperties() = + addProperties( + s.methods.map { method -> + PropertySpec.builder( + "_" + method.name.decapitalize() + "Method", + pivotClassName(MethodDescriptor::class).parameterizedBy(method.inputType, method.outputType) + ) + .addModifiers(KModifier.PRIVATE) + .delegate( + buildCodeBlock { + beginControlFlow("lazy") + add( + "%M<%T,·%T>()\n", + staticOrCompanion(MethodDescriptor::class).member("newBuilder"), + method.inputType, + method.outputType + ) + withIndent { + add( + ".setType(%M)\n", + pivotClassName(MethodType::class).member(methodType(method).name) + ) + add( + ".setFullMethodName(%M(SERVICE_NAME,·\"${method.name}\"))\n", + staticOrCompanion(MethodDescriptor::class).member("generateFullMethodName") + ) + add(".setRequestMarshaller(%L)\n", method.requestMarshaller()) + add(".setResponseMarshaller(%L)\n", method.responseMarshaller()) + add(".build()\n") + } + endControlFlowWithoutNewline() + } + ) + .build() + } + ) + + private fun coroutineServerBase( + grpcServiceObjectClassName: ClassName, + getServiceDescriptorFunction: FunSpec, + getMethodFunctions: List + ): TypeSpec { + val implementations = serverImplementations() + val coroutineServerClassName = ClassName(ctx.info.kotlinPackage, s.name + "CoroutineImplBase") + return TypeSpec.classBuilder(coroutineServerClassName) + .addModifiers(KModifier.ABSTRACT) + .primaryConstructor( + FunSpec.constructorBuilder() + .addParameter( + ParameterSpec.builder("coroutineContext", CoroutineContext::class) + .defaultValue("%L", EmptyCoroutineContext::class.asClassName()) + .build() + ) + .build() + ) + .addSuperclassConstructorParameter("coroutineContext") + .superclass(pivotClassName(AbstractCoroutineServerImpl::class)) + .addFunctions(implementations) + .addBindService( + grpcServiceObjectClassName, + getServiceDescriptorFunction, + getMethodFunctions, + implementations + ) + .build() + } + + private fun serverImplementations() = + s.methods.map { method -> + buildFunSpec(method.name.replaceFirstChar { it.lowercase() }) { + addModifiers(KModifier.OPEN) + when (methodType(method)) { + MethodType.CLIENT_STREAMING, MethodType.UNARY -> + addModifiers(KModifier.SUSPEND) + else -> Unit + } + when (methodType(method)) { + MethodType.UNARY, MethodType.SERVER_STREAMING -> + addParameter("request", method.inputType) + MethodType.CLIENT_STREAMING, MethodType.BIDI_STREAMING -> + addParameter("requests", Flow::class.asClassName().parameterizedBy(method.inputType)) + MethodType.UNKNOWN -> error("unsupported method type") + } + when (methodType(method)) { + MethodType.UNARY, MethodType.CLIENT_STREAMING -> + returns(method.outputType) + MethodType.SERVER_STREAMING, MethodType.BIDI_STREAMING -> + returns(Flow::class.asClassName().parameterizedBy(method.outputType)) + MethodType.UNKNOWN -> error("unsupported method type") + } + addCode( + "throw %T(%M.%L(\"Method·%L.%L·is·unimplemented\"))", + pivotClassName(StatusException::class), + staticOrCompanion(Status::class).member(Status::UNIMPLEMENTED.name), + Status.UNIMPLEMENTED::withDescription.name, + renderQualifiedName(), + method.name + ) + } + } + + private fun TypeSpec.Builder.addBindService( + grpcServiceObjectClassName: ClassName, + getServiceDescriptorFunction: FunSpec, + getMethodFunctions: List, + implementations: List + ) = + apply { + addFunction( + buildFunSpec(BindableService::bindService.name) { + addModifiers(KModifier.OVERRIDE, KModifier.FINAL) + returns(pivotClassName(ServerServiceDefinition::class)) + + val builder: KFunction1 = ServerServiceDefinition::builder + addCode( + "return %M(%M())\n", + staticOrCompanion(ServerServiceDefinition::class).member(builder.name), + grpcServiceObjectClassName.member(getServiceDescriptorFunction.name) + ) + + s.methods.forEachIndexed { idx, method -> + addCode( + ".%L(%M(context, %M(), ::%L))\n", + ServiceDescriptor.Builder::addMethod.name, + pivotClassName(ServerCalls::class).member(methodDefinitionForMethod(method)), + grpcServiceObjectClassName.member(getMethodFunctions[idx].name), + implementations[idx].name + ) + } + addCode(".build()") + } + ) + } + + private fun methodDefinitionForMethod(method: Method) = + when (methodType(method)) { + MethodType.UNARY -> { + val def: KFunction3, suspend (Any) -> Any, ServerMethodDefinition> = + ServerCalls::unaryServerMethodDefinition + def.name + } + MethodType.CLIENT_STREAMING -> { + val def: KFunction3, suspend (Flow) -> Any, ServerMethodDefinition> = + ServerCalls::clientStreamingServerMethodDefinition + def.name + } + MethodType.SERVER_STREAMING -> { + val def: KFunction3, (Any) -> Flow, ServerMethodDefinition> = + ServerCalls::serverStreamingServerMethodDefinition + def.name + } + MethodType.BIDI_STREAMING -> { + val def: KFunction3, (Flow) -> Flow, ServerMethodDefinition> = + ServerCalls::bidiStreamingServerMethodDefinition + def.name + } + MethodType.UNKNOWN -> error("unsupported method type") + } + + private fun coroutineStub( + grpcKtClassName: ClassName, + grpcServiceObjectClassName: ClassName, + getServiceDescriptorFunction: FunSpec, + getMethodFunctions: List, + ): TypeSpec { + val coroutineStubClassName = ClassName(ctx.info.kotlinPackage, grpcKtClassName.simpleName, s.name + "CoroutineStub") + return TypeSpec.classBuilder(coroutineStubClassName) + .primaryConstructor( + FunSpec.constructorBuilder() + .addParameter(ParameterSpec("address", String::class.asTypeName())) + .addParameter(ParameterSpec("credentials", pivotClassName(ChannelCredentials::class))) + .build() + ) + .addSuperclassConstructorParameter("%M()", grpcServiceObjectClassName.member(getServiceDescriptorFunction.name)) + .addSuperclassConstructorParameter("address") + .addSuperclassConstructorParameter("credentials") + .superclass(pivotClassName(AbstractCoroutineStub::class).parameterizedBy(coroutineStubClassName)) + .addFunctions(clientImplementations(grpcServiceObjectClassName, getMethodFunctions)) + .build() + } + + private fun clientImplementations( + grpcServiceObjectClassName: ClassName, + getMethodFunctions: List + ) = + s.methods.mapIndexed { idx, method -> + buildFunSpec(method.name.replaceFirstChar { it.lowercase() }) { + when (methodType(method)) { + MethodType.CLIENT_STREAMING, MethodType.UNARY -> + addModifiers(KModifier.SUSPEND) + else -> Unit + } + val requestsVarName = + when (methodType(method)) { + MethodType.UNARY, MethodType.SERVER_STREAMING -> { + val name = "request" + addParameter(name, method.inputType) + name + } + MethodType.CLIENT_STREAMING, MethodType.BIDI_STREAMING -> { + val name = "requests" + addParameter(name, Flow::class.asClassName().parameterizedBy(method.inputType)) + name + } + MethodType.UNKNOWN -> error("unsupported method type") + } + when (methodType(method)) { + MethodType.UNARY, MethodType.CLIENT_STREAMING -> + returns(method.outputType) + MethodType.SERVER_STREAMING, MethodType.BIDI_STREAMING -> + returns(Flow::class.asClassName().parameterizedBy(method.outputType)) + MethodType.UNKNOWN -> error("unsupported method type") + } + val methodName = UPPER_UNDERSCORE.to(LOWER_CAMEL, methodType(method).name) + "Rpc" + + addCode( + "return %M(client, %M(), %L)", + pivotClassName(ClientCalls::class).member(methodName), + grpcServiceObjectClassName.member(getMethodFunctions[idx].name), + requestsVarName + ) + } + } + + private fun serviceDescriptor() = + if (ctx.info.context.generateDescriptors) { + TypeSpec.objectBuilder(s.name) + .addProperty( + PropertySpec.builder("descriptor", ClassName(protoktV1GoogleProto, "ServiceDescriptor")) + .delegate( + buildCodeBlock { + beginControlFlow("lazy") + add("${ctx.info.context.fileDescriptorObjectName}.descriptor.services[${s.index}]\n") + endControlFlowWithoutNewline() + } + ) + .build() + ) + .build() + } else { + null + } + + private fun supportedPlugin() = + try { + pivotClassName(Unit::class) + true + } catch (ex: IllegalStateException) { + false + } + + private fun pivotClassName(jvmClass: KClass<*>) = + when (kotlinPlugin) { + KotlinPlugin.JS -> ClassName(KtMarshaller::class.java.`package`!!.name, jvmClass.asTypeName().simpleNames) + KotlinPlugin.MULTIPLATFORM -> error("unsupported plugin for service generation: $kotlinPlugin") + else -> jvmClass.asTypeName() + } + + private fun staticOrCompanion(jvmClass: KClass<*>) = + pivotClassName(jvmClass).let { + pivotPlugin(it, ClassName(it.packageName, it.simpleNames + "Companion")) + } + + private fun pivotPlugin(jvm: T, js: T) = + when (kotlinPlugin) { + KotlinPlugin.JS -> js + KotlinPlugin.MULTIPLATFORM -> error("unsupported plugin for service generation: $kotlinPlugin") + else -> jvm + } + + private fun FunSpec.Builder.staticIfAppropriate() = + apply { + if (kotlinPlugin != KotlinPlugin.JS) { + addAnnotation(JvmStatic::class) + } + } + + private fun serviceLines(ctx: Context) = + s.methods.map { + CodeBlock.of(".addMethod(_${it.name.decapitalize()}Method)\n") + } + + if (pivotPlugin(jvm = true, js = false)) { + CodeBlock.of( + ".setSchemaDescriptor(%T(className = %S, fileDescriptorClassName = %S))\n", + SchemaDescriptor::class, + "${ctx.info.kotlinPackage}.${s.name}", + "${ctx.info.kotlinPackage}.${ctx.info.context.fileDescriptorObjectName}" + ) + } else { + null + } + + CodeBlock.of(".build()\n") + + private fun renderQualifiedName() = + if (ctx.info.protoPackage == "") { + s.name + } else { + "${ctx.info.protoPackage}.${s.name}" + } +} + +private fun Method.requestMarshaller(): CodeBlock = + marshaller(options.protokt.requestMarshaller, inputType) + +private fun Method.responseMarshaller(): CodeBlock = + marshaller(options.protokt.responseMarshaller, outputType) + +private fun marshaller(string: String, type: ClassName) = + string.takeIf { it.isNotEmpty() } + ?.let { CodeBlock.of("%L", it) } + ?: CodeBlock.of("%T(%T)", KtMarshaller::class, type) + +private fun methodType(m: Method) = when { + m.clientStreaming && m.serverStreaming -> MethodType.BIDI_STREAMING + m.clientStreaming -> MethodType.CLIENT_STREAMING + m.serverStreaming -> MethodType.SERVER_STREAMING + else -> MethodType.UNARY +} + +private fun String.decapitalize() = + replaceFirstChar { it.lowercaseChar() } diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/WellKnownTypes.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/WellKnownTypes.kt new file mode 100644 index 000000000..6bb748ceb --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/WellKnownTypes.kt @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2020 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import protokt.v1.Bytes +import protokt.v1.codegen.util.StandardField +import protokt.v1.codegen.util.googleProtobuf + +object WellKnownTypes { + val StandardField.wrapWithWellKnownInterception + get() = options.protokt.wrap.takeIf { it.isNotEmpty() } + ?: if (protoTypeName.startsWith(".$googleProtobuf.")) { + classNameForWellKnownType(protoTypeName.removePrefix(".$googleProtobuf.")) + } else { + null + } + + private fun classNameForWellKnownType(type: String) = + when (type) { + "DoubleValue" -> "kotlin.Double" + "FloatValue" -> "kotlin.Float" + "Int64Value" -> "kotlin.Long" + "UInt64Value" -> "kotlin.ULong" + "Int32Value" -> "kotlin.Int" + "UInt32Value" -> "kotlin.UInt" + "BoolValue" -> "kotlin.Boolean" + "StringValue" -> "kotlin.String" + "BytesValue" -> Bytes::class.qualifiedName + else -> null + } +} diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/Wrapper.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/Wrapper.kt new file mode 100644 index 000000000..fab00c7b8 --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/generate/Wrapper.kt @@ -0,0 +1,178 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.generate + +import com.squareup.kotlinpoet.ClassName +import com.squareup.kotlinpoet.CodeBlock +import com.squareup.kotlinpoet.TypeName +import com.squareup.kotlinpoet.asClassName +import com.squareup.kotlinpoet.asTypeName +import protokt.v1.BytesSlice +import protokt.v1.codegen.generate.CodeGenerator.Context +import protokt.v1.codegen.generate.WellKnownTypes.wrapWithWellKnownInterception +import protokt.v1.codegen.util.FieldType +import protokt.v1.codegen.util.StandardField + +internal object Wrapper { + val StandardField.wrapped + get() = wrapWithWellKnownInterception != null + + private fun StandardField.withWrapper( + wrapOption: String?, + pkg: String, + ifWrapped: (ClassName, ClassName) -> T + ) = + wrapOption?.let { wrap -> + ifWrapped( + inferClassName(wrap, pkg), + protoTypeName.takeIf { it.isNotEmpty() } + ?.let { className } + // Protobuf primitives have no typeName + ?: requireNotNull(type.kotlinRepresentation) { + "no kotlin representation for type of $fieldName: $type" + }.asClassName() + ) + } + + private fun StandardField.withWrapper( + ctx: Context, + ifWrapped: (wrapper: ClassName, wrapped: ClassName) -> R + ) = + withWrapper( + wrapWithWellKnownInterception, + ctx.info.kotlinPackage, + ifWrapped + ) + + fun interceptSizeof( + f: StandardField, + accessSize: CodeBlock, + ctx: Context + ): CodeBlock = + f.withWrapper(ctx) { wrapper, wrapped -> + val converter = converter(wrapper, wrapped, ctx) + if (converter.optimizedSizeof) { + accessSize + } else { + interceptValueAccess(f, ctx, accessSize) + } + } ?: interceptValueAccess(f, ctx, accessSize) + + fun interceptFieldSizeof( + f: StandardField, + accessSize: CodeBlock, + ctx: Context + ) = + f.withWrapper(ctx) { wrapper, wrapped -> + val converter = converter(wrapper, wrapped, ctx) + if (converter.optimizedSizeof) { + CodeBlock.of("%T.sizeOf(%L)", converter.className, accessSize) + } else { + f.sizeOf(accessSize) + } + } ?: f.sizeOf(accessSize) + + fun interceptValueAccess( + f: StandardField, + ctx: Context, + accessValue: CodeBlock + ): CodeBlock = + f.withWrapper(ctx) { wrapper, wrapped -> + CodeBlock.of( + "%T.unwrap(%L)", + converter(wrapper, wrapped, ctx).className, + accessValue + ) + } ?: accessValue + + fun wrapField(wrapName: TypeName, arg: CodeBlock) = + CodeBlock.of("%T.wrap(%L)", wrapName, arg) + + fun wrapper(f: StandardField, ctx: Context) = + f.withWrapper(ctx) { wrapper, wrapped -> + converter(wrapper, wrapped, ctx).className + } + + fun interceptRead(f: StandardField, readFunction: CodeBlock) = + if (f.bytesSlice) { + CodeBlock.of("readBytesSlice()") + } else { + readFunction + } + + fun interceptDefaultValue(f: StandardField, defaultValue: CodeBlock, ctx: Context) = + if (f.bytesSlice) { + CodeBlock.of("%T.empty()", BytesSlice::class) + } else { + if (f.type == FieldType.Message && !f.repeated) { + defaultValue + } else { + wrapper(f, ctx)?.let { wrapField(it, defaultValue) } ?: defaultValue + } + } + + fun interceptTypeName(f: StandardField, ctx: Context) = + if (f.bytesSlice) { + BytesSlice::class.asTypeName() + } else { + f.withWrapper(ctx, wrapperTypeName()) + } + + private val StandardField.bytesSlice + get() = options.protokt.bytesSlice + + private fun StandardField.withKeyWrap( + ctx: Context, + ifWrapped: (wrapper: ClassName, wrapped: ClassName) -> R + ) = + mapEntry!!.key.withWrapper( + options.protokt.keyWrap.takeIf { it.isNotEmpty() }, + ctx.info.kotlinPackage, + ifWrapped + ) + + fun interceptMapKeyTypeName(f: StandardField, ctx: Context) = + f.withKeyWrap(ctx, wrapperTypeName()) + + fun mapKeyConverter(f: StandardField, ctx: Context) = + f.withKeyWrap(ctx) { wrapper, wrapped -> + converter(wrapper, wrapped, ctx).className + } + + private fun StandardField.withValueWrap( + ctx: Context, + ifWrapped: (wrapper: ClassName, wrapped: ClassName) -> R + ) = + mapEntry!!.value.withWrapper( + options.protokt.valueWrap.takeIf { it.isNotEmpty() }, + ctx.info.kotlinPackage, + ifWrapped + ) + + fun interceptMapValueTypeName(f: StandardField, ctx: Context) = + f.withValueWrap(ctx) { wrapper, _ -> wrapper } + + fun mapValueConverter(f: StandardField, ctx: Context) = + f.withValueWrap(ctx) { wrapper, wrapped -> + converter(wrapper, wrapped, ctx).className + } + + private fun wrapperTypeName() = + { wrapper: ClassName, _: Any -> wrapper } + + private fun converter(wrapper: ClassName, wrapped: ClassName, ctx: Context) = + ctx.info.context.classLookup.converter(wrapper, wrapped) +} diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/ClassLookup.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/ClassLookup.kt new file mode 100644 index 000000000..afd3ef67a --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/ClassLookup.kt @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.util + +import com.google.common.collect.HashBasedTable +import com.google.common.collect.ImmutableTable +import com.google.common.collect.Table +import com.squareup.kotlinpoet.ClassName +import com.squareup.kotlinpoet.asClassName +import io.github.oshai.kotlinlogging.KotlinLogging +import protokt.v1.Converter +import protokt.v1.OptimizedSizeOfConverter +import java.io.File +import java.net.URLClassLoader +import kotlin.reflect.KClass +import kotlin.reflect.full.hasAnnotation +import kotlin.reflect.full.memberProperties + +class ClassLookup(classpath: List) { + private val logger = KotlinLogging.logger { } + + private val classLoader by lazy { + logger.info { "Creating class loader with extra classpath: $classpath" } + + val current = Thread.currentThread().contextClassLoader + + when { + classpath.isEmpty() -> current + else -> + URLClassLoader( + classpath + .map { File(it).toURI().toURL() } + .toTypedArray(), + current + ) + } + } + + private val convertersByWrapperAndWrapped by lazy { + classLoader.getResources("META-INF/services/${Converter::class.qualifiedName}") + .asSequence() + .plus(@Suppress("DEPRECATION") classLoader.getResources("META-INF/services/${com.toasttab.protokt.ext.Converter::class.qualifiedName}").asSequence()) + .flatMap { url -> + url.openStream() + .bufferedReader() + .useLines { lines -> + lines.map { it.substringBefore("#").trim() } + .filter { it.isNotEmpty() } + .map { classLoader.loadClass(it).kotlin.objectInstance as Converter<*, *> } + .toList() + } + }.run { + val table = HashBasedTable.create>>() + forEach { table.getOrPut(it.wrapper.asClassName(), it.wrapped.asClassName()) { mutableListOf() }.add(it) } + ImmutableTable.builder>>().putAll(table).build() + } + } + + private val classLookup = mutableMapOf>() + + fun properties(className: ClassName): Collection = + try { + classLookup.getOrPut(className) { + classLoader.loadClass(className.canonicalName).kotlin + }.memberProperties.map { it.name } + } catch (t: Throwable) { + throw Exception("Class not found: ${className.canonicalName}") + } + + fun converter(wrapper: ClassName, wrapped: ClassName): ConverterDetails { + val converters = convertersByWrapperAndWrapped.get(wrapper, wrapped) ?: emptyList() + + require(converters.isNotEmpty()) { + "No converter found for wrapper type $wrapper from type $wrapped" + } + + val converter = + converters + .filterNot { it::class.hasAnnotation() } + .firstOrNull() + ?: converters.first() + + return ConverterDetails( + converter::class.asClassName(), + converter is OptimizedSizeOfConverter<*, *> + ) + } +} + +class ConverterDetails( + val className: ClassName, + val optimizedSizeof: Boolean +) + +private fun Table.getOrPut(r: R, c: C, v: () -> V): V = + get(r, c) ?: v().also { put(r, c, it) } diff --git a/testing/options/src/main/proto/com/toasttab/protokt/testing/options/specify_package.proto b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/ClassNames.kt similarity index 67% rename from testing/options/src/main/proto/com/toasttab/protokt/testing/options/specify_package.proto rename to protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/ClassNames.kt index 2fd12ae1c..f84d9badd 100644 --- a/testing/options/src/main/proto/com/toasttab/protokt/testing/options/specify_package.proto +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/ClassNames.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,12 +13,12 @@ * limitations under the License. */ -syntax = "proto3"; +package protokt.v1.codegen.util -package com.toasttab.protokt.testing.options; +import com.squareup.kotlinpoet.ClassName -import "protokt/protokt.proto"; +const val DESERIALIZER = "Deserializer" +const val DSL = "Dsl" -option (.protokt.file).kotlin_package = "com.toasttab.protokt.testing.options.other"; - -message OtherModel {} +fun GeneratorContext.className(simpleNames: List) = + ClassName(kotlinPackage, simpleNames) diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/EnumParser.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/EnumParser.kt new file mode 100644 index 000000000..37ee1999a --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/EnumParser.kt @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.util + +import com.google.common.base.CaseFormat +import com.google.protobuf.DescriptorProtos.EnumDescriptorProto +import com.toasttab.protokt.v1.ProtoktProto + +class EnumParser( + private val ctx: GeneratorContext, + private val idx: Int, + private val desc: EnumDescriptorProto, + private val enclosingMessages: List +) { + fun toEnum(): Enum { + val enumTypeNamePrefixToStrip = + (CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, desc.name) + '_') + .takeIf { desc.valueList.all { e -> e.name.startsWith(it) } } + + val simpleNames = enclosingMessages + desc.name + + return Enum( + values = desc.valueList.mapIndexed { enumIdx, t -> + Enum.Value( + t.number, + t.name, + newEnumValueName(enumTypeNamePrefixToStrip, t.name), + EnumValueOptions( + t.options, + t.options.getExtension(ProtoktProto.enumValue) + ), + enumIdx + ) + }, + index = idx, + options = EnumOptions( + desc.options, + desc.options.getExtension(ProtoktProto.enum_) + ), + className = ctx.className(simpleNames), + deserializerClassName = ctx.className(simpleNames + DESERIALIZER) + ) + } +} + +private fun newEnumValueName(enumTypeNamePrefix: String?, name: String) = + if (enumTypeNamePrefix != null) { + name.removePrefix(enumTypeNamePrefix) + } else { + name + } diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/ErrorContext.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/ErrorContext.kt new file mode 100644 index 000000000..959848daa --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/ErrorContext.kt @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.util + +private val context = mutableMapOf() + +private const val FILE_NAME = "fileName" +private const val MESSAGE_NAME = "messageName" +private const val FIELD_NAME = "fieldName" +private const val ENUM_NAME = "enumName" +private const val SERVICE_NAME = "serviceName" + +object ErrorContext { + fun withFileName(name: String, action: () -> T) = + withProperty(FILE_NAME, name, action) + + fun withMessageName(name: Any, action: () -> T) = + withProperty(MESSAGE_NAME, name, action) + + fun withFieldName(name: Any, action: () -> T) = + withListProperty(FIELD_NAME, name, action) + + fun withEnumName(name: Any, action: () -> T) = + withProperty(ENUM_NAME, name, action) + + fun withServiceName(name: Any, action: () -> T) = + withProperty(SERVICE_NAME, name, action) + + private fun withListProperty(propertyName: String, propertyValue: Any, action: () -> T): T { + list(propertyName).add(propertyValue) + val result = action() + list(propertyName).removeLast() + return result + } + + private fun withProperty(propertyName: String, propertyValue: Any, action: () -> T): T { + context[propertyName] = propertyValue + val result = action() + context[propertyName] = null + return result + } +} + +fun formatErrorMessage() = + "Error generating code for file ${context[FILE_NAME]}: " + + listOfNotNull( + context[MESSAGE_NAME]?.let { "message $it" }, + list(FIELD_NAME).lastOrNull()?.let { "field $it" }, + context[ENUM_NAME]?.let { "enum $it" }, + context[SERVICE_NAME]?.let { "service $it" } + ).joinToString(", ") + +@Suppress("UNCHECKED_CAST") +private fun list(propertyName: String) = + context.getOrPut(propertyName) { mutableListOf() } as MutableList diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/FieldParser.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/FieldParser.kt new file mode 100644 index 000000000..c279a7601 --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/FieldParser.kt @@ -0,0 +1,280 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.util + +import com.google.common.base.CaseFormat.LOWER_CAMEL +import com.google.common.base.CaseFormat.LOWER_UNDERSCORE +import com.google.common.base.CaseFormat.UPPER_CAMEL +import com.google.protobuf.DescriptorProtos.DescriptorProto +import com.google.protobuf.DescriptorProtos.FieldDescriptorProto +import com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Label.LABEL_OPTIONAL +import com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Label.LABEL_REPEATED +import com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type +import com.google.protobuf.DescriptorProtos.FileDescriptorProto +import com.google.protobuf.DescriptorProtos.OneofDescriptorProto +import com.squareup.kotlinpoet.ClassName +import com.squareup.kotlinpoet.asTypeName +import com.toasttab.protokt.v1.ProtoktProto +import protokt.v1.codegen.util.ErrorContext.withFieldName + +class FieldParser( + private val ctx: GeneratorContext, + private val desc: DescriptorProto, + private val enclosingMessages: List +) { + fun toFields(): List { + val generatedOneofIndices = mutableSetOf() + val fields = mutableListOf() + + desc.fieldList.forEachIndexed { idx, t -> + withFieldName(t.name) { + if (t.type != Type.TYPE_GROUP) { + t.oneofIndex.takeIf { t.hasOneofIndex() }?.let { oneofIndex -> + if (oneofIndex !in generatedOneofIndices) { + generatedOneofIndices.add(oneofIndex) + fields.add(toOneof(idx, desc, desc.getOneofDecl(oneofIndex), t, fields)) + } + } ?: fields.add(toStandard(idx, t)) + } + } + } + + return fields + } + + private fun toOneof( + idx: Int, + desc: DescriptorProto, + oneof: OneofDescriptorProto, + field: FieldDescriptorProto, + fields: List + ): Field { + if (field.proto3Optional) { + return toStandard(idx, field) + } + + val oneofFieldDescriptors = + desc.fieldList.filter { it.hasOneofIndex() && it.oneofIndex == field.oneofIndex } + + val oneofStdFields = + oneofFieldDescriptors.mapIndexed { fdpIdx, fdp -> + toStandard(idx + fdpIdx, fdp, true) + } + + val fieldTypeNames = + oneofStdFields.associate { + it.fieldName to LOWER_CAMEL.to(UPPER_CAMEL, it.fieldName) + } + + val name = LOWER_UNDERSCORE.to(UPPER_CAMEL, oneof.name) + + return Oneof( + name = name, + className = ClassName(ctx.kotlinPackage, enclosingMessages + desc.name + name), + fieldTypeNames = fieldTypeNames, + fieldName = LOWER_UNDERSCORE.to(LOWER_CAMEL, oneof.name), + fields = oneofStdFields, + options = OneofOptions( + oneof.options, + oneof.options.getExtension(ProtoktProto.oneof) + ), + // index relative to all oneofs in this message + index = idx - fields.filterIsInstance().count() + ) + } + + private fun toStandard( + idx: Int, + fdp: FieldDescriptorProto, + withinOneof: Boolean = false + ): StandardField { + val fieldType = toFieldType(fdp.type) + val protoktOptions = fdp.options.getExtension(ProtoktProto.property) + val repeated = fdp.label == LABEL_REPEATED + val mapEntry = mapEntry(fdp) + val optional = optional(fdp) + val packed = packed(fieldType, fdp) + val tag = + if (repeated && packed) { + Tag.Packed(fdp.number) + } else { + Tag.Unpacked(fdp.number, fieldType.wireType) + } + + if (protoktOptions.nonNull) { + validateNonNullOption(fdp, fieldType, repeated, mapEntry, withinOneof, optional) + } + + return StandardField( + number = fdp.number, + tag = tag, + type = fieldType, + repeated = repeated, + optional = !withinOneof && optional, + packed = packed, + mapEntry = mapEntry, + fieldName = LOWER_UNDERSCORE.to(LOWER_CAMEL, fdp.name), + options = FieldOptions(fdp.options, protoktOptions), + protoTypeName = fdp.typeName, + className = typeName(fdp.typeName, fieldType), + index = idx + ) + } + + private fun mapEntry(fdp: FieldDescriptorProto) = + if (fdp.label == LABEL_REPEATED && fdp.type == Type.TYPE_MESSAGE) { + findMapEntry(ctx.fdp, fdp.typeName) + ?.takeIf { it.options.mapEntry } + ?.let { resolveMapEntry(MessageParser(ctx, -1, it, enclosingMessages).toMessage()) } + } else { + null + } + + private fun resolveMapEntry(m: Message) = + MapEntry( + (m.fields[0] as StandardField), + (m.fields[1] as StandardField) + ) + + private fun findMapEntry( + fdp: FileDescriptorProto, + name: String, + parent: DescriptorProto? = null + ): DescriptorProto? { + val (typeList, typeName) = + if (parent == null) { + Pair( + fdp.messageTypeList.filterNotNull(), + name.removePrefix(".${fdp.`package`}.") + ) + } else { + parent.nestedTypeList.filterNotNull() to name + } + + typeName.indexOf('.').let { idx -> + return if (idx == -1) { + typeList.firstOrNull { it.name == typeName } + } else { + findMapEntry( + fdp, + typeName.substring(idx + 1), + typeList.firstOrNull { it.name == typeName.substring(0, idx) } + ) + } + } + } + + private fun typeName(protoTypeName: String, fieldType: FieldType): ClassName { + val fullyProtoQualified = protoTypeName.startsWith(".") + + return if (fullyProtoQualified) { + requalifyProtoType(protoTypeName) + } else { + protoTypeName.let { + if (it.isEmpty()) { + fieldType.protoktFieldType.asTypeName() + } else { + ClassName.bestGuess(it) + } + } + } + } + + private fun optional(fdp: FieldDescriptorProto) = + (fdp.label == LABEL_OPTIONAL && ctx.proto2) || fdp.proto3Optional + + private fun packed(type: FieldType, fdp: FieldDescriptorProto) = + type.packable && + // marginal support for proto2 + ( + (ctx.proto2 && fdp.options.packed) || + // packed if: proto3 and `packed` isn't set, or proto3 + // and `packed` is true. If proto3, only explicitly + // setting `packed` to false disables packing, since + // the default value for an unset boolean is false. + (ctx.proto3 && (!fdp.options.hasPacked() || (fdp.options.hasPacked() && fdp.options.packed))) + ) +} + +private fun toFieldType(type: Type) = + when (type) { + Type.TYPE_BOOL -> FieldType.Bool + Type.TYPE_BYTES -> FieldType.Bytes + Type.TYPE_DOUBLE -> FieldType.Double + Type.TYPE_ENUM -> FieldType.Enum + Type.TYPE_FIXED32 -> FieldType.Fixed32 + Type.TYPE_FIXED64 -> FieldType.Fixed64 + Type.TYPE_FLOAT -> FieldType.Float + Type.TYPE_INT32 -> FieldType.Int32 + Type.TYPE_INT64 -> FieldType.Int64 + Type.TYPE_MESSAGE -> FieldType.Message + Type.TYPE_SFIXED32 -> FieldType.SFixed32 + Type.TYPE_SFIXED64 -> FieldType.SFixed64 + Type.TYPE_SINT32 -> FieldType.SInt32 + Type.TYPE_SINT64 -> FieldType.SInt64 + Type.TYPE_STRING -> FieldType.String + Type.TYPE_UINT32 -> FieldType.UInt32 + Type.TYPE_UINT64 -> FieldType.UInt64 + else -> error("Unknown type: $type") + } + +private fun validateNonNullOption( + fdp: FieldDescriptorProto, + type: FieldType, + repeated: Boolean, + mapEntry: MapEntry?, + withinOneof: Boolean, + optional: Boolean +) { + fun FieldType.typeName() = + this::class.simpleName!!.lowercase() + + fun name(field: StandardField) = + if (field.type == FieldType.Enum) { + field.protoTypeName + } else { + field.type.typeName() + } + + val typeName = + when (type) { + FieldType.Enum, FieldType.Message -> fdp.typeName + else -> type.typeName() + } + + require(!optional) { + "(protokt.property).non_null is not applicable to optional fields " + + "and is inapplicable to optional $typeName" + } + require(!withinOneof) { + "(protokt.property).non_null is only applicable to top level types " + + "and is inapplicable to oneof field $typeName" + } + require(type == FieldType.Message && !repeated) { + "(protokt.property).non_null is only applicable to message types " + + "and is inapplicable to non-message " + + when { + mapEntry != null -> + "map<${name(mapEntry.key)}, ${name(mapEntry.value)}>" + + repeated -> + "repeated $typeName" + + else -> + type.typeName() + } + } +} diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/FieldType.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/FieldType.kt new file mode 100644 index 000000000..835decb1a --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/FieldType.kt @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2020 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.util + +import com.squareup.kotlinpoet.CodeBlock +import protokt.v1.KtEnum +import protokt.v1.KtMessage +import protokt.v1.KtMessageSerializer +import protokt.v1.sizeOfSInt32 +import protokt.v1.sizeOfSInt64 +import kotlin.reflect.KClass + +sealed class FieldType { + open val kotlinRepresentation: KClass<*>? = null + open val inlineRepresentation: KClass<*>? = null + open val ktRepresentation: KClass<*>? = null + + sealed class Nonscalar( + override val kotlinRepresentation: KClass<*>? = null, + override val ktRepresentation: KClass<*>? = null + ) : FieldType() + + object Enum : Nonscalar(ktRepresentation = KtEnum::class) + object Message : Nonscalar(ktRepresentation = KtMessage::class) + object String : Nonscalar(kotlin.String::class) + object Bytes : Nonscalar(protokt.v1.Bytes::class) + + sealed class Scalar( + override val kotlinRepresentation: KClass<*>? = null + ) : FieldType() + + object Bool : Scalar(Boolean::class) + object Double : Scalar(kotlin.Double::class) + object Float : Scalar(kotlin.Float::class) + object Fixed32 : Scalar(UInt::class) + object Fixed64 : Scalar(ULong::class) + object Int32 : Scalar(Int::class) + object Int64 : Scalar(Long::class) + object SFixed32 : Scalar(Int::class) + object SFixed64 : Scalar(Long::class) + object SInt32 : Scalar(Int::class) + object SInt64 : Scalar(Long::class) + object UInt32 : Scalar(UInt::class) + object UInt64 : Scalar(ULong::class) + + val protoktFieldType + get() = when (this) { + is Bytes -> protokt.v1.Bytes::class + else -> + requireNotNull(kotlinRepresentation) { + "no protokt field type for $this" + } + } + + val packable + get() = this !in setOf(Bytes, Message, String) + + val writeFn + get() = when (this) { + Fixed32 -> KtMessageSerializer::writeFixed32.name + SFixed32 -> KtMessageSerializer::writeSFixed32.name + UInt32 -> KtMessageSerializer::writeUInt32.name + SInt32 -> KtMessageSerializer::writeSInt32.name + Fixed64 -> KtMessageSerializer::writeFixed64.name + SFixed64 -> KtMessageSerializer::writeSFixed64.name + UInt64 -> KtMessageSerializer::writeUInt64.name + SInt64 -> KtMessageSerializer::writeSInt64.name + else -> "write" + } + + sealed interface SizeFn + class Const(val size: Int) : SizeFn + class Method(val name: kotlin.String) : SizeFn + + val sizeFn: SizeFn + get() = when (this) { + Bool -> Const(1) + Double, Fixed64, SFixed64 -> Const(8) + Float, Fixed32, SFixed32 -> Const(4) + SInt32 -> Method(::sizeOfSInt32.name) + SInt64 -> Method(::sizeOfSInt64.name) + else -> Method("sizeOf") + } + + val scalar + get() = this is Scalar + + val wireType + get() = when (this) { + Bool, + Enum, + Int32, + Int64, + SInt32, + SInt64, + UInt32, + UInt64 -> 0 + + Double, + Fixed64, + SFixed64 -> 1 + + Bytes, + Message, + String -> 2 + + Float, + Fixed32, + SFixed32 -> 5 + } + + val defaultValue: CodeBlock + get() = when (this) { + Message -> CodeBlock.of("null") + Enum -> error("enums do not have defaults; this is bug in the code generator") + Bool -> CodeBlock.of("false") + Fixed32, UInt32 -> CodeBlock.of("0u") + Int32, SFixed32, SInt32 -> CodeBlock.of("0") + Fixed64, UInt64 -> CodeBlock.of("0uL") + Int64, SFixed64, SInt64 -> CodeBlock.of("0L") + Float -> CodeBlock.of("0.0F") + Double -> CodeBlock.of("0.0") + Bytes -> CodeBlock.of("%T.empty()", protokt.v1.Bytes::class) + String -> CodeBlock.of("\"\"") + } +} diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/FileContentParser.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/FileContentParser.kt new file mode 100644 index 000000000..7467f4995 --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/FileContentParser.kt @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2019 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.util + +import com.google.protobuf.DescriptorProtos.DescriptorProto +import com.google.protobuf.DescriptorProtos.EnumDescriptorProto +import com.google.protobuf.DescriptorProtos.ServiceDescriptorProto +import protokt.v1.codegen.util.ErrorContext.withEnumName +import protokt.v1.codegen.util.ErrorContext.withMessageName +import protokt.v1.codegen.util.ErrorContext.withServiceName + +fun parseFileContents(ctx: GeneratorContext) = + ProtoFileContents( + ProtoFileInfo(ctx), + FileContentParser(ctx).parseContents() + ) + +class FileContentParser( + private val ctx: GeneratorContext, + private val enums: List, + private val messages: List, + private val services: List, + private val enclosingMessages: List +) { + constructor(ctx: GeneratorContext) : this( + ctx, + ctx.fdp.enumTypeList, + ctx.fdp.messageTypeList, + ctx.fdp.serviceList, + emptyList() + ) + + fun parseContents(): List = + enums.mapIndexed { idx, desc -> + withEnumName(desc.name) { + EnumParser(ctx, idx, desc, enclosingMessages).toEnum() + } + } + + messages.mapIndexed { idx, desc -> + withMessageName((enclosingMessages + desc.name).joinToString(".")) { + MessageParser(ctx, idx, desc, enclosingMessages).toMessage() + } + } + + services.mapIndexed { idx, desc -> + withServiceName(desc.name) { + ServiceParser(ctx, idx, desc).toService() + } + } +} diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/GeneratedCodeCleanup.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/GeneratedCodeCleanup.kt new file mode 100644 index 000000000..c786dba3a --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/GeneratedCodeCleanup.kt @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.util + +import com.pinterest.ktlint.rule.engine.api.Code +import com.pinterest.ktlint.rule.engine.api.KtLintRuleEngine +import com.pinterest.ktlint.ruleset.standard.StandardRuleSetProvider +import com.pinterest.ktlint.ruleset.standard.rules.NO_UNIT_RETURN_RULE_ID + +fun tidy(rawCode: String, context: GeneratorContext): String { + var code = stripApiMode(rawCode) + if (context.formatOutput) { + code = format(code) + } + return code +} + +// strips Explicit API mode declarations +// https://kotlinlang.org/docs/whatsnew14.html#explicit-api-mode-for-library-authors +private fun stripApiMode(code: String) = + code + // https://stackoverflow.com/a/64970734 + .replace("public class ", "class ") + .replace("public abstract ", "abstract ") + .replace("public open ", "open ") + .replace("public suspend ", "suspend ") + .replace("public final ", "final ") + .replace("public const ", "const ") + .replace("public val ", "val ") + .replace("public var ", "var ") + .replace("public fun ", "fun ") + .replace("public object ", "object ") + .replace("public companion ", "companion ") + .replace("public override ", "override ") + .replace("public sealed ", "sealed ") + .replace("public data ", "data ") + +private fun format(code: String) = + KtLintRuleEngine(ruleProviders()).format(Code.fromSnippet(code)) + +private fun ruleProviders() = + StandardRuleSetProvider() + .getRuleProviders() + // If the generated class' name is Unit then the deserializer must + // explicitly return Unit, and kotlinpoet will not qualify the name + // since it is contained within the Unit class definition. + // + // This could be avoided if the deserializer is moved out of the + // companion object into a private top-level function, but is required + // in strict API mode. + .filterNot { it.ruleId == NO_UNIT_RETURN_RULE_ID } + .toSet() diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/GeneratorContext.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/GeneratorContext.kt new file mode 100644 index 000000000..542836aee --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/GeneratorContext.kt @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2020 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.util + +import com.google.protobuf.DescriptorProtos.FileDescriptorProto +import com.toasttab.protokt.v1.ProtoktProto +import protokt.v1.gradle.PROTOKT_VERSION + +class GeneratorContext( + val fdp: FileDescriptorProto, + params: PluginParams, + allFiles: List +) { + val classLookup = params.classLookup + val generateTypes = params.generateTypes + val generateDescriptors = params.generateDescriptors + val generateGrpcDescriptors = params.generateGrpcDescriptors + val generateGrpcKotlinStubs = params.generateGrpcKotlinStubs + val formatOutput = params.formatOutput + val appliedKotlinPlugin = params.appliedKotlinPlugin + + val protoktVersion = PROTOKT_VERSION + + val allPackagesByFileName = packagesByFileName(allFiles) + val allFilesByName = allFiles.associateBy { it.name } + val allDescriptorClassNamesByFileName = generateFdpObjectNames(allFiles) + + val fileOptions = fdp.fileOptions + val fileDescriptorObjectName = allDescriptorClassNamesByFileName.getValue(fdp.name) + val kotlinPackage = allPackagesByFileName.getValue(fdp.name) + + val proto2 = !fdp.hasSyntax() || fdp.syntax == "proto2" + val proto3 = fdp.syntax == "proto3" +} + +val FileDescriptorProto.fileOptions + get() = FileOptions(options, options.getExtension(ProtoktProto.file)) + +private fun generateFdpObjectNames(files: List): Map = + files.associate { fdp -> + Pair( + fdp.name, + fdp.fileOptions.protokt.fileDescriptorObjectName.takeIf { it.isNotEmpty() } + ?: fdp.fileOptions.default.javaOuterClassname.takeIf { it.isNotEmpty() } + ?: (fdp.name.substringBefore(".proto").substringAfterLast('/') + "_file_descriptor") + ) + } diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/GrpcKotlinGeneratorSupport.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/GrpcKotlinGeneratorSupport.kt new file mode 100644 index 000000000..d2b7cd15a --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/GrpcKotlinGeneratorSupport.kt @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.util + +import com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest +import com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse +import io.grpc.kotlin.generator.GeneratorRunner +import java.io.ByteArrayInputStream +import java.io.ByteArrayOutputStream + +fun generateGrpcKotlinStubs( + params: PluginParams, + request: CodeGeneratorRequest +): List = + if ( + params.appliedKotlinPlugin in setOf(KotlinPlugin.JVM, KotlinPlugin.ANDROID) && + params.generateGrpcKotlinStubs + ) { + val out = ReadableByteArrayOutputStream() + GeneratorRunner.mainAsProtocPlugin(stripPackages(request).toByteArray().inputStream(), out) + CodeGeneratorResponse.parseFrom(out.inputStream()).fileList + } else { + emptyList() + } + +private fun stripPackages(request: CodeGeneratorRequest) = + request.toBuilder() + .clearProtoFile() + .addAllProtoFile( + request.protoFileList.map { fdp -> + fdp.toBuilder() + .setOptions( + fdp.options.toBuilder() + .setJavaPackage(resolvePackage(fdp)) + .build() + ) + .build() + } + ) + .build() + +private class ReadableByteArrayOutputStream : ByteArrayOutputStream() { + fun inputStream() = + ByteArrayInputStream(buf, 0, count) +} diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/MessageParser.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/MessageParser.kt new file mode 100644 index 000000000..1bd8287d9 --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/MessageParser.kt @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.util + +import com.google.protobuf.DescriptorProtos.DescriptorProto +import com.toasttab.protokt.v1.ProtoktProto + +class MessageParser( + private val ctx: GeneratorContext, + private val idx: Int, + private val desc: DescriptorProto, + private val enclosingMessages: List +) { + fun toMessage(): Message { + val typeName = desc.name + val fieldList = FieldParser(ctx, desc, enclosingMessages).toFields() + val simpleNames = enclosingMessages + typeName + return Message( + fields = fieldList.sortedBy { + when (it) { + is StandardField -> it + is Oneof -> it.fields.first() + }.number + }, + nestedTypes = FileContentParser( + ctx, + desc.enumTypeList, + desc.nestedTypeList, + emptyList(), + simpleNames + ).parseContents(), + mapEntry = desc.options?.mapEntry == true, + options = MessageOptions( + desc.options, + desc.options.getExtension(ProtoktProto.class_) + ), + index = idx, + fullProtobufTypeName = "${ctx.fdp.`package`}.$typeName", + className = ctx.className(simpleNames), + deserializerClassName = ctx.className(simpleNames + DESERIALIZER), + dslClassName = ctx.className(simpleNames + "${typeName}$DSL") + ) + } +} diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/PackageResolution.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/PackageResolution.kt new file mode 100644 index 000000000..d9e3c85bf --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/PackageResolution.kt @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2020 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.util + +import com.google.protobuf.DescriptorProtos.FileDescriptorProto +import com.squareup.kotlinpoet.ClassName +import protokt.v1.Bytes + +const val googleProtobuf = "google.protobuf" + +val protoktV1 = Bytes::class.java.`package`.name +val protoktV1GoogleProto = Bytes::class.java.`package`.name + "." + googleProtobuf + +fun packagesByFileName(protoFileList: List) = + protoFileList.associate { it.name to resolvePackage(it) } + +fun resolvePackage(fdp: FileDescriptorProto) = + if (fdp.`package`.startsWith("protokt.v1")) { + fdp.`package` + } else { + "protokt.v1." + fdp.`package` + } + +fun requalifyProtoType(typeName: String): ClassName = + // type name might have a `.` prefix + ClassName.bestGuess( + if (typeName.startsWith(".protokt.v1")) { + typeName.removePrefix(".") + } else { + "protokt.v1." + typeName.removePrefix(".") + } + ) diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/PluginParams.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/PluginParams.kt new file mode 100644 index 000000000..e2ce16e45 --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/PluginParams.kt @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.util + +import com.google.common.base.CaseFormat +import com.squareup.kotlinpoet.asClassName +import protokt.v1.gradle.APPLIED_KOTLIN_PLUGIN +import protokt.v1.gradle.FORMAT_OUTPUT +import protokt.v1.gradle.GENERATE_DESCRIPTORS +import protokt.v1.gradle.GENERATE_GRPC_DESCRIPTORS +import protokt.v1.gradle.GENERATE_GRPC_KOTLIN_STUBS +import protokt.v1.gradle.GENERATE_TYPES +import protokt.v1.gradle.KOTLIN_EXTRA_CLASSPATH +import protokt.v1.gradle.ProtoktExtension +import protokt.v1.gradle.ProtoktExtension.Generate +import java.net.URLDecoder +import kotlin.reflect.full.declaredMemberProperties + +class PluginParams( + params: Map +) { + val classLookup = + ClassLookup( + params.getOrDefault(KOTLIN_EXTRA_CLASSPATH, "") + .split(";") + .map { URLDecoder.decode(it, "UTF-8") } + ) + + val generateTypes = params.getOrDefault(GENERATE_TYPES) + val generateDescriptors = params.getOrDefault(GENERATE_DESCRIPTORS) + val generateGrpcDescriptors = params.getOrDefault(GENERATE_GRPC_DESCRIPTORS) + val generateGrpcKotlinStubs = params.getOrDefault(GENERATE_GRPC_KOTLIN_STUBS) + val formatOutput = params.getOrDefault(FORMAT_OUTPUT) + val appliedKotlinPlugin = params[APPLIED_KOTLIN_PLUGIN]?.toKotlinPluginEnum() +} + +private inline fun Map.getOrDefault(key: String): Boolean { + val inParams = get(key)?.toBoolean() + return if (inParams != null) { + inParams + } else { + val default = T::class.constructors.single().call()!! + + val prefix = + T::class.asClassName() + .simpleNames + .filter { it != ProtoktExtension::class.simpleName } + .joinToString("_") { it.lowercase() } + + default::class.declaredMemberProperties + .single { + it.name == CaseFormat.LOWER_UNDERSCORE.to( + CaseFormat.LOWER_CAMEL, + key.removePrefix(prefix + "_") + ) + } + .call(default) as Boolean + } +} + +private fun String.toKotlinPluginEnum() = + when (this) { + "org.jetbrains.kotlin.multiplatform" -> KotlinPlugin.MULTIPLATFORM + "org.jetbrains.kotlin.js" -> KotlinPlugin.JS + "org.jetbrains.kotlin.jvm" -> KotlinPlugin.JVM + "org.jetbrains.kotlin.android" -> KotlinPlugin.ANDROID + else -> null + } + +enum class KotlinPlugin { + MULTIPLATFORM, + JS, + JVM, + ANDROID +} diff --git a/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/ServiceParser.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/ServiceParser.kt new file mode 100644 index 000000000..5a9c96dde --- /dev/null +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/ServiceParser.kt @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen.util + +import com.google.protobuf.DescriptorProtos.MethodDescriptorProto +import com.google.protobuf.DescriptorProtos.ServiceDescriptorProto +import com.toasttab.protokt.v1.ProtoktProto + +class ServiceParser( + private val ctx: GeneratorContext, + private val idx: Int, + private val desc: ServiceDescriptorProto +) { + fun toService() = + Service( + name = desc.name, + methods = desc.methodList.map(::toMethod), + deprecated = desc.options.deprecated, + options = ServiceOptions( + desc.options, + desc.options.getExtension(ProtoktProto.service) + ), + index = idx + ) + + private fun toMethod(desc: MethodDescriptorProto) = + Method( + name = desc.name, + inputType = requalifyProtoType(desc.inputType), + outputType = requalifyProtoType(desc.outputType), + clientStreaming = desc.clientStreaming, + serverStreaming = desc.serverStreaming, + deprecated = desc.options.deprecated, + options = MethodOptions( + desc.options, + desc.options.getExtension(ProtoktProto.method) + ) + ) +} diff --git a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/protoc/Types.kt b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/Types.kt similarity index 68% rename from protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/protoc/Types.kt rename to protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/Types.kt index c7eac88f8..46268a011 100644 --- a/protokt-codegen/src/main/kotlin/com/toasttab/protokt/codegen/protoc/Types.kt +++ b/protokt-codegen/src/main/kotlin/protokt/v1/codegen/util/Types.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,34 +13,26 @@ * limitations under the License. */ -package com.toasttab.protokt.codegen.protoc +package protokt.v1.codegen.util import com.google.protobuf.DescriptorProtos import com.squareup.kotlinpoet.ClassName -import com.squareup.kotlinpoet.TypeName import com.squareup.kotlinpoet.TypeSpec -import com.toasttab.protokt.codegen.model.FieldType -import com.toasttab.protokt.codegen.model.PClass -import com.toasttab.protokt.codegen.model.PPackage -import com.toasttab.protokt.ext.ProtoktProto.ProtoktEnumOptions -import com.toasttab.protokt.ext.ProtoktProto.ProtoktEnumValueOptions -import com.toasttab.protokt.ext.ProtoktProto.ProtoktFieldOptions -import com.toasttab.protokt.ext.ProtoktProto.ProtoktFileOptions -import com.toasttab.protokt.ext.ProtoktProto.ProtoktMessageOptions -import com.toasttab.protokt.ext.ProtoktProto.ProtoktMethodOptions -import com.toasttab.protokt.ext.ProtoktProto.ProtoktOneofOptions -import com.toasttab.protokt.ext.ProtoktProto.ProtoktServiceOptions -import com.toasttab.protokt.rt.computeTag - -sealed class TopLevelType { - abstract val name: String -} +import com.toasttab.protokt.v1.ProtoktProto.ProtoktEnumOptions +import com.toasttab.protokt.v1.ProtoktProto.ProtoktEnumValueOptions +import com.toasttab.protokt.v1.ProtoktProto.ProtoktFieldOptions +import com.toasttab.protokt.v1.ProtoktProto.ProtoktFileOptions +import com.toasttab.protokt.v1.ProtoktProto.ProtoktMessageOptions +import com.toasttab.protokt.v1.ProtoktProto.ProtoktMethodOptions +import com.toasttab.protokt.v1.ProtoktProto.ProtoktOneofOptions +import com.toasttab.protokt.v1.ProtoktProto.ProtoktServiceOptions + +sealed class TopLevelType class Message( - override val name: String, - val typeName: ClassName, - val deserializerTypeName: TypeName, - val dslTypeName: TypeName, + val className: ClassName, + val deserializerClassName: ClassName, + val dslClassName: ClassName, val fields: List, val nestedTypes: List, val mapEntry: Boolean, @@ -55,9 +47,8 @@ data class MessageOptions( ) class Enum( - override val name: String, - val typeName: TypeName, - val deserializerTypeName: TypeName, + val className: ClassName, + val deserializerClassName: ClassName, val options: EnumOptions, val values: List, val index: Int @@ -82,8 +73,7 @@ class EnumValueOptions( ) class Service( - override val name: String, - val type: String, + val name: String, val methods: List, val deprecated: Boolean, val options: ServiceOptions, @@ -97,8 +87,8 @@ class ServiceOptions( class Method( val name: String, - val inputType: PClass, - val outputType: PClass, + val inputType: ClassName, + val outputType: ClassName, val clientStreaming: Boolean, val serverStreaming: Boolean, val deprecated: Boolean, @@ -116,9 +106,10 @@ sealed class Field { class StandardField( val number: Int, + val tag: Tag, override val fieldName: String, val type: FieldType, - val typePClass: PClass, + val className: ClassName, val repeated: Boolean, val optional: Boolean, val packed: Boolean, @@ -133,7 +124,7 @@ class StandardField( class Oneof( val name: String, - val typeName: TypeName, + val className: ClassName, override val fieldName: String, val fields: List, val fieldTypeNames: Map, @@ -156,35 +147,31 @@ class OneofOptions( val protokt: ProtoktOneofOptions ) -class FileDesc( - val name: String, - val protoPackage: String, - val kotlinPackage: PPackage, - val options: FileOptions, - val context: ProtocolContext, - val sourceCodeInfo: DescriptorProtos.SourceCodeInfo -) +class ProtoFileInfo( + val context: GeneratorContext +) { + val name = context.fdp.name + val kotlinPackage = context.kotlinPackage + val protoPackage = context.fdp.`package` + val options = context.fileOptions + val sourceCodeInfo = context.fdp.sourceCodeInfo +} class FileOptions( val default: DescriptorProtos.FileOptions, val protokt: ProtoktFileOptions ) -class Protocol( - val desc: FileDesc, +class ProtoFileContents( + val info: ProtoFileInfo, val types: List ) -class AnnotatedType( +class GeneratedType( val rawType: TopLevelType, val typeSpec: TypeSpec ) -class TypeDesc( - val desc: FileDesc, - val type: AnnotatedType -) - sealed class Tag(val value: Int) : Comparable { class Packed( number: Int @@ -197,4 +184,10 @@ sealed class Tag(val value: Int) : Comparable { override fun compareTo(other: Tag) = value.compareTo(other.value) + + override fun toString() = + value.toString() } + +private fun computeTag(fieldNumber: Int, wireType: Int) = + (fieldNumber shl 3) or wireType diff --git a/protokt-codegen/src/test/kotlin/com/toasttab/protokt/NonNullValidationTest.kt b/protokt-codegen/src/test/kotlin/com/toasttab/protokt/NonNullValidationTest.kt deleted file mode 100644 index 7b442c193..000000000 --- a/protokt-codegen/src/test/kotlin/com/toasttab/protokt/NonNullValidationTest.kt +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2022 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt - -import com.google.common.truth.Truth.assertThat -import com.toasttab.protokt.codegen.model.FieldType -import org.junit.jupiter.api.assertThrows -import org.junit.jupiter.params.ParameterizedTest -import org.junit.jupiter.params.provider.Arguments -import org.junit.jupiter.params.provider.MethodSource - -class NonNullValidationTest : AbstractProtoktCodegenTest() { - @ParameterizedTest - @MethodSource("fieldTypes") - fun `field with bad non-null option`(fieldType: String, fieldTypeName: String?) { - val thrown = assertThrows { - runPlugin("non_null.proto") { replace("REPLACE", fieldType) } - } - - println("Caught: $thrown") - - assertThat(thrown) - .hasMessageThat() - .isEqualTo( - "(protokt.property).non_null is only applicable to message " + - "types and is inapplicable to non-message " + - (fieldTypeName ?: fieldType) - ) - } - - @ParameterizedTest - @MethodSource("fieldTypesOneof") - fun `oneof type`(fieldType: String, fieldTypeName: String?) { - val thrown = assertThrows { - runPlugin("non_null_oneof.proto") { replace("REPLACE", fieldType) } - } - - println("Caught: $thrown") - - assertThat(thrown) - .hasMessageThat() - .isEqualTo( - "(protokt.property).non_null is only applicable to top level " + - "types and is inapplicable to oneof field " + - (fieldTypeName ?: fieldType) - ) - } - - @ParameterizedTest - @MethodSource("fieldTypesOptional") - fun `optional field`(fieldType: String, fieldTypeName: String?) { - val thrown = assertThrows { - runPlugin("non_null_optional.proto") { replace("REPLACE", fieldType) } - } - - println("Caught: $thrown") - - assertThat(thrown) - .hasMessageThat() - .isEqualTo( - "(protokt.property).non_null is not applicable to optional " + - "fields and is inapplicable to optional " + - (fieldTypeName ?: fieldType) - ) - } - - companion object { - @JvmStatic - fun fieldTypes() = - mapToArgs(argLists()) - - private fun mapToArgs(list: List<*>) = - list.map { - if (it is String) { - Arguments.of(it, null) - } else { - Arguments.of(*(it as List<*>).toTypedArray()) - } - } - - private fun argLists() = - ineligibleAnonymousTypes().map { it.name.lowercase() } + - ineligibleAnonymousTypes().map { "repeated ${it.name.lowercase()}" } + - listOf( - listOf("Foo", "enum"), - listOf("repeated Foo", "repeated .toasttab.protokt.codegen.testing.TestMessageWithBadNonNullField.Foo"), - listOf("repeated Bar", "repeated .toasttab.protokt.codegen.testing.TestMessageWithBadNonNullField.Bar"), - listOf("map", "map") - ) - - @JvmStatic - fun fieldTypesOptional() = - mapToArgs(argListsOptional()) - - private fun argListsOptional() = - ineligibleAnonymousTypes().map { it.name.lowercase() } + - listOf( - listOf("Foo", ".toasttab.protokt.codegen.testing.TestMessageWithBadNonNullOptionalField.Foo"), - listOf("Bar", ".toasttab.protokt.codegen.testing.TestMessageWithBadNonNullOptionalField.Bar"), - ) - - @JvmStatic - fun fieldTypesOneof() = - mapToArgs(argListsOneof()) - - private fun argListsOneof() = - ineligibleAnonymousTypes().map { it.name.lowercase() } + - listOf( - listOf("Foo", ".toasttab.protokt.codegen.testing.TestMessageWithBadNonNullOneof.Foo"), - listOf("Bar", ".toasttab.protokt.codegen.testing.TestMessageWithBadNonNullOneof.Bar"), - ) - - private fun ineligibleAnonymousTypes() = - FieldType.values().filterNot { it in setOf(FieldType.MESSAGE, FieldType.ENUM) } - } -} diff --git a/protokt-codegen/src/test/kotlin/com/toasttab/protokt/codegen/model/NumberTypesFieldNameRegressionTest.kt b/protokt-codegen/src/test/kotlin/com/toasttab/protokt/codegen/model/NumberTypesFieldNameRegressionTest.kt deleted file mode 100644 index cdba774fc..000000000 --- a/protokt-codegen/src/test/kotlin/com/toasttab/protokt/codegen/model/NumberTypesFieldNameRegressionTest.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2021 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.model - -import com.google.common.truth.Truth.assertThat -import com.toasttab.protokt.rt.Fixed32 -import com.toasttab.protokt.rt.Fixed64 -import com.toasttab.protokt.rt.Int32 -import com.toasttab.protokt.rt.Int64 -import com.toasttab.protokt.rt.SFixed32 -import com.toasttab.protokt.rt.SFixed64 -import com.toasttab.protokt.rt.SInt32 -import com.toasttab.protokt.rt.SInt64 -import com.toasttab.protokt.rt.UInt32 -import com.toasttab.protokt.rt.UInt64 -import org.junit.jupiter.api.Test -import kotlin.reflect.full.declaredMemberProperties - -class NumberTypesFieldNameRegressionTest { - @Test - fun `assert number type classes have the right field name`() { - listOf( - Int32::class, - Fixed32::class, - SFixed32::class, - UInt32::class, - SInt32::class, - Int64::class, - Fixed64::class, - SFixed64::class, - UInt64::class, - SInt64::class - ).forEach { - assertThat(it.declaredMemberProperties.single().name).isEqualTo("value") - } - } -} diff --git a/protokt-codegen/src/test/kotlin/com/toasttab/protokt/codegen/model/PClassTest.kt b/protokt-codegen/src/test/kotlin/com/toasttab/protokt/codegen/model/PClassTest.kt deleted file mode 100644 index 94aae894b..000000000 --- a/protokt-codegen/src/test/kotlin/com/toasttab/protokt/codegen/model/PClassTest.kt +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.model - -import arrow.core.None -import arrow.core.Some -import com.google.common.truth.Truth.assertThat -import org.junit.jupiter.api.Test - -class PClassTest { - @Test - fun `simple class is parsed`() { - assertThat(PClass.fromName("foo.bar.Foo")) - .isEqualTo( - PClass( - "Foo", - PPackage.fromString("foo.bar"), - None - ) - ) - } - - @Test - fun `default package class is parsed`() { - assertThat(PClass.fromName("Foo")) - .isEqualTo( - PClass( - "Foo", - PPackage.DEFAULT, - None - ) - ) - } - - @Test - fun `nested class is parsed`() { - assertThat(PClass.fromName("foo.bar.Foo.Bar")) - .isEqualTo( - PClass( - "Bar", - PPackage.fromString("foo.bar"), - Some( - PClass( - "Foo", - PPackage.fromString("foo.bar"), - None - ) - ) - ) - ) - } - - @Test - fun `doubly nested class is parsed`() { - assertThat(PClass.fromName("foo.bar.Foo.Bar.Baz")) - .isEqualTo( - PClass( - "Baz", - PPackage.fromString("foo.bar"), - Some( - PClass( - "Bar", - PPackage.fromString("foo.bar"), - Some( - PClass( - "Foo", - PPackage.fromString("foo.bar"), - None - ) - ) - ) - ) - ) - ) - } - - @Test - fun `default package nested class is parsed`() { - assertThat(PClass.fromName("Foo.Bar")) - .isEqualTo( - PClass( - "Bar", - PPackage.DEFAULT, - Some( - PClass( - "Foo", - PPackage.DEFAULT, - None - ) - ) - ) - ) - } - - @Test - fun `default package doubly nested class is parsed`() { - assertThat(PClass.fromName("Foo.Bar.Baz")) - .isEqualTo( - PClass( - "Baz", - PPackage.DEFAULT, - Some( - PClass( - "Bar", - PPackage.DEFAULT, - Some( - PClass( - "Foo", - PPackage.DEFAULT, - None - ) - ) - ) - ) - ) - ) - } - - @Test - fun `simple class qualifiedName`() { - assertThat(PClass.fromName("foo.bar.Foo").qualifiedName) - .isEqualTo("foo.bar.Foo") - } - - @Test - fun `default package class qualifiedName`() { - assertThat(PClass.fromName("Foo").qualifiedName) - .isEqualTo("Foo") - } - - @Test - fun `nested class qualifiedName`() { - assertThat(PClass.fromName("foo.bar.Foo.Bar").qualifiedName) - .isEqualTo("foo.bar.Foo.Bar") - } - - @Test - fun `doubly nested class qualifiedName`() { - assertThat(PClass.fromName("foo.bar.Foo.Bar.Baz").qualifiedName) - .isEqualTo("foo.bar.Foo.Bar.Baz") - } - - @Test - fun `default package nested class qualifiedName`() { - assertThat(PClass.fromName("Foo.Bar").qualifiedName) - .isEqualTo("Foo.Bar") - } - - @Test - fun `default package doubly nested class qualifiedName`() { - assertThat(PClass.fromName("Foo.Bar.Baz").qualifiedName) - .isEqualTo("Foo.Bar.Baz") - } - - @Test - fun `simple class nestedName`() { - assertThat(PClass.fromName("foo.bar.Foo").nestedName) - .isEqualTo("Foo") - } - - @Test - fun `default package class nestedName`() { - assertThat(PClass.fromName("Foo").nestedName) - .isEqualTo("Foo") - } - - @Test - fun `nested class nestedName`() { - assertThat(PClass.fromName("foo.bar.Foo.Bar").nestedName) - .isEqualTo("Foo.Bar") - } - - @Test - fun `doubly nested class nestedName`() { - assertThat(PClass.fromName("foo.bar.Foo.Bar.Baz").nestedName) - .isEqualTo("Foo.Bar.Baz") - } - - @Test - fun `default package nested class nestedName`() { - assertThat(PClass.fromName("Foo.Bar").nestedName) - .isEqualTo("Foo.Bar") - } - - @Test - fun `default package doubly nested class nestedName`() { - assertThat(PClass.fromName("Foo.Bar.Baz").nestedName) - .isEqualTo("Foo.Bar.Baz") - } -} diff --git a/protokt-codegen/src/test/kotlin/com/toasttab/protokt/codegen/model/PPackageTest.kt b/protokt-codegen/src/test/kotlin/com/toasttab/protokt/codegen/model/PPackageTest.kt deleted file mode 100644 index f7c3e67ca..000000000 --- a/protokt-codegen/src/test/kotlin/com/toasttab/protokt/codegen/model/PPackageTest.kt +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2019 Toast Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.toasttab.protokt.codegen.model - -import com.google.common.truth.Truth.assertThat -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.assertThrows - -class PPackageTest { - @Test - fun `basic package can be parsed`() { - assertThat(PPackage.fromString("foo.bar").toString()) - .isEqualTo("foo.bar") - } - - @Test - fun `basic package can be parsed from fully qualified class name`() { - assertThat(PPackage.fromClassName("foo.bar.Baz")) - .isEqualTo(PPackage.fromString("foo.bar")) - } - - @Test - fun `default package is default`() { - assertThat(PPackage.DEFAULT.default) - .isTrue() - } - - @Test - fun `default package can be parsed`() { - assertThat(PPackage.fromString("")) - .isEqualTo(PPackage.DEFAULT) - } - - @Test - fun `default package can be parsed from fully qualified class name`() { - assertThat(PPackage.fromClassName("Baz")) - .isEqualTo(PPackage.DEFAULT) - } - - @Test - fun `fromClassName throws on name starting with dot`() { - val thrown = assertThrows { - PPackage.fromClassName(".SomeName") - } - - assertThat(thrown).hasMessageThat() - .contains("package with separator in one char") - } - - @Test - fun `fromClassName throws on name with no uppercase`() { - val thrown = assertThrows { - PPackage.fromClassName("somename") - } - - assertThat(thrown).hasMessageThat() - .contains("No capital letter") - } - - @Test - fun `fromClassName throws on name without dot before name`() { - val thrown = assertThrows { - PPackage.fromClassName("someName") - } - - assertThat(thrown).hasMessageThat() - .contains("Char before first capital letter must be") - } -} diff --git a/protokt-codegen/src/test/kotlin/com/toasttab/protokt/AbstractProtoktCodegenTest.kt b/protokt-codegen/src/test/kotlin/protokt/v1/codegen/AbstractProtoktCodegenTest.kt similarity index 63% rename from protokt-codegen/src/test/kotlin/com/toasttab/protokt/AbstractProtoktCodegenTest.kt rename to protokt-codegen/src/test/kotlin/protokt/v1/codegen/AbstractProtoktCodegenTest.kt index ecdcb9f58..ab239ffc3 100644 --- a/protokt-codegen/src/test/kotlin/com/toasttab/protokt/AbstractProtoktCodegenTest.kt +++ b/protokt-codegen/src/test/kotlin/protokt/v1/codegen/AbstractProtoktCodegenTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,20 +13,20 @@ * limitations under the License. */ -package com.toasttab.protokt +package protokt.v1.codegen -import com.google.common.base.CaseFormat.LOWER_CAMEL -import com.google.common.base.CaseFormat.LOWER_UNDERSCORE +import com.google.common.base.CaseFormat import com.google.common.io.Resources import com.google.protobuf.compiler.PluginProtos -import com.toasttab.protokt.gradle.ProtoktExtension -import com.toasttab.protokt.testing.util.ProcessOutput.Src.ERR -import com.toasttab.protokt.testing.util.projectRoot -import com.toasttab.protokt.testing.util.runCommand import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.io.TempDir +import protokt.v1.gradle.ProtoktExtension +import protokt.v1.testing.ProcessOutput +import protokt.v1.testing.projectRoot +import protokt.v1.testing.runCommand import java.io.ByteArrayOutputStream import java.io.File +import java.io.PrintStream import java.nio.file.Path import java.nio.file.Paths import kotlin.reflect.KClass @@ -44,11 +44,28 @@ abstract class AbstractProtoktCodegenTest { generatedFile.delete() } + sealed interface PluginRunResult { + fun orFail(): Success = + when (this) { + is Success -> this + is Failure -> error(err) + } + } + + class Success( + val response: PluginProtos.CodeGeneratorResponse + ) : PluginRunResult + + class Failure( + val exitCode: Int, + val err: String + ) : PluginRunResult + protected fun runPlugin( inputFile: String, ext: ProtoktExtension = ProtoktExtension(), transform: String.() -> String = { this } - ): PluginProtos.CodeGeneratorResponse { + ): PluginRunResult { testFile.writeText( Paths.get(Resources.getResource(inputFile).toURI()) .toFile() @@ -67,12 +84,17 @@ abstract class AbstractProtoktCodegenTest { "$testFile" ).joinToString(" ") .runCommand( - projectRoot.toPath() - ).orFail("Failed to generate code generator request", ERR) + projectRoot.parentFile.toPath() + ).orFail("Failed to generate code generator request", ProcessOutput.Src.ERR) val out = ByteArrayOutputStream() - main(generatedFile.readBytes(), out) - return PluginProtos.CodeGeneratorResponse.parseFrom(out.toByteArray()) + val err = ByteArrayOutputStream() + val code = main(generatedFile.inputStream(), out, PrintStream(err)) + return if (code == 0) { + Success(PluginProtos.CodeGeneratorResponse.parseFrom(out.toByteArray())) + } else { + Failure(code, err.toString()) + } } } @@ -81,13 +103,18 @@ private fun buildPluginOptions(extension: ProtoktExtension) = extension::class.declaredMemberProperties .filter { it.returnType.classifier as KClass<*> == Boolean::class } .joinToString(",") { - LOWER_CAMEL.to(LOWER_UNDERSCORE, it.name) + "=${it.call(extension)}" + CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, it.name) + "=${it.call(extension)}" } private val codegenTestingResources = Path.of( - "protokt-codegen", "src", "test", "resources", - "com", "toasttab", "protokt", "codegen", "testing" + "protokt-codegen", + "src", + "test", + "resources", + "protokt", + "v1", + "codegen" ) private val binGenerator = @@ -97,13 +124,18 @@ private val extensionsProto = Path.of("extensions", "protokt-extensions-lite", "src", "main", "proto") private val includeProtos = - File(projectRoot, "protokt-codegen/build/extracted-include-protos/main") + File(projectRoot, "build/extracted-include-protos/main") private val generatedFile = File( projectRoot, Path.of( - "protokt-codegen", "src", "test", "resources", - "com", "toasttab", "protokt", "test-proto-bin-request.bin" + "src", + "test", + "resources", + "protokt", + "v1", + "codegen", + "test-proto-bin-request.bin" ).toString() ) diff --git a/protokt-codegen/src/test/kotlin/protokt/v1/codegen/NonNullValidationTest.kt b/protokt-codegen/src/test/kotlin/protokt/v1/codegen/NonNullValidationTest.kt new file mode 100644 index 000000000..42b3745f8 --- /dev/null +++ b/protokt-codegen/src/test/kotlin/protokt/v1/codegen/NonNullValidationTest.kt @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package protokt.v1.codegen + +import com.google.common.truth.Truth +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.Arguments +import org.junit.jupiter.params.provider.MethodSource +import protokt.v1.codegen.util.FieldType + +class NonNullValidationTest : AbstractProtoktCodegenTest() { + @ParameterizedTest + @MethodSource("fieldTypes") + fun `field with bad non-null option`(fieldType: String, fieldTypeName: String?) { + assertFailure( + "non_null.proto", + fieldType, + "Error generating code for file test_file.proto: message TestMessageWithBadNonNullField, field value", + "java.lang.IllegalArgumentException: (protokt.property).non_null is only applicable to message types " + + "and is inapplicable to non-message " + (fieldTypeName ?: fieldType) + ) + } + + @ParameterizedTest + @MethodSource("fieldTypes") + fun `field in nested message with bad non-null option`(fieldType: String, fieldTypeName: String?) { + assertFailure( + "non_null_nested.proto", + fieldType, + "Error generating code for file test_file.proto: message Outer.TestNestedMessageWithBadNonNullField, field value", + "java.lang.IllegalArgumentException: (protokt.property).non_null is only applicable to message types " + + "and is inapplicable to non-message " + (fieldTypeName ?: fieldType) + ) + } + + @ParameterizedTest + @MethodSource("fieldTypesOneof") + fun `oneof type`(fieldType: String, fieldTypeName: String?) { + assertFailure( + "non_null_oneof.proto", + fieldType, + "Error generating code for file test_file.proto: message TestMessageWithBadNonNullOneof, field bar", + "java.lang.IllegalArgumentException: (protokt.property).non_null is only applicable to top level types " + + "and is inapplicable to oneof field " + (fieldTypeName ?: fieldType) + ) + } + + @ParameterizedTest + @MethodSource("fieldTypesOptional") + fun `optional field`(fieldType: String, fieldTypeName: String?) { + assertFailure( + "non_null_optional.proto", + fieldType, + "Error generating code for file test_file.proto: message TestMessageWithBadNonNullOptionalField, field value", + "java.lang.IllegalArgumentException: (protokt.property).non_null is not applicable to optional fields " + + "and is inapplicable to optional " + (fieldTypeName ?: fieldType) + ) + } + + private fun assertFailure( + fileName: String, + fieldType: String, + line0: String, + line1: String + ) { + val result = runPlugin(fileName) { replace("REPLACE", fieldType) } as Failure + + println(result.err) + + Truth.assertThat(result.exitCode).isEqualTo(-1) + Truth.assertThat(result.err.lines()[0]).isEqualTo(line0) + Truth.assertThat(result.err.lines()[1]).isEqualTo(line1) + } + + companion object { + @JvmStatic + fun fieldTypes() = + mapToArgs(argLists()) + + private fun mapToArgs(list: List<*>) = + list.map { + if (it is String) { + Arguments.of(it, null) + } else { + Arguments.of(*(it as List<*>).toTypedArray()) + } + } + + private fun argLists() = + ineligibleAnonymousTypes().map { it.simpleName!!.lowercase() } + + ineligibleAnonymousTypes().map { "repeated ${it.simpleName!!.lowercase()}" } + + listOf( + listOf("Foo", "enum"), + listOf("repeated Foo", "repeated .toasttab.protokt.v1.codegen.testing.Foo"), + listOf("repeated Bar", "repeated .toasttab.protokt.v1.codegen.testing.Bar"), + listOf("map", "map") + ) + + @JvmStatic + fun fieldTypesOptional() = + mapToArgs(argListsOptional()) + + private fun argListsOptional() = + ineligibleAnonymousTypes().map { it.simpleName!!.lowercase() } + + listOf( + listOf("Foo", ".toasttab.protokt.v1.codegen.testing.Foo"), + listOf("Bar", ".toasttab.protokt.v1.codegen.testing.Bar") + ) + + @JvmStatic + fun fieldTypesOneof() = + mapToArgs(argListsOneof()) + + private fun argListsOneof() = + ineligibleAnonymousTypes().map { it.simpleName!!.lowercase() } + + listOf( + listOf("Foo", ".toasttab.protokt.v1.codegen.testing.Foo"), + listOf("Bar", ".toasttab.protokt.v1.codegen.testing.Bar") + ) + + private fun ineligibleAnonymousTypes() = + FieldType::class + .sealedSubclasses + .flatMap { it.sealedSubclasses } + .filterNot { it in setOf(FieldType.Message::class, FieldType.Enum::class) } + } +} diff --git a/protokt-codegen/src/test/kotlin/com/toasttab/protokt/ProtoktCodegenTest.kt b/protokt-codegen/src/test/kotlin/protokt/v1/codegen/ProtoktCodegenTest.kt similarity index 89% rename from protokt-codegen/src/test/kotlin/com/toasttab/protokt/ProtoktCodegenTest.kt rename to protokt-codegen/src/test/kotlin/protokt/v1/codegen/ProtoktCodegenTest.kt index 5c962f324..809c056e2 100644 --- a/protokt-codegen/src/test/kotlin/com/toasttab/protokt/ProtoktCodegenTest.kt +++ b/protokt-codegen/src/test/kotlin/protokt/v1/codegen/ProtoktCodegenTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ * limitations under the License. */ -package com.toasttab.protokt +package protokt.v1.codegen import org.junit.jupiter.api.Test @@ -21,6 +21,8 @@ class ProtoktCodegenTest : AbstractProtoktCodegenTest() { @Test fun `step through code generation with debugger`() { runPlugin("test.proto") + .orFail() + .response .fileList .forEach { println(it.name) diff --git a/protokt-codegen/src/test/resources/com/toasttab/protokt/codegen/testing/bin-generator b/protokt-codegen/src/test/resources/com/toasttab/protokt/codegen/testing/bin-generator deleted file mode 100755 index fe24ea25f..000000000 --- a/protokt-codegen/src/test/resources/com/toasttab/protokt/codegen/testing/bin-generator +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -exec cat > protokt-codegen/src/test/resources/com/toasttab/protokt/test-proto-bin-request.bin diff --git a/protokt-codegen/src/test/resources/non_null.proto b/protokt-codegen/src/test/resources/non_null.proto index e431ac6a8..ff5818170 100644 --- a/protokt-codegen/src/test/resources/non_null.proto +++ b/protokt-codegen/src/test/resources/non_null.proto @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,18 +15,18 @@ syntax = "proto3"; -package toasttab.protokt.codegen.testing; +package toasttab.protokt.v1.codegen.testing; -import "protokt/protokt.proto"; +import "protokt/v1/protokt.proto"; message TestMessageWithBadNonNullField { REPLACE value = 1 [ - (.protokt.property).non_null = true + (.protokt.v1.property).non_null = true ]; +} - enum Foo { - FOO = 0; - } - - message Bar {} +enum Foo { + FOO = 0; } + +message Bar {} diff --git a/protokt-codegen/src/test/resources/non_null_nested.proto b/protokt-codegen/src/test/resources/non_null_nested.proto new file mode 100644 index 000000000..0253a4979 --- /dev/null +++ b/protokt-codegen/src/test/resources/non_null_nested.proto @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2022 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +syntax = "proto3"; + +package toasttab.protokt.v1.codegen.testing; + +import "protokt/v1/protokt.proto"; + +message Outer { + message TestNestedMessageWithBadNonNullField { + REPLACE value = 1 [ + (.protokt.v1.property).non_null = true + ]; + } +} + +enum Foo { + FOO = 0; +} + +message Bar {} diff --git a/protokt-codegen/src/test/resources/non_null_oneof.proto b/protokt-codegen/src/test/resources/non_null_oneof.proto index 51434149b..a0a2f5589 100644 --- a/protokt-codegen/src/test/resources/non_null_oneof.proto +++ b/protokt-codegen/src/test/resources/non_null_oneof.proto @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,18 +15,18 @@ syntax = "proto3"; -package toasttab.protokt.codegen.testing; +package toasttab.protokt.v1.codegen.testing; -import "protokt/protokt.proto"; +import "protokt/v1/protokt.proto"; message TestMessageWithBadNonNullOneof { oneof foo { - REPLACE bar = 1 [(.protokt.property).non_null = true]; + REPLACE bar = 1 [(.protokt.v1.property).non_null = true]; } +} - message Foo {} +message Foo {} - enum Bar { - BAR = 0; - } +enum Bar { + BAR = 0; } diff --git a/protokt-codegen/src/test/resources/non_null_optional.proto b/protokt-codegen/src/test/resources/non_null_optional.proto index 597fc46aa..00c73ac39 100644 --- a/protokt-codegen/src/test/resources/non_null_optional.proto +++ b/protokt-codegen/src/test/resources/non_null_optional.proto @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Toast Inc. + * Copyright (c) 2022 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,18 +15,18 @@ syntax = "proto2"; -package toasttab.protokt.codegen.testing; +package toasttab.protokt.v1.codegen.testing; -import "protokt/protokt.proto"; +import "protokt/v1/protokt.proto"; message TestMessageWithBadNonNullOptionalField { optional REPLACE value = 1 [ - (.protokt.property).non_null = true + (.protokt.v1.property).non_null = true ]; +} - enum Foo { - FOO = 0; - } - - message Bar {} +enum Foo { + FOO = 0; } + +message Bar {} diff --git a/protokt-codegen/src/test/resources/protokt/v1/codegen/bin-generator b/protokt-codegen/src/test/resources/protokt/v1/codegen/bin-generator new file mode 100755 index 000000000..7209020a1 --- /dev/null +++ b/protokt-codegen/src/test/resources/protokt/v1/codegen/bin-generator @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +exec cat > protokt-codegen/src/test/resources/protokt/v1/codegen/test-proto-bin-request.bin diff --git a/protokt-codegen/src/test/resources/test.proto b/protokt-codegen/src/test/resources/test.proto index e79db7bc5..44b8aa5ea 100644 --- a/protokt-codegen/src/test/resources/test.proto +++ b/protokt-codegen/src/test/resources/test.proto @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Toast Inc. + * Copyright (c) 2019 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,10 @@ syntax = "proto3"; -package toasttab.protokt.codegen.testing; - -import "protokt/protokt.proto"; +package toasttab.protokt.v1.codegen.testing; message TestMessage { string value = 1; } + +message Empty {} diff --git a/protokt-core-lite/api/protokt-core-lite.api b/protokt-core-lite/api/protokt-core-lite.api index 935342241..b526aabc3 100644 --- a/protokt-core-lite/api/protokt-core-lite.api +++ b/protokt-core-lite/api/protokt-core-lite.api @@ -1,4 +1,4 @@ -public final class com/toasttab/protokt/Any : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Any : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Any$Deserializer; public synthetic fun (Ljava/lang/String;Lcom/toasttab/protokt/rt/Bytes;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Any; @@ -8,9 +8,7 @@ public final class com/toasttab/protokt/Any : com/toasttab/protokt/rt/KtMessage public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getValue ()Lcom/toasttab/protokt/rt/Bytes; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } @@ -26,6 +24,8 @@ public final class com/toasttab/protokt/Any$AnyDsl { } public final class com/toasttab/protokt/Any$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Any; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Any; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Any; @@ -36,13 +36,19 @@ public final class com/toasttab/protokt/Any$Deserializer : com/toasttab/protokt/ public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Any; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Any; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Any; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Any; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Any; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Any; } -public final class com/toasttab/protokt/Api : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Api : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Api$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Lcom/toasttab/protokt/SourceContext;Ljava/util/List;Lcom/toasttab/protokt/Syntax;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Api; @@ -57,9 +63,7 @@ public final class com/toasttab/protokt/Api : com/toasttab/protokt/rt/KtMessage public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getVersion ()Ljava/lang/String; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } @@ -85,6 +89,8 @@ public final class com/toasttab/protokt/Api$ApiDsl { } public final class com/toasttab/protokt/Api$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Api; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Api; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Api; @@ -95,13 +101,19 @@ public final class com/toasttab/protokt/Api$Deserializer : com/toasttab/protokt/ public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Api; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Api; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Api; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Api; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Api; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Api; } -public final class com/toasttab/protokt/BoolValue : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/BoolValue : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/BoolValue$Deserializer; public synthetic fun (ZLcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/BoolValue; @@ -110,9 +122,7 @@ public final class com/toasttab/protokt/BoolValue : com/toasttab/protokt/rt/KtMe public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getValue ()Z public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } @@ -126,6 +136,8 @@ public final class com/toasttab/protokt/BoolValue$BoolValueDsl { } public final class com/toasttab/protokt/BoolValue$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/BoolValue; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/BoolValue; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/BoolValue; @@ -136,23 +148,19 @@ public final class com/toasttab/protokt/BoolValue$Deserializer : com/toasttab/pr public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/BoolValue; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/BoolValue; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/BoolValue; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/BoolValue; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/BoolValue; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/BoolValue; } -public final class com/toasttab/protokt/BoolValueConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/BoolValueConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun unwrap (Z)Lcom/toasttab/protokt/BoolValue; - public fun wrap (Lcom/toasttab/protokt/BoolValue;)Ljava/lang/Boolean; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/BytesValue : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/BytesValue : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/BytesValue$Deserializer; public synthetic fun (Lcom/toasttab/protokt/rt/Bytes;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/BytesValue; @@ -161,9 +169,7 @@ public final class com/toasttab/protokt/BytesValue : com/toasttab/protokt/rt/KtM public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getValue ()Lcom/toasttab/protokt/rt/Bytes; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } @@ -177,6 +183,8 @@ public final class com/toasttab/protokt/BytesValue$BytesValueDsl { } public final class com/toasttab/protokt/BytesValue$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/BytesValue; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/BytesValue; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/BytesValue; @@ -187,23 +195,19 @@ public final class com/toasttab/protokt/BytesValue$Deserializer : com/toasttab/p public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/BytesValue; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/BytesValue; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/BytesValue; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/BytesValue; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/BytesValue; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/BytesValue; } -public final class com/toasttab/protokt/BytesValueConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/BytesValueConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public fun unwrap (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/BytesValue; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun wrap (Lcom/toasttab/protokt/BytesValue;)Lcom/toasttab/protokt/rt/Bytes; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/DescriptorProto : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/DescriptorProto : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/DescriptorProto$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lcom/toasttab/protokt/MessageOptions;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/DescriptorProto; @@ -221,9 +225,7 @@ public final class com/toasttab/protokt/DescriptorProto : com/toasttab/protokt/r public final fun getReservedRange ()Ljava/util/List; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } @@ -255,6 +257,8 @@ public final class com/toasttab/protokt/DescriptorProto$DescriptorProtoDsl { } public final class com/toasttab/protokt/DescriptorProto$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/DescriptorProto; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/DescriptorProto; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/DescriptorProto; @@ -265,13 +269,19 @@ public final class com/toasttab/protokt/DescriptorProto$Deserializer : com/toast public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/DescriptorProto; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/DescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/DescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/DescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/DescriptorProto; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/DescriptorProto; } -public final class com/toasttab/protokt/DescriptorProto$ExtensionRange : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/DescriptorProto$ExtensionRange : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/DescriptorProto$ExtensionRange$Deserializer; public synthetic fun (Ljava/lang/Integer;Ljava/lang/Integer;Lcom/toasttab/protokt/ExtensionRangeOptions;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/DescriptorProto$ExtensionRange; @@ -282,13 +292,13 @@ public final class com/toasttab/protokt/DescriptorProto$ExtensionRange : com/toa public final fun getStart ()Ljava/lang/Integer; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/DescriptorProto$ExtensionRange$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/DescriptorProto$ExtensionRange; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/DescriptorProto$ExtensionRange; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/DescriptorProto$ExtensionRange; @@ -299,6 +309,12 @@ public final class com/toasttab/protokt/DescriptorProto$ExtensionRange$Deseriali public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/DescriptorProto$ExtensionRange; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/DescriptorProto$ExtensionRange; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/DescriptorProto$ExtensionRange; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/DescriptorProto$ExtensionRange; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/DescriptorProto$ExtensionRange; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -318,7 +334,7 @@ public final class com/toasttab/protokt/DescriptorProto$ExtensionRange$Extension public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/DescriptorProto$ReservedRange : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/DescriptorProto$ReservedRange : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/DescriptorProto$ReservedRange$Deserializer; public synthetic fun (Ljava/lang/Integer;Ljava/lang/Integer;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/DescriptorProto$ReservedRange; @@ -328,13 +344,13 @@ public final class com/toasttab/protokt/DescriptorProto$ReservedRange : com/toas public final fun getStart ()Ljava/lang/Integer; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/DescriptorProto$ReservedRange$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/DescriptorProto$ReservedRange; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/DescriptorProto$ReservedRange; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/DescriptorProto$ReservedRange; @@ -345,6 +361,12 @@ public final class com/toasttab/protokt/DescriptorProto$ReservedRange$Deserializ public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/DescriptorProto$ReservedRange; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/DescriptorProto$ReservedRange; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/DescriptorProto$ReservedRange; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/DescriptorProto$ReservedRange; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/DescriptorProto$ReservedRange; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -362,7 +384,7 @@ public final class com/toasttab/protokt/DescriptorProto$ReservedRange$ReservedRa public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/DoubleValue : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/DoubleValue : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/DoubleValue$Deserializer; public synthetic fun (DLcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/DoubleValue; @@ -371,13 +393,13 @@ public final class com/toasttab/protokt/DoubleValue : com/toasttab/protokt/rt/Kt public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getValue ()D public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/DoubleValue$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/DoubleValue; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/DoubleValue; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/DoubleValue; @@ -388,6 +410,12 @@ public final class com/toasttab/protokt/DoubleValue$Deserializer : com/toasttab/ public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/DoubleValue; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/DoubleValue; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/DoubleValue; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/DoubleValue; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/DoubleValue; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -403,17 +431,7 @@ public final class com/toasttab/protokt/DoubleValue$DoubleValueDsl { public final fun setValue (D)V } -public final class com/toasttab/protokt/DoubleValueConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/DoubleValueConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public fun unwrap (D)Lcom/toasttab/protokt/DoubleValue; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun wrap (Lcom/toasttab/protokt/DoubleValue;)Ljava/lang/Double; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/Duration : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Duration : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Duration$Deserializer; public synthetic fun (JILcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Duration; @@ -423,13 +441,13 @@ public final class com/toasttab/protokt/Duration : com/toasttab/protokt/rt/KtMes public final fun getSeconds ()J public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/Duration$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Duration; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Duration; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Duration; @@ -440,6 +458,12 @@ public final class com/toasttab/protokt/Duration$Deserializer : com/toasttab/pro public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Duration; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Duration; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Duration; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Duration; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Duration; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -457,7 +481,7 @@ public final class com/toasttab/protokt/Duration$DurationDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/Empty : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Empty : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Empty$Deserializer; public synthetic fun (Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Empty; @@ -465,13 +489,13 @@ public final class com/toasttab/protokt/Empty : com/toasttab/protokt/rt/KtMessag public fun getMessageSize ()I public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/Empty$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Empty; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Empty; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Empty; @@ -482,6 +506,12 @@ public final class com/toasttab/protokt/Empty$Deserializer : com/toasttab/protok public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Empty; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Empty; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Empty; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Empty; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Empty; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -495,7 +525,7 @@ public final class com/toasttab/protokt/Empty$EmptyDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/EnumDescriptorProto : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/EnumDescriptorProto : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/EnumDescriptorProto$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/util/List;Lcom/toasttab/protokt/EnumOptions;Ljava/util/List;Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/EnumDescriptorProto; @@ -508,13 +538,13 @@ public final class com/toasttab/protokt/EnumDescriptorProto : com/toasttab/proto public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getValue ()Ljava/util/List; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/EnumDescriptorProto$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/EnumDescriptorProto; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/EnumDescriptorProto; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/EnumDescriptorProto; @@ -525,6 +555,12 @@ public final class com/toasttab/protokt/EnumDescriptorProto$Deserializer : com/t public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/EnumDescriptorProto; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/EnumDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/EnumDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/EnumDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/EnumDescriptorProto; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -548,7 +584,7 @@ public final class com/toasttab/protokt/EnumDescriptorProto$EnumDescriptorProtoD public final fun setValue (Ljava/util/List;)V } -public final class com/toasttab/protokt/EnumDescriptorProto$EnumReservedRange : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/EnumDescriptorProto$EnumReservedRange : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/EnumDescriptorProto$EnumReservedRange$Deserializer; public synthetic fun (Ljava/lang/Integer;Ljava/lang/Integer;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/EnumDescriptorProto$EnumReservedRange; @@ -558,13 +594,13 @@ public final class com/toasttab/protokt/EnumDescriptorProto$EnumReservedRange : public final fun getStart ()Ljava/lang/Integer; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/EnumDescriptorProto$EnumReservedRange$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/EnumDescriptorProto$EnumReservedRange; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/EnumDescriptorProto$EnumReservedRange; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/EnumDescriptorProto$EnumReservedRange; @@ -575,6 +611,12 @@ public final class com/toasttab/protokt/EnumDescriptorProto$EnumReservedRange$De public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/EnumDescriptorProto$EnumReservedRange; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/EnumDescriptorProto$EnumReservedRange; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/EnumDescriptorProto$EnumReservedRange; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/EnumDescriptorProto$EnumReservedRange; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/EnumDescriptorProto$EnumReservedRange; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -592,7 +634,7 @@ public final class com/toasttab/protokt/EnumDescriptorProto$EnumReservedRange$En public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/EnumOptions : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/EnumOptions : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/EnumOptions$Deserializer; public synthetic fun (Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/EnumOptions; @@ -603,13 +645,13 @@ public final class com/toasttab/protokt/EnumOptions : com/toasttab/protokt/rt/Kt public final fun getUninterpretedOption ()Ljava/util/List; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/EnumOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/EnumOptions; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/EnumOptions; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/EnumOptions; @@ -620,6 +662,12 @@ public final class com/toasttab/protokt/EnumOptions$Deserializer : com/toasttab/ public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/EnumOptions; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/EnumOptions; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/EnumOptions; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/EnumOptions; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/EnumOptions; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -639,7 +687,7 @@ public final class com/toasttab/protokt/EnumOptions$EnumOptionsDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/EnumValue : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/EnumValue : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/EnumValue$Deserializer; public synthetic fun (Ljava/lang/String;ILjava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/EnumValue; @@ -650,13 +698,13 @@ public final class com/toasttab/protokt/EnumValue : com/toasttab/protokt/rt/KtMe public final fun getOptions ()Ljava/util/List; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/EnumValue$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/EnumValue; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/EnumValue; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/EnumValue; @@ -667,6 +715,12 @@ public final class com/toasttab/protokt/EnumValue$Deserializer : com/toasttab/pr public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/EnumValue; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/EnumValue; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/EnumValue; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/EnumValue; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/EnumValue; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -686,7 +740,7 @@ public final class com/toasttab/protokt/EnumValue$EnumValueDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/EnumValueDescriptorProto : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/EnumValueDescriptorProto : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/EnumValueDescriptorProto$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/lang/Integer;Lcom/toasttab/protokt/EnumValueOptions;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/EnumValueDescriptorProto; @@ -697,13 +751,13 @@ public final class com/toasttab/protokt/EnumValueDescriptorProto : com/toasttab/ public final fun getOptions ()Lcom/toasttab/protokt/EnumValueOptions; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/EnumValueDescriptorProto$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/EnumValueDescriptorProto; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/EnumValueDescriptorProto; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/EnumValueDescriptorProto; @@ -714,6 +768,12 @@ public final class com/toasttab/protokt/EnumValueDescriptorProto$Deserializer : public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/EnumValueDescriptorProto; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/EnumValueDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/EnumValueDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/EnumValueDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/EnumValueDescriptorProto; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -733,7 +793,7 @@ public final class com/toasttab/protokt/EnumValueDescriptorProto$EnumValueDescri public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/EnumValueOptions : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/EnumValueOptions : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/EnumValueOptions$Deserializer; public synthetic fun (Ljava/lang/Boolean;Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/EnumValueOptions; @@ -743,13 +803,13 @@ public final class com/toasttab/protokt/EnumValueOptions : com/toasttab/protokt/ public final fun getUninterpretedOption ()Ljava/util/List; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/EnumValueOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/EnumValueOptions; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/EnumValueOptions; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/EnumValueOptions; @@ -760,6 +820,12 @@ public final class com/toasttab/protokt/EnumValueOptions$Deserializer : com/toas public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/EnumValueOptions; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/EnumValueOptions; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/EnumValueOptions; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/EnumValueOptions; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/EnumValueOptions; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -777,7 +843,7 @@ public final class com/toasttab/protokt/EnumValueOptions$EnumValueOptionsDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/Enum_ : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Enum_ : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Enum_$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/toasttab/protokt/SourceContext;Lcom/toasttab/protokt/Syntax;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Enum_; @@ -790,13 +856,13 @@ public final class com/toasttab/protokt/Enum_ : com/toasttab/protokt/rt/KtMessag public final fun getSyntax ()Lcom/toasttab/protokt/Syntax; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/Enum_$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Enum_; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Enum_; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Enum_; @@ -807,6 +873,12 @@ public final class com/toasttab/protokt/Enum_$Deserializer : com/toasttab/protok public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Enum_; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Enum_; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Enum_; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Enum_; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Enum_; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -830,7 +902,7 @@ public final class com/toasttab/protokt/Enum_$Enum_Dsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/ExtensionRangeOptions : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/ExtensionRangeOptions : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/ExtensionRangeOptions$Deserializer; public synthetic fun (Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ExtensionRangeOptions; @@ -839,13 +911,13 @@ public final class com/toasttab/protokt/ExtensionRangeOptions : com/toasttab/pro public final fun getUninterpretedOption ()Ljava/util/List; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/ExtensionRangeOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/ExtensionRangeOptions; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/ExtensionRangeOptions; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/ExtensionRangeOptions; @@ -856,6 +928,12 @@ public final class com/toasttab/protokt/ExtensionRangeOptions$Deserializer : com public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/ExtensionRangeOptions; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/ExtensionRangeOptions; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/ExtensionRangeOptions; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/ExtensionRangeOptions; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/ExtensionRangeOptions; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -871,7 +949,7 @@ public final class com/toasttab/protokt/ExtensionRangeOptions$ExtensionRangeOpti public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/Field : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Field : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Field$Deserializer; public synthetic fun (Lcom/toasttab/protokt/Field$Kind;Lcom/toasttab/protokt/Field$Cardinality;ILjava/lang/String;Ljava/lang/String;IZLjava/util/List;Ljava/lang/String;Ljava/lang/String;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Field; @@ -889,9 +967,7 @@ public final class com/toasttab/protokt/Field : com/toasttab/protokt/rt/KtMessag public final fun getTypeUrl ()Ljava/lang/String; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } @@ -928,6 +1004,8 @@ public final class com/toasttab/protokt/Field$Cardinality$UNRECOGNIZED : com/toa } public final class com/toasttab/protokt/Field$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Field; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Field; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Field; @@ -938,6 +1016,12 @@ public final class com/toasttab/protokt/Field$Deserializer : com/toasttab/protok public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Field; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Field; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Field; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Field; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Field; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -1063,7 +1147,7 @@ public final class com/toasttab/protokt/Field$Kind$UNRECOGNIZED : com/toasttab/p public fun (I)V } -public final class com/toasttab/protokt/FieldDescriptorProto : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/FieldDescriptorProto : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/FieldDescriptorProto$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Lcom/toasttab/protokt/FieldDescriptorProto$Label;Lcom/toasttab/protokt/FieldDescriptorProto$Type;Ljava/lang/String;Ljava/lang/String;Lcom/toasttab/protokt/FieldOptions;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Boolean;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/FieldDescriptorProto; @@ -1082,13 +1166,13 @@ public final class com/toasttab/protokt/FieldDescriptorProto : com/toasttab/prot public final fun getTypeName ()Ljava/lang/String; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/FieldDescriptorProto$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/FieldDescriptorProto; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/FieldDescriptorProto; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/FieldDescriptorProto; @@ -1099,6 +1183,12 @@ public final class com/toasttab/protokt/FieldDescriptorProto$Deserializer : com/ public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/FieldDescriptorProto; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/FieldDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/FieldDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/FieldDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/FieldDescriptorProto; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -1250,7 +1340,7 @@ public final class com/toasttab/protokt/FieldDescriptorProto$Type$UNRECOGNIZED : public fun (I)V } -public final class com/toasttab/protokt/FieldMask : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/FieldMask : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/FieldMask$Deserializer; public synthetic fun (Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/FieldMask; @@ -1259,13 +1349,13 @@ public final class com/toasttab/protokt/FieldMask : com/toasttab/protokt/rt/KtMe public final fun getPaths ()Ljava/util/List; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/FieldMask$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/FieldMask; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/FieldMask; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/FieldMask; @@ -1276,6 +1366,12 @@ public final class com/toasttab/protokt/FieldMask$Deserializer : com/toasttab/pr public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/FieldMask; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/FieldMask; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/FieldMask; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/FieldMask; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/FieldMask; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -1291,7 +1387,7 @@ public final class com/toasttab/protokt/FieldMask$FieldMaskDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/FieldOptions : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/FieldOptions : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/FieldOptions$Deserializer; public synthetic fun (Lcom/toasttab/protokt/FieldOptions$CType;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Lcom/toasttab/protokt/FieldOptions$JSType;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/FieldOptions; @@ -1307,9 +1403,7 @@ public final class com/toasttab/protokt/FieldOptions : com/toasttab/protokt/rt/K public final fun getUnverifiedLazy ()Ljava/lang/Boolean; public final fun getWeak ()Ljava/lang/Boolean; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } @@ -1342,6 +1436,8 @@ public final class com/toasttab/protokt/FieldOptions$CType$UNRECOGNIZED : com/to } public final class com/toasttab/protokt/FieldOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/FieldOptions; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/FieldOptions; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/FieldOptions; @@ -1352,6 +1448,12 @@ public final class com/toasttab/protokt/FieldOptions$Deserializer : com/toasttab public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/FieldOptions; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/FieldOptions; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/FieldOptions; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/FieldOptions; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/FieldOptions; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -1409,7 +1511,7 @@ public final class com/toasttab/protokt/FieldOptions$JSType$UNRECOGNIZED : com/t public fun (I)V } -public final class com/toasttab/protokt/FileDescriptorProto : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/FileDescriptorProto : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/FileDescriptorProto$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lcom/toasttab/protokt/FileOptions;Lcom/toasttab/protokt/SourceCodeInfo;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/FileDescriptorProto; @@ -1429,13 +1531,13 @@ public final class com/toasttab/protokt/FileDescriptorProto : com/toasttab/proto public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getWeakDependency ()Ljava/util/List; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/FileDescriptorProto$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/FileDescriptorProto; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/FileDescriptorProto; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/FileDescriptorProto; @@ -1446,6 +1548,12 @@ public final class com/toasttab/protokt/FileDescriptorProto$Deserializer : com/t public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/FileDescriptorProto; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/FileDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/FileDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/FileDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/FileDescriptorProto; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -1483,7 +1591,7 @@ public final class com/toasttab/protokt/FileDescriptorProto$FileDescriptorProtoD public final fun setWeakDependency (Ljava/util/List;)V } -public final class com/toasttab/protokt/FileDescriptorSet : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/FileDescriptorSet : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/FileDescriptorSet$Deserializer; public synthetic fun (Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/FileDescriptorSet; @@ -1492,13 +1600,13 @@ public final class com/toasttab/protokt/FileDescriptorSet : com/toasttab/protokt public fun getMessageSize ()I public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/FileDescriptorSet$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/FileDescriptorSet; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/FileDescriptorSet; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/FileDescriptorSet; @@ -1509,6 +1617,12 @@ public final class com/toasttab/protokt/FileDescriptorSet$Deserializer : com/toa public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/FileDescriptorSet; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/FileDescriptorSet; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/FileDescriptorSet; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/FileDescriptorSet; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/FileDescriptorSet; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -1524,7 +1638,7 @@ public final class com/toasttab/protokt/FileDescriptorSet$FileDescriptorSetDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/FileOptions : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/FileOptions : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/FileOptions$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/toasttab/protokt/FileOptions$OptimizeMode;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/FileOptions; @@ -1553,13 +1667,13 @@ public final class com/toasttab/protokt/FileOptions : com/toasttab/protokt/rt/Kt public final fun getUninterpretedOption ()Ljava/util/List; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/FileOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/FileOptions; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/FileOptions; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/FileOptions; @@ -1570,6 +1684,12 @@ public final class com/toasttab/protokt/FileOptions$Deserializer : com/toasttab/ public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/FileOptions; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/FileOptions; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/FileOptions; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/FileOptions; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/FileOptions; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -1653,7 +1773,7 @@ public final class com/toasttab/protokt/FileOptions$OptimizeMode$UNRECOGNIZED : public fun (I)V } -public final class com/toasttab/protokt/FloatValue : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/FloatValue : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/FloatValue$Deserializer; public synthetic fun (FLcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/FloatValue; @@ -1662,13 +1782,13 @@ public final class com/toasttab/protokt/FloatValue : com/toasttab/protokt/rt/KtM public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getValue ()F public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/FloatValue$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/FloatValue; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/FloatValue; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/FloatValue; @@ -1679,6 +1799,12 @@ public final class com/toasttab/protokt/FloatValue$Deserializer : com/toasttab/p public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/FloatValue; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/FloatValue; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/FloatValue; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/FloatValue; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/FloatValue; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -1694,17 +1820,7 @@ public final class com/toasttab/protokt/FloatValue$FloatValueDsl { public final fun setValue (F)V } -public final class com/toasttab/protokt/FloatValueConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/FloatValueConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public fun unwrap (F)Lcom/toasttab/protokt/FloatValue; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun wrap (Lcom/toasttab/protokt/FloatValue;)Ljava/lang/Float; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/GeneratedCodeInfo : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/GeneratedCodeInfo : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/GeneratedCodeInfo$Deserializer; public synthetic fun (Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/GeneratedCodeInfo; @@ -1713,13 +1829,11 @@ public final class com/toasttab/protokt/GeneratedCodeInfo : com/toasttab/protokt public fun getMessageSize ()I public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } -public final class com/toasttab/protokt/GeneratedCodeInfo$Annotation : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/GeneratedCodeInfo$Annotation : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/GeneratedCodeInfo$Annotation$Deserializer; public synthetic fun (Ljava/util/List;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/GeneratedCodeInfo$Annotation; @@ -1731,9 +1845,7 @@ public final class com/toasttab/protokt/GeneratedCodeInfo$Annotation : com/toast public final fun getSourceFile ()Ljava/lang/String; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } @@ -1753,6 +1865,8 @@ public final class com/toasttab/protokt/GeneratedCodeInfo$Annotation$AnnotationD } public final class com/toasttab/protokt/GeneratedCodeInfo$Annotation$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/GeneratedCodeInfo$Annotation; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/GeneratedCodeInfo$Annotation; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/GeneratedCodeInfo$Annotation; @@ -1763,6 +1877,12 @@ public final class com/toasttab/protokt/GeneratedCodeInfo$Annotation$Deserialize public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/GeneratedCodeInfo$Annotation; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/GeneratedCodeInfo$Annotation; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/GeneratedCodeInfo$Annotation; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/GeneratedCodeInfo$Annotation; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/GeneratedCodeInfo$Annotation; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -1770,6 +1890,8 @@ public final class com/toasttab/protokt/GeneratedCodeInfo$Annotation$Deserialize } public final class com/toasttab/protokt/GeneratedCodeInfo$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/GeneratedCodeInfo; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/GeneratedCodeInfo; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/GeneratedCodeInfo; @@ -1780,6 +1902,12 @@ public final class com/toasttab/protokt/GeneratedCodeInfo$Deserializer : com/toa public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/GeneratedCodeInfo; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/GeneratedCodeInfo; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/GeneratedCodeInfo; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/GeneratedCodeInfo; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/GeneratedCodeInfo; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -1795,7 +1923,7 @@ public final class com/toasttab/protokt/GeneratedCodeInfo$GeneratedCodeInfoDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/Int32Value : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Int32Value : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Int32Value$Deserializer; public synthetic fun (ILcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Int32Value; @@ -1804,13 +1932,13 @@ public final class com/toasttab/protokt/Int32Value : com/toasttab/protokt/rt/KtM public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getValue ()I public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/Int32Value$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Int32Value; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Int32Value; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Int32Value; @@ -1821,6 +1949,12 @@ public final class com/toasttab/protokt/Int32Value$Deserializer : com/toasttab/p public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Int32Value; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Int32Value; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Int32Value; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Int32Value; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Int32Value; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -1836,17 +1970,7 @@ public final class com/toasttab/protokt/Int32Value$Int32ValueDsl { public final fun setValue (I)V } -public final class com/toasttab/protokt/Int32ValueConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/Int32ValueConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public fun unwrap (I)Lcom/toasttab/protokt/Int32Value; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun wrap (Lcom/toasttab/protokt/Int32Value;)Ljava/lang/Integer; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/Int64Value : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Int64Value : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Int64Value$Deserializer; public synthetic fun (JLcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Int64Value; @@ -1855,13 +1979,13 @@ public final class com/toasttab/protokt/Int64Value : com/toasttab/protokt/rt/KtM public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getValue ()J public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/Int64Value$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Int64Value; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Int64Value; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Int64Value; @@ -1872,6 +1996,12 @@ public final class com/toasttab/protokt/Int64Value$Deserializer : com/toasttab/p public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Int64Value; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Int64Value; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Int64Value; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Int64Value; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Int64Value; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -1887,17 +2017,7 @@ public final class com/toasttab/protokt/Int64Value$Int64ValueDsl { public final fun setValue (J)V } -public final class com/toasttab/protokt/Int64ValueConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/Int64ValueConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public fun unwrap (J)Lcom/toasttab/protokt/Int64Value; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun wrap (Lcom/toasttab/protokt/Int64Value;)Ljava/lang/Long; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/ListValue : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/ListValue : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/ListValue$Deserializer; public synthetic fun (Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ListValue; @@ -1906,13 +2026,13 @@ public final class com/toasttab/protokt/ListValue : com/toasttab/protokt/rt/KtMe public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getValues ()Ljava/util/List; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/ListValue$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/ListValue; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/ListValue; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/ListValue; @@ -1923,6 +2043,12 @@ public final class com/toasttab/protokt/ListValue$Deserializer : com/toasttab/pr public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/ListValue; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/ListValue; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/ListValue; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/ListValue; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/ListValue; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -1938,7 +2064,7 @@ public final class com/toasttab/protokt/ListValue$ListValueDsl { public final fun setValues (Ljava/util/List;)V } -public final class com/toasttab/protokt/MessageOptions : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/MessageOptions : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/MessageOptions$Deserializer; public synthetic fun (Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/MessageOptions; @@ -1951,13 +2077,13 @@ public final class com/toasttab/protokt/MessageOptions : com/toasttab/protokt/rt public final fun getUninterpretedOption ()Ljava/util/List; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/MessageOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/MessageOptions; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/MessageOptions; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/MessageOptions; @@ -1968,6 +2094,12 @@ public final class com/toasttab/protokt/MessageOptions$Deserializer : com/toastt public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/MessageOptions; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/MessageOptions; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/MessageOptions; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/MessageOptions; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/MessageOptions; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -1991,7 +2123,7 @@ public final class com/toasttab/protokt/MessageOptions$MessageOptionsDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/Method : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Method : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Method$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;ZLjava/util/List;Lcom/toasttab/protokt/Syntax;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Method; @@ -2006,13 +2138,13 @@ public final class com/toasttab/protokt/Method : com/toasttab/protokt/rt/KtMessa public final fun getSyntax ()Lcom/toasttab/protokt/Syntax; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/Method$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Method; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Method; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Method; @@ -2023,6 +2155,12 @@ public final class com/toasttab/protokt/Method$Deserializer : com/toasttab/proto public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Method; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Method; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Method; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Method; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Method; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2050,7 +2188,7 @@ public final class com/toasttab/protokt/Method$MethodDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/MethodDescriptorProto : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/MethodDescriptorProto : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/MethodDescriptorProto$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/toasttab/protokt/MethodOptions;Ljava/lang/Boolean;Ljava/lang/Boolean;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/MethodDescriptorProto; @@ -2064,13 +2202,13 @@ public final class com/toasttab/protokt/MethodDescriptorProto : com/toasttab/pro public final fun getServerStreaming ()Ljava/lang/Boolean; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/MethodDescriptorProto$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/MethodDescriptorProto; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/MethodDescriptorProto; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/MethodDescriptorProto; @@ -2081,6 +2219,12 @@ public final class com/toasttab/protokt/MethodDescriptorProto$Deserializer : com public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/MethodDescriptorProto; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/MethodDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/MethodDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/MethodDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/MethodDescriptorProto; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2106,7 +2250,7 @@ public final class com/toasttab/protokt/MethodDescriptorProto$MethodDescriptorPr public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/MethodOptions : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/MethodOptions : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/MethodOptions$Deserializer; public synthetic fun (Ljava/lang/Boolean;Lcom/toasttab/protokt/MethodOptions$IdempotencyLevel;Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/MethodOptions; @@ -2117,13 +2261,13 @@ public final class com/toasttab/protokt/MethodOptions : com/toasttab/protokt/rt/ public final fun getUninterpretedOption ()Ljava/util/List; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/MethodOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/MethodOptions; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/MethodOptions; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/MethodOptions; @@ -2134,6 +2278,12 @@ public final class com/toasttab/protokt/MethodOptions$Deserializer : com/toastta public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/MethodOptions; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/MethodOptions; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/MethodOptions; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/MethodOptions; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/MethodOptions; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2181,7 +2331,7 @@ public final class com/toasttab/protokt/MethodOptions$MethodOptionsDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/Mixin : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Mixin : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Mixin$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Mixin; @@ -2191,13 +2341,13 @@ public final class com/toasttab/protokt/Mixin : com/toasttab/protokt/rt/KtMessag public final fun getRoot ()Ljava/lang/String; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/Mixin$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Mixin; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Mixin; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Mixin; @@ -2208,6 +2358,12 @@ public final class com/toasttab/protokt/Mixin$Deserializer : com/toasttab/protok public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Mixin; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Mixin; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Mixin; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Mixin; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Mixin; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2245,7 +2401,7 @@ public final class com/toasttab/protokt/NullValue$UNRECOGNIZED : com/toasttab/pr public fun (I)V } -public final class com/toasttab/protokt/OneofDescriptorProto : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/OneofDescriptorProto : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/OneofDescriptorProto$Deserializer; public synthetic fun (Ljava/lang/String;Lcom/toasttab/protokt/OneofOptions;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/OneofDescriptorProto; @@ -2255,13 +2411,13 @@ public final class com/toasttab/protokt/OneofDescriptorProto : com/toasttab/prot public final fun getOptions ()Lcom/toasttab/protokt/OneofOptions; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/OneofDescriptorProto$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/OneofDescriptorProto; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/OneofDescriptorProto; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/OneofDescriptorProto; @@ -2272,6 +2428,12 @@ public final class com/toasttab/protokt/OneofDescriptorProto$Deserializer : com/ public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/OneofDescriptorProto; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/OneofDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/OneofDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/OneofDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/OneofDescriptorProto; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2289,7 +2451,7 @@ public final class com/toasttab/protokt/OneofDescriptorProto$OneofDescriptorProt public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/OneofOptions : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/OneofOptions : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/OneofOptions$Deserializer; public synthetic fun (Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/OneofOptions; @@ -2298,13 +2460,13 @@ public final class com/toasttab/protokt/OneofOptions : com/toasttab/protokt/rt/K public final fun getUninterpretedOption ()Ljava/util/List; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/OneofOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/OneofOptions; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/OneofOptions; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/OneofOptions; @@ -2315,6 +2477,12 @@ public final class com/toasttab/protokt/OneofOptions$Deserializer : com/toasttab public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/OneofOptions; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/OneofOptions; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/OneofOptions; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/OneofOptions; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/OneofOptions; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2330,7 +2498,7 @@ public final class com/toasttab/protokt/OneofOptions$OneofOptionsDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/Option : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Option : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Option$Deserializer; public synthetic fun (Ljava/lang/String;Lcom/toasttab/protokt/Any;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Option; @@ -2340,13 +2508,13 @@ public final class com/toasttab/protokt/Option : com/toasttab/protokt/rt/KtMessa public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getValue ()Lcom/toasttab/protokt/Any; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/Option$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Option; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Option; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Option; @@ -2357,6 +2525,12 @@ public final class com/toasttab/protokt/Option$Deserializer : com/toasttab/proto public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Option; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Option; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Option; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Option; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Option; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2374,7 +2548,7 @@ public final class com/toasttab/protokt/Option$OptionDsl { public final fun setValue (Lcom/toasttab/protokt/Any;)V } -public final class com/toasttab/protokt/ServiceDescriptorProto : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/ServiceDescriptorProto : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/ServiceDescriptorProto$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/util/List;Lcom/toasttab/protokt/ServiceOptions;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ServiceDescriptorProto; @@ -2385,13 +2559,13 @@ public final class com/toasttab/protokt/ServiceDescriptorProto : com/toasttab/pr public final fun getOptions ()Lcom/toasttab/protokt/ServiceOptions; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/ServiceDescriptorProto$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/ServiceDescriptorProto; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/ServiceDescriptorProto; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/ServiceDescriptorProto; @@ -2402,6 +2576,12 @@ public final class com/toasttab/protokt/ServiceDescriptorProto$Deserializer : co public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/ServiceDescriptorProto; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/ServiceDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/ServiceDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/ServiceDescriptorProto; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/ServiceDescriptorProto; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2421,7 +2601,7 @@ public final class com/toasttab/protokt/ServiceDescriptorProto$ServiceDescriptor public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/ServiceOptions : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/ServiceOptions : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/ServiceOptions$Deserializer; public synthetic fun (Ljava/lang/Boolean;Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/ServiceOptions; @@ -2431,13 +2611,13 @@ public final class com/toasttab/protokt/ServiceOptions : com/toasttab/protokt/rt public final fun getUninterpretedOption ()Ljava/util/List; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/ServiceOptions$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/ServiceOptions; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/ServiceOptions; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/ServiceOptions; @@ -2448,6 +2628,12 @@ public final class com/toasttab/protokt/ServiceOptions$Deserializer : com/toastt public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/ServiceOptions; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/ServiceOptions; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/ServiceOptions; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/ServiceOptions; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/ServiceOptions; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2465,7 +2651,7 @@ public final class com/toasttab/protokt/ServiceOptions$ServiceOptionsDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/SourceCodeInfo : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/SourceCodeInfo : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/SourceCodeInfo$Deserializer; public synthetic fun (Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/SourceCodeInfo; @@ -2474,13 +2660,13 @@ public final class com/toasttab/protokt/SourceCodeInfo : com/toasttab/protokt/rt public fun getMessageSize ()I public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/SourceCodeInfo$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/SourceCodeInfo; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/SourceCodeInfo; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/SourceCodeInfo; @@ -2491,13 +2677,19 @@ public final class com/toasttab/protokt/SourceCodeInfo$Deserializer : com/toastt public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/SourceCodeInfo; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/SourceCodeInfo; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/SourceCodeInfo; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/SourceCodeInfo; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/SourceCodeInfo; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/SourceCodeInfo; } -public final class com/toasttab/protokt/SourceCodeInfo$Location : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/SourceCodeInfo$Location : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/SourceCodeInfo$Location$Deserializer; public synthetic fun (Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/SourceCodeInfo$Location; @@ -2510,13 +2702,13 @@ public final class com/toasttab/protokt/SourceCodeInfo$Location : com/toasttab/p public final fun getTrailingComments ()Ljava/lang/String; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/SourceCodeInfo$Location$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/SourceCodeInfo$Location; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/SourceCodeInfo$Location; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/SourceCodeInfo$Location; @@ -2527,6 +2719,12 @@ public final class com/toasttab/protokt/SourceCodeInfo$Location$Deserializer : c public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/SourceCodeInfo$Location; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/SourceCodeInfo$Location; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/SourceCodeInfo$Location; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/SourceCodeInfo$Location; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/SourceCodeInfo$Location; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2559,7 +2757,7 @@ public final class com/toasttab/protokt/SourceCodeInfo$SourceCodeInfoDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/SourceContext : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/SourceContext : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/SourceContext$Deserializer; public synthetic fun (Ljava/lang/String;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/SourceContext; @@ -2568,13 +2766,13 @@ public final class com/toasttab/protokt/SourceContext : com/toasttab/protokt/rt/ public fun getMessageSize ()I public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/SourceContext$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/SourceContext; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/SourceContext; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/SourceContext; @@ -2585,6 +2783,12 @@ public final class com/toasttab/protokt/SourceContext$Deserializer : com/toastta public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/SourceContext; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/SourceContext; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/SourceContext; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/SourceContext; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/SourceContext; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2600,7 +2804,7 @@ public final class com/toasttab/protokt/SourceContext$SourceContextDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/StringValue : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/StringValue : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/StringValue$Deserializer; public synthetic fun (Ljava/lang/String;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/StringValue; @@ -2609,13 +2813,13 @@ public final class com/toasttab/protokt/StringValue : com/toasttab/protokt/rt/Kt public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getValue ()Ljava/lang/String; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/StringValue$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/StringValue; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/StringValue; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/StringValue; @@ -2626,6 +2830,12 @@ public final class com/toasttab/protokt/StringValue$Deserializer : com/toasttab/ public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/StringValue; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/StringValue; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/StringValue; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/StringValue; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/StringValue; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2641,17 +2851,7 @@ public final class com/toasttab/protokt/StringValue$StringValueDsl { public final fun setValue (Ljava/lang/String;)V } -public final class com/toasttab/protokt/StringValueConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/StringValueConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun unwrap (Ljava/lang/String;)Lcom/toasttab/protokt/StringValue; - public fun wrap (Lcom/toasttab/protokt/StringValue;)Ljava/lang/String; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/Struct : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Struct : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Struct$Deserializer; public synthetic fun (Ljava/util/Map;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Struct; @@ -2660,13 +2860,13 @@ public final class com/toasttab/protokt/Struct : com/toasttab/protokt/rt/KtMessa public fun getMessageSize ()I public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/Struct$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Struct; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Struct; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Struct; @@ -2677,6 +2877,12 @@ public final class com/toasttab/protokt/Struct$Deserializer : com/toasttab/proto public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Struct; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Struct; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Struct; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Struct; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Struct; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2716,7 +2922,7 @@ public final class com/toasttab/protokt/Syntax$UNRECOGNIZED : com/toasttab/proto public fun (I)V } -public final class com/toasttab/protokt/Timestamp : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Timestamp : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Timestamp$Deserializer; public synthetic fun (JILcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Timestamp; @@ -2726,13 +2932,13 @@ public final class com/toasttab/protokt/Timestamp : com/toasttab/protokt/rt/KtMe public final fun getSeconds ()J public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/Timestamp$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Timestamp; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Timestamp; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Timestamp; @@ -2743,6 +2949,12 @@ public final class com/toasttab/protokt/Timestamp$Deserializer : com/toasttab/pr public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Timestamp; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Timestamp; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Timestamp; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Timestamp; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Timestamp; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2760,7 +2972,7 @@ public final class com/toasttab/protokt/Timestamp$TimestampDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/Type : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Type : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Type$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lcom/toasttab/protokt/SourceContext;Lcom/toasttab/protokt/Syntax;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Type; @@ -2774,13 +2986,13 @@ public final class com/toasttab/protokt/Type : com/toasttab/protokt/rt/KtMessage public final fun getSyntax ()Lcom/toasttab/protokt/Syntax; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/Type$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Type; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Type; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Type; @@ -2791,6 +3003,12 @@ public final class com/toasttab/protokt/Type$Deserializer : com/toasttab/protokt public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Type; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Type; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Type; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Type; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Type; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2816,7 +3034,7 @@ public final class com/toasttab/protokt/Type$TypeDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/UInt32Value : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/UInt32Value : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/UInt32Value$Deserializer; public synthetic fun (ILcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/UInt32Value; @@ -2825,13 +3043,13 @@ public final class com/toasttab/protokt/UInt32Value : com/toasttab/protokt/rt/Kt public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getValue ()I public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/UInt32Value$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/UInt32Value; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/UInt32Value; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/UInt32Value; @@ -2842,6 +3060,12 @@ public final class com/toasttab/protokt/UInt32Value$Deserializer : com/toasttab/ public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/UInt32Value; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/UInt32Value; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/UInt32Value; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/UInt32Value; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/UInt32Value; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2857,17 +3081,7 @@ public final class com/toasttab/protokt/UInt32Value$UInt32ValueDsl { public final fun setValue (I)V } -public final class com/toasttab/protokt/UInt32ValueConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/UInt32ValueConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public fun unwrap (I)Lcom/toasttab/protokt/UInt32Value; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun wrap (Lcom/toasttab/protokt/UInt32Value;)Ljava/lang/Integer; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/UInt64Value : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/UInt64Value : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/UInt64Value$Deserializer; public synthetic fun (JLcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/UInt64Value; @@ -2876,13 +3090,13 @@ public final class com/toasttab/protokt/UInt64Value : com/toasttab/protokt/rt/Kt public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public final fun getValue ()J public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/UInt64Value$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/UInt64Value; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/UInt64Value; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/UInt64Value; @@ -2893,6 +3107,12 @@ public final class com/toasttab/protokt/UInt64Value$Deserializer : com/toasttab/ public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/UInt64Value; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/UInt64Value; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/UInt64Value; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/UInt64Value; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/UInt64Value; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -2908,17 +3128,7 @@ public final class com/toasttab/protokt/UInt64Value$UInt64ValueDsl { public final fun setValue (J)V } -public final class com/toasttab/protokt/UInt64ValueConverter : com/toasttab/protokt/ext/Converter { - public static final field INSTANCE Lcom/toasttab/protokt/UInt64ValueConverter; - public fun getWrapped ()Lkotlin/reflect/KClass; - public fun getWrapper ()Lkotlin/reflect/KClass; - public fun unwrap (J)Lcom/toasttab/protokt/UInt64Value; - public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; - public fun wrap (Lcom/toasttab/protokt/UInt64Value;)Ljava/lang/Long; - public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; -} - -public final class com/toasttab/protokt/UninterpretedOption : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/UninterpretedOption : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/UninterpretedOption$Deserializer; public synthetic fun (Ljava/util/List;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;Lcom/toasttab/protokt/rt/Bytes;Ljava/lang/String;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/UninterpretedOption; @@ -2933,13 +3143,13 @@ public final class com/toasttab/protokt/UninterpretedOption : com/toasttab/proto public final fun getStringValue ()Lcom/toasttab/protokt/rt/Bytes; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/UninterpretedOption$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/UninterpretedOption; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/UninterpretedOption; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/UninterpretedOption; @@ -2950,13 +3160,19 @@ public final class com/toasttab/protokt/UninterpretedOption$Deserializer : com/t public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/UninterpretedOption; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/UninterpretedOption; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/UninterpretedOption; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/UninterpretedOption; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/UninterpretedOption; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/UninterpretedOption; } -public final class com/toasttab/protokt/UninterpretedOption$NamePart : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/UninterpretedOption$NamePart : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/UninterpretedOption$NamePart$Deserializer; public synthetic fun (Ljava/lang/String;ZLcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/UninterpretedOption$NamePart; @@ -2966,13 +3182,13 @@ public final class com/toasttab/protokt/UninterpretedOption$NamePart : com/toast public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I public final fun isExtension ()Z - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/UninterpretedOption$NamePart$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/UninterpretedOption$NamePart; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/UninterpretedOption$NamePart; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/UninterpretedOption$NamePart; @@ -2983,6 +3199,12 @@ public final class com/toasttab/protokt/UninterpretedOption$NamePart$Deserialize public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/UninterpretedOption$NamePart; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/UninterpretedOption$NamePart; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/UninterpretedOption$NamePart; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/UninterpretedOption$NamePart; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/UninterpretedOption$NamePart; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -3021,7 +3243,7 @@ public final class com/toasttab/protokt/UninterpretedOption$UninterpretedOptionD public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/Value : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/Value : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/Value$Deserializer; public synthetic fun (Lcom/toasttab/protokt/Value$Kind;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/Value; @@ -3030,13 +3252,13 @@ public final class com/toasttab/protokt/Value : com/toasttab/protokt/rt/KtMessag public fun getMessageSize ()I public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/Value$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/Value; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/Value; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/Value; @@ -3047,6 +3269,12 @@ public final class com/toasttab/protokt/Value$Deserializer : com/toasttab/protok public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/Value; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/Value; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/Value; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/Value; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/Value; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -3131,7 +3359,7 @@ public final class com/toasttab/protokt/Value$ValueDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/compiler/CodeGeneratorRequest : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/compiler/CodeGeneratorRequest : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/compiler/CodeGeneratorRequest$Deserializer; public synthetic fun (Ljava/util/List;Ljava/lang/String;Lcom/toasttab/protokt/compiler/Version;Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/compiler/CodeGeneratorRequest; @@ -3143,9 +3371,7 @@ public final class com/toasttab/protokt/compiler/CodeGeneratorRequest : com/toas public final fun getProtoFile ()Ljava/util/List; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } @@ -3165,6 +3391,8 @@ public final class com/toasttab/protokt/compiler/CodeGeneratorRequest$CodeGenera } public final class com/toasttab/protokt/compiler/CodeGeneratorRequest$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/compiler/CodeGeneratorRequest; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/compiler/CodeGeneratorRequest; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/compiler/CodeGeneratorRequest; @@ -3175,13 +3403,19 @@ public final class com/toasttab/protokt/compiler/CodeGeneratorRequest$Deserializ public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/compiler/CodeGeneratorRequest; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/compiler/CodeGeneratorRequest; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/compiler/CodeGeneratorRequest; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/compiler/CodeGeneratorRequest; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/compiler/CodeGeneratorRequest; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; public fun invoke (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/compiler/CodeGeneratorRequest; } -public final class com/toasttab/protokt/compiler/CodeGeneratorResponse : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/compiler/CodeGeneratorResponse : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/compiler/CodeGeneratorResponse$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/lang/Long;Ljava/util/List;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse; @@ -3192,9 +3426,7 @@ public final class com/toasttab/protokt/compiler/CodeGeneratorResponse : com/toa public final fun getSupportedFeatures ()Ljava/lang/Long; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } @@ -3212,6 +3444,8 @@ public final class com/toasttab/protokt/compiler/CodeGeneratorResponse$CodeGener } public final class com/toasttab/protokt/compiler/CodeGeneratorResponse$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse; @@ -3222,6 +3456,12 @@ public final class com/toasttab/protokt/compiler/CodeGeneratorResponse$Deseriali public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -3252,7 +3492,7 @@ public final class com/toasttab/protokt/compiler/CodeGeneratorResponse$Feature$U public fun (I)V } -public final class com/toasttab/protokt/compiler/CodeGeneratorResponse$File : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/compiler/CodeGeneratorResponse$File : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/compiler/CodeGeneratorResponse$File$Deserializer; public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/toasttab/protokt/GeneratedCodeInfo;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse$File; @@ -3264,13 +3504,13 @@ public final class com/toasttab/protokt/compiler/CodeGeneratorResponse$File : co public final fun getName ()Ljava/lang/String; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/compiler/CodeGeneratorResponse$File$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse$File; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse$File; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse$File; @@ -3281,6 +3521,12 @@ public final class com/toasttab/protokt/compiler/CodeGeneratorResponse$File$Dese public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse$File; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse$File; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse$File; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse$File; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/compiler/CodeGeneratorResponse$File; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -3302,7 +3548,7 @@ public final class com/toasttab/protokt/compiler/CodeGeneratorResponse$File$File public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } -public final class com/toasttab/protokt/compiler/Version : com/toasttab/protokt/rt/KtMessage { +public final class com/toasttab/protokt/compiler/Version : protokt/v1/AbstractKtMessage { public static final field Deserializer Lcom/toasttab/protokt/compiler/Version$Deserializer; public synthetic fun (Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Lcom/toasttab/protokt/rt/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun copy (Lkotlin/jvm/functions/Function1;)Lcom/toasttab/protokt/compiler/Version; @@ -3314,13 +3560,13 @@ public final class com/toasttab/protokt/compiler/Version : com/toasttab/protokt/ public final fun getSuffix ()Ljava/lang/String; public final fun getUnknownFields ()Lcom/toasttab/protokt/rt/UnknownFieldSet; public fun hashCode ()I - public fun serialize ()[B - public fun serialize (Lcom/toasttab/protokt/rt/KtMessageSerializer;)V - public fun serialize (Ljava/io/OutputStream;)V + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V public fun toString ()Ljava/lang/String; } public final class com/toasttab/protokt/compiler/Version$Deserializer : com/toasttab/protokt/rt/KtDeserializer, kotlin/jvm/functions/Function1 { + public fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/compiler/Version; + public synthetic fun deserialize (Lcom/google/protobuf/CodedInputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/compiler/Version; public synthetic fun deserialize (Lcom/toasttab/protokt/rt/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Lcom/toasttab/protokt/rt/BytesSlice;)Lcom/toasttab/protokt/compiler/Version; @@ -3331,6 +3577,12 @@ public final class com/toasttab/protokt/compiler/Version$Deserializer : com/toas public synthetic fun deserialize (Ljava/io/InputStream;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/compiler/Version; public synthetic fun deserialize (Ljava/nio/ByteBuffer;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/compiler/Version; + public synthetic fun deserialize (Lprotokt/v1/Bytes;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/compiler/Version; + public synthetic fun deserialize (Lprotokt/v1/BytesSlice;)Lcom/toasttab/protokt/rt/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/compiler/Version; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; public fun deserialize ([B)Lcom/toasttab/protokt/compiler/Version; public synthetic fun deserialize ([B)Lcom/toasttab/protokt/rt/KtMessage; public synthetic fun invoke (Ljava/lang/Object;)Ljava/lang/Object; @@ -3352,3 +3604,2766 @@ public final class com/toasttab/protokt/compiler/Version$VersionDsl { public final fun setUnknownFields (Lcom/toasttab/protokt/rt/UnknownFieldSet;)V } +public final class protokt/v1/google/protobuf/Any : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Any$Deserializer; + public synthetic fun (Ljava/lang/String;Lprotokt/v1/Bytes;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Any; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getTypeUrl ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()Lprotokt/v1/Bytes; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Any$AnyDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Any; + public final fun getTypeUrl ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()Lprotokt/v1/Bytes; + public final fun setTypeUrl (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setValue (Lprotokt/v1/Bytes;)V +} + +public final class protokt/v1/google/protobuf/Any$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Any; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Any; +} + +public final class protokt/v1/google/protobuf/AnyKt { + public static final fun Any (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Any; +} + +public final class protokt/v1/google/protobuf/Api : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Api$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Lprotokt/v1/google/protobuf/SourceContext;Ljava/util/List;Lprotokt/v1/google/protobuf/Syntax;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Api; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getMethods ()Ljava/util/List; + public final fun getMixins ()Ljava/util/List; + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Ljava/util/List; + public final fun getSourceContext ()Lprotokt/v1/google/protobuf/SourceContext; + public final fun getSyntax ()Lprotokt/v1/google/protobuf/Syntax; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getVersion ()Ljava/lang/String; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Api$ApiDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Api; + public final fun getMethods ()Ljava/util/List; + public final fun getMixins ()Ljava/util/List; + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Ljava/util/List; + public final fun getSourceContext ()Lprotokt/v1/google/protobuf/SourceContext; + public final fun getSyntax ()Lprotokt/v1/google/protobuf/Syntax; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getVersion ()Ljava/lang/String; + public final fun setMethods (Ljava/util/List;)V + public final fun setMixins (Ljava/util/List;)V + public final fun setName (Ljava/lang/String;)V + public final fun setOptions (Ljava/util/List;)V + public final fun setSourceContext (Lprotokt/v1/google/protobuf/SourceContext;)V + public final fun setSyntax (Lprotokt/v1/google/protobuf/Syntax;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setVersion (Ljava/lang/String;)V +} + +public final class protokt/v1/google/protobuf/Api$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Api; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Api; +} + +public final class protokt/v1/google/protobuf/ApiKt { + public static final fun Api (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Api; + public static final fun Method (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Method; + public static final fun Mixin (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Mixin; +} + +public final class protokt/v1/google/protobuf/BoolValue : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/BoolValue$Deserializer; + public synthetic fun (ZLprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/BoolValue; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()Z + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/BoolValue$BoolValueDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/BoolValue; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()Z + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setValue (Z)V +} + +public final class protokt/v1/google/protobuf/BoolValue$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/BoolValue; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/BoolValue; +} + +public final class protokt/v1/google/protobuf/BoolValueConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/google/protobuf/BoolValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Z)Lprotokt/v1/google/protobuf/BoolValue; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/google/protobuf/BoolValue;)Ljava/lang/Boolean; +} + +public final class protokt/v1/google/protobuf/BytesValue : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/BytesValue$Deserializer; + public synthetic fun (Lprotokt/v1/Bytes;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/BytesValue; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()Lprotokt/v1/Bytes; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/BytesValue$BytesValueDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/BytesValue; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()Lprotokt/v1/Bytes; + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setValue (Lprotokt/v1/Bytes;)V +} + +public final class protokt/v1/google/protobuf/BytesValue$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/BytesValue; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/BytesValue; +} + +public final class protokt/v1/google/protobuf/BytesValueConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/google/protobuf/BytesValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Lprotokt/v1/Bytes;)Lprotokt/v1/google/protobuf/BytesValue; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/google/protobuf/BytesValue;)Lprotokt/v1/Bytes; +} + +public final class protokt/v1/google/protobuf/DescriptorKt { + public static final fun DescriptorProto (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/DescriptorProto; + public static final fun EnumDescriptorProto (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumDescriptorProto; + public static final fun EnumOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumOptions; + public static final fun EnumValueDescriptorProto (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumValueDescriptorProto; + public static final fun EnumValueOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumValueOptions; + public static final fun ExtensionRangeOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/ExtensionRangeOptions; + public static final fun FieldDescriptorProto (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FieldDescriptorProto; + public static final fun FieldOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FieldOptions; + public static final fun FileDescriptorProto (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FileDescriptorProto; + public static final fun FileDescriptorSet (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FileDescriptorSet; + public static final fun FileOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FileOptions; + public static final fun GeneratedCodeInfo (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/GeneratedCodeInfo; + public static final fun MessageOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/MessageOptions; + public static final fun MethodDescriptorProto (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/MethodDescriptorProto; + public static final fun MethodOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/MethodOptions; + public static final fun OneofDescriptorProto (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/OneofDescriptorProto; + public static final fun OneofOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/OneofOptions; + public static final fun ServiceDescriptorProto (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/ServiceDescriptorProto; + public static final fun ServiceOptions (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/ServiceOptions; + public static final fun SourceCodeInfo (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/SourceCodeInfo; + public static final fun UninterpretedOption (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/UninterpretedOption; +} + +public final class protokt/v1/google/protobuf/DescriptorProto : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/DescriptorProto$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lprotokt/v1/google/protobuf/MessageOptions;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/DescriptorProto; + public fun equals (Ljava/lang/Object;)Z + public final fun getEnumType ()Ljava/util/List; + public final fun getExtension ()Ljava/util/List; + public final fun getExtensionRange ()Ljava/util/List; + public final fun getField ()Ljava/util/List; + public fun getMessageSize ()I + public final fun getName ()Ljava/lang/String; + public final fun getNestedType ()Ljava/util/List; + public final fun getOneofDecl ()Ljava/util/List; + public final fun getOptions ()Lprotokt/v1/google/protobuf/MessageOptions; + public final fun getReservedName ()Ljava/util/List; + public final fun getReservedRange ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/DescriptorProto$DescriptorProtoDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/DescriptorProto; + public final fun getEnumType ()Ljava/util/List; + public final fun getExtension ()Ljava/util/List; + public final fun getExtensionRange ()Ljava/util/List; + public final fun getField ()Ljava/util/List; + public final fun getName ()Ljava/lang/String; + public final fun getNestedType ()Ljava/util/List; + public final fun getOneofDecl ()Ljava/util/List; + public final fun getOptions ()Lprotokt/v1/google/protobuf/MessageOptions; + public final fun getReservedName ()Ljava/util/List; + public final fun getReservedRange ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setEnumType (Ljava/util/List;)V + public final fun setExtension (Ljava/util/List;)V + public final fun setExtensionRange (Ljava/util/List;)V + public final fun setField (Ljava/util/List;)V + public final fun setName (Ljava/lang/String;)V + public final fun setNestedType (Ljava/util/List;)V + public final fun setOneofDecl (Ljava/util/List;)V + public final fun setOptions (Lprotokt/v1/google/protobuf/MessageOptions;)V + public final fun setReservedName (Ljava/util/List;)V + public final fun setReservedRange (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/DescriptorProto$Deserializer : protokt/v1/AbstractKtDeserializer { + public final fun ExtensionRange (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/DescriptorProto$ExtensionRange; + public final fun ReservedRange (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/DescriptorProto$ReservedRange; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/DescriptorProto; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/DescriptorProto; +} + +public final class protokt/v1/google/protobuf/DescriptorProto$ExtensionRange : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/DescriptorProto$ExtensionRange$Deserializer; + public synthetic fun (Ljava/lang/Integer;Ljava/lang/Integer;Lprotokt/v1/google/protobuf/ExtensionRangeOptions;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/DescriptorProto$ExtensionRange; + public fun equals (Ljava/lang/Object;)Z + public final fun getEnd ()Ljava/lang/Integer; + public fun getMessageSize ()I + public final fun getOptions ()Lprotokt/v1/google/protobuf/ExtensionRangeOptions; + public final fun getStart ()Ljava/lang/Integer; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/DescriptorProto$ExtensionRange$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/DescriptorProto$ExtensionRange; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/DescriptorProto$ExtensionRange; +} + +public final class protokt/v1/google/protobuf/DescriptorProto$ExtensionRange$ExtensionRangeDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/DescriptorProto$ExtensionRange; + public final fun getEnd ()Ljava/lang/Integer; + public final fun getOptions ()Lprotokt/v1/google/protobuf/ExtensionRangeOptions; + public final fun getStart ()Ljava/lang/Integer; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setEnd (Ljava/lang/Integer;)V + public final fun setOptions (Lprotokt/v1/google/protobuf/ExtensionRangeOptions;)V + public final fun setStart (Ljava/lang/Integer;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/DescriptorProto$ReservedRange : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/DescriptorProto$ReservedRange$Deserializer; + public synthetic fun (Ljava/lang/Integer;Ljava/lang/Integer;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/DescriptorProto$ReservedRange; + public fun equals (Ljava/lang/Object;)Z + public final fun getEnd ()Ljava/lang/Integer; + public fun getMessageSize ()I + public final fun getStart ()Ljava/lang/Integer; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/DescriptorProto$ReservedRange$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/DescriptorProto$ReservedRange; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/DescriptorProto$ReservedRange; +} + +public final class protokt/v1/google/protobuf/DescriptorProto$ReservedRange$ReservedRangeDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/DescriptorProto$ReservedRange; + public final fun getEnd ()Ljava/lang/Integer; + public final fun getStart ()Ljava/lang/Integer; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setEnd (Ljava/lang/Integer;)V + public final fun setStart (Ljava/lang/Integer;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/DoubleValue : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/DoubleValue$Deserializer; + public synthetic fun (DLprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/DoubleValue; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()D + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/DoubleValue$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/DoubleValue; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/DoubleValue; +} + +public final class protokt/v1/google/protobuf/DoubleValue$DoubleValueDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/DoubleValue; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()D + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setValue (D)V +} + +public final class protokt/v1/google/protobuf/DoubleValueConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/google/protobuf/DoubleValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public fun unwrap (D)Lprotokt/v1/google/protobuf/DoubleValue; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/google/protobuf/DoubleValue;)Ljava/lang/Double; +} + +public final class protokt/v1/google/protobuf/Duration : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Duration$Deserializer; + public synthetic fun (JILprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Duration; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getNanos ()I + public final fun getSeconds ()J + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Duration$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Duration; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Duration; +} + +public final class protokt/v1/google/protobuf/Duration$DurationDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Duration; + public final fun getNanos ()I + public final fun getSeconds ()J + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setNanos (I)V + public final fun setSeconds (J)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/DurationKt { + public static final fun Duration (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Duration; +} + +public final class protokt/v1/google/protobuf/Empty : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Empty$Deserializer; + public synthetic fun (Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Empty; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Empty$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Empty; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Empty; +} + +public final class protokt/v1/google/protobuf/Empty$EmptyDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Empty; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/EmptyKt { + public static final fun Empty (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Empty; +} + +public final class protokt/v1/google/protobuf/Enum : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Enum$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lprotokt/v1/google/protobuf/SourceContext;Lprotokt/v1/google/protobuf/Syntax;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Enum; + public fun equals (Ljava/lang/Object;)Z + public final fun getEnumvalue ()Ljava/util/List; + public fun getMessageSize ()I + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Ljava/util/List; + public final fun getSourceContext ()Lprotokt/v1/google/protobuf/SourceContext; + public final fun getSyntax ()Lprotokt/v1/google/protobuf/Syntax; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Enum$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Enum; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Enum; +} + +public final class protokt/v1/google/protobuf/Enum$EnumDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Enum; + public final fun getEnumvalue ()Ljava/util/List; + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Ljava/util/List; + public final fun getSourceContext ()Lprotokt/v1/google/protobuf/SourceContext; + public final fun getSyntax ()Lprotokt/v1/google/protobuf/Syntax; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setEnumvalue (Ljava/util/List;)V + public final fun setName (Ljava/lang/String;)V + public final fun setOptions (Ljava/util/List;)V + public final fun setSourceContext (Lprotokt/v1/google/protobuf/SourceContext;)V + public final fun setSyntax (Lprotokt/v1/google/protobuf/Syntax;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/EnumDescriptorProto : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/EnumDescriptorProto$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/util/List;Lprotokt/v1/google/protobuf/EnumOptions;Ljava/util/List;Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumDescriptorProto; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Lprotokt/v1/google/protobuf/EnumOptions; + public final fun getReservedName ()Ljava/util/List; + public final fun getReservedRange ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()Ljava/util/List; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/EnumDescriptorProto$Deserializer : protokt/v1/AbstractKtDeserializer { + public final fun EnumReservedRange (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumDescriptorProto$EnumReservedRange; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/EnumDescriptorProto; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumDescriptorProto; +} + +public final class protokt/v1/google/protobuf/EnumDescriptorProto$EnumDescriptorProtoDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/EnumDescriptorProto; + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Lprotokt/v1/google/protobuf/EnumOptions; + public final fun getReservedName ()Ljava/util/List; + public final fun getReservedRange ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()Ljava/util/List; + public final fun setName (Ljava/lang/String;)V + public final fun setOptions (Lprotokt/v1/google/protobuf/EnumOptions;)V + public final fun setReservedName (Ljava/util/List;)V + public final fun setReservedRange (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setValue (Ljava/util/List;)V +} + +public final class protokt/v1/google/protobuf/EnumDescriptorProto$EnumReservedRange : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/EnumDescriptorProto$EnumReservedRange$Deserializer; + public synthetic fun (Ljava/lang/Integer;Ljava/lang/Integer;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumDescriptorProto$EnumReservedRange; + public fun equals (Ljava/lang/Object;)Z + public final fun getEnd ()Ljava/lang/Integer; + public fun getMessageSize ()I + public final fun getStart ()Ljava/lang/Integer; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/EnumDescriptorProto$EnumReservedRange$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/EnumDescriptorProto$EnumReservedRange; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumDescriptorProto$EnumReservedRange; +} + +public final class protokt/v1/google/protobuf/EnumDescriptorProto$EnumReservedRange$EnumReservedRangeDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/EnumDescriptorProto$EnumReservedRange; + public final fun getEnd ()Ljava/lang/Integer; + public final fun getStart ()Ljava/lang/Integer; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setEnd (Ljava/lang/Integer;)V + public final fun setStart (Ljava/lang/Integer;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/EnumOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/EnumOptions$Deserializer; + public synthetic fun (Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumOptions; + public fun equals (Ljava/lang/Object;)Z + public final fun getAllowAlias ()Ljava/lang/Boolean; + public final fun getDeprecated ()Ljava/lang/Boolean; + public fun getMessageSize ()I + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/EnumOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/EnumOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumOptions; +} + +public final class protokt/v1/google/protobuf/EnumOptions$EnumOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/EnumOptions; + public final fun getAllowAlias ()Ljava/lang/Boolean; + public final fun getDeprecated ()Ljava/lang/Boolean; + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setAllowAlias (Ljava/lang/Boolean;)V + public final fun setDeprecated (Ljava/lang/Boolean;)V + public final fun setUninterpretedOption (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/EnumValue : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/EnumValue$Deserializer; + public synthetic fun (Ljava/lang/String;ILjava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumValue; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getName ()Ljava/lang/String; + public final fun getNumber ()I + public final fun getOptions ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/EnumValue$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/EnumValue; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumValue; +} + +public final class protokt/v1/google/protobuf/EnumValue$EnumValueDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/EnumValue; + public final fun getName ()Ljava/lang/String; + public final fun getNumber ()I + public final fun getOptions ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setName (Ljava/lang/String;)V + public final fun setNumber (I)V + public final fun setOptions (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/EnumValueDescriptorProto : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/EnumValueDescriptorProto$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/lang/Integer;Lprotokt/v1/google/protobuf/EnumValueOptions;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumValueDescriptorProto; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getName ()Ljava/lang/String; + public final fun getNumber ()Ljava/lang/Integer; + public final fun getOptions ()Lprotokt/v1/google/protobuf/EnumValueOptions; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/EnumValueDescriptorProto$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/EnumValueDescriptorProto; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumValueDescriptorProto; +} + +public final class protokt/v1/google/protobuf/EnumValueDescriptorProto$EnumValueDescriptorProtoDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/EnumValueDescriptorProto; + public final fun getName ()Ljava/lang/String; + public final fun getNumber ()Ljava/lang/Integer; + public final fun getOptions ()Lprotokt/v1/google/protobuf/EnumValueOptions; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setName (Ljava/lang/String;)V + public final fun setNumber (Ljava/lang/Integer;)V + public final fun setOptions (Lprotokt/v1/google/protobuf/EnumValueOptions;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/EnumValueOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/EnumValueOptions$Deserializer; + public synthetic fun (Ljava/lang/Boolean;Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumValueOptions; + public fun equals (Ljava/lang/Object;)Z + public final fun getDeprecated ()Ljava/lang/Boolean; + public fun getMessageSize ()I + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/EnumValueOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/EnumValueOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumValueOptions; +} + +public final class protokt/v1/google/protobuf/EnumValueOptions$EnumValueOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/EnumValueOptions; + public final fun getDeprecated ()Ljava/lang/Boolean; + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setDeprecated (Ljava/lang/Boolean;)V + public final fun setUninterpretedOption (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/ExtensionRangeOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/ExtensionRangeOptions$Deserializer; + public synthetic fun (Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/ExtensionRangeOptions; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/ExtensionRangeOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/ExtensionRangeOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/ExtensionRangeOptions; +} + +public final class protokt/v1/google/protobuf/ExtensionRangeOptions$ExtensionRangeOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/ExtensionRangeOptions; + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setUninterpretedOption (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/Field : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Field$Deserializer; + public synthetic fun (Lprotokt/v1/google/protobuf/Field$Kind;Lprotokt/v1/google/protobuf/Field$Cardinality;ILjava/lang/String;Ljava/lang/String;IZLjava/util/List;Ljava/lang/String;Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Field; + public fun equals (Ljava/lang/Object;)Z + public final fun getCardinality ()Lprotokt/v1/google/protobuf/Field$Cardinality; + public final fun getDefaultValue ()Ljava/lang/String; + public final fun getJsonName ()Ljava/lang/String; + public final fun getKind ()Lprotokt/v1/google/protobuf/Field$Kind; + public fun getMessageSize ()I + public final fun getName ()Ljava/lang/String; + public final fun getNumber ()I + public final fun getOneofIndex ()I + public final fun getOptions ()Ljava/util/List; + public final fun getPacked ()Z + public final fun getTypeUrl ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public abstract class protokt/v1/google/protobuf/Field$Cardinality : protokt/v1/KtEnum { + public static final field Deserializer Lprotokt/v1/google/protobuf/Field$Cardinality$Deserializer; + public synthetic fun (ILjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getName ()Ljava/lang/String; + public fun getValue ()I +} + +public final class protokt/v1/google/protobuf/Field$Cardinality$Deserializer : protokt/v1/KtEnumDeserializer { + public synthetic fun from (I)Lprotokt/v1/KtEnum; + public fun from (I)Lprotokt/v1/google/protobuf/Field$Cardinality; +} + +public final class protokt/v1/google/protobuf/Field$Cardinality$OPTIONAL : protokt/v1/google/protobuf/Field$Cardinality { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Cardinality$OPTIONAL; +} + +public final class protokt/v1/google/protobuf/Field$Cardinality$REPEATED : protokt/v1/google/protobuf/Field$Cardinality { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Cardinality$REPEATED; +} + +public final class protokt/v1/google/protobuf/Field$Cardinality$REQUIRED : protokt/v1/google/protobuf/Field$Cardinality { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Cardinality$REQUIRED; +} + +public final class protokt/v1/google/protobuf/Field$Cardinality$UNKNOWN : protokt/v1/google/protobuf/Field$Cardinality { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Cardinality$UNKNOWN; +} + +public final class protokt/v1/google/protobuf/Field$Cardinality$UNRECOGNIZED : protokt/v1/google/protobuf/Field$Cardinality { + public fun (I)V +} + +public final class protokt/v1/google/protobuf/Field$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Field; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Field; +} + +public final class protokt/v1/google/protobuf/Field$FieldDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Field; + public final fun getCardinality ()Lprotokt/v1/google/protobuf/Field$Cardinality; + public final fun getDefaultValue ()Ljava/lang/String; + public final fun getJsonName ()Ljava/lang/String; + public final fun getKind ()Lprotokt/v1/google/protobuf/Field$Kind; + public final fun getName ()Ljava/lang/String; + public final fun getNumber ()I + public final fun getOneofIndex ()I + public final fun getOptions ()Ljava/util/List; + public final fun getPacked ()Z + public final fun getTypeUrl ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setCardinality (Lprotokt/v1/google/protobuf/Field$Cardinality;)V + public final fun setDefaultValue (Ljava/lang/String;)V + public final fun setJsonName (Ljava/lang/String;)V + public final fun setKind (Lprotokt/v1/google/protobuf/Field$Kind;)V + public final fun setName (Ljava/lang/String;)V + public final fun setNumber (I)V + public final fun setOneofIndex (I)V + public final fun setOptions (Ljava/util/List;)V + public final fun setPacked (Z)V + public final fun setTypeUrl (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public abstract class protokt/v1/google/protobuf/Field$Kind : protokt/v1/KtEnum { + public static final field Deserializer Lprotokt/v1/google/protobuf/Field$Kind$Deserializer; + public synthetic fun (ILjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getName ()Ljava/lang/String; + public fun getValue ()I +} + +public final class protokt/v1/google/protobuf/Field$Kind$Deserializer : protokt/v1/KtEnumDeserializer { + public synthetic fun from (I)Lprotokt/v1/KtEnum; + public fun from (I)Lprotokt/v1/google/protobuf/Field$Kind; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_BOOL : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_BOOL; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_BYTES : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_BYTES; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_DOUBLE : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_DOUBLE; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_ENUM : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_ENUM; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_FIXED32 : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_FIXED32; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_FIXED64 : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_FIXED64; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_FLOAT : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_FLOAT; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_GROUP : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_GROUP; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_INT32 : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_INT32; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_INT64 : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_INT64; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_MESSAGE : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_MESSAGE; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_SFIXED32 : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_SFIXED32; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_SFIXED64 : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_SFIXED64; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_SINT32 : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_SINT32; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_SINT64 : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_SINT64; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_STRING : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_STRING; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_UINT32 : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_UINT32; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_UINT64 : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_UINT64; +} + +public final class protokt/v1/google/protobuf/Field$Kind$TYPE_UNKNOWN : protokt/v1/google/protobuf/Field$Kind { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Field$Kind$TYPE_UNKNOWN; +} + +public final class protokt/v1/google/protobuf/Field$Kind$UNRECOGNIZED : protokt/v1/google/protobuf/Field$Kind { + public fun (I)V +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/FieldDescriptorProto$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Lprotokt/v1/google/protobuf/FieldDescriptorProto$Label;Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type;Ljava/lang/String;Ljava/lang/String;Lprotokt/v1/google/protobuf/FieldOptions;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/Boolean;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FieldDescriptorProto; + public fun equals (Ljava/lang/Object;)Z + public final fun getDefaultValue ()Ljava/lang/String; + public final fun getExtendee ()Ljava/lang/String; + public final fun getJsonName ()Ljava/lang/String; + public final fun getLabel ()Lprotokt/v1/google/protobuf/FieldDescriptorProto$Label; + public fun getMessageSize ()I + public final fun getName ()Ljava/lang/String; + public final fun getNumber ()Ljava/lang/Integer; + public final fun getOneofIndex ()Ljava/lang/Integer; + public final fun getOptions ()Lprotokt/v1/google/protobuf/FieldOptions; + public final fun getProto3Optional ()Ljava/lang/Boolean; + public final fun getType ()Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type; + public final fun getTypeName ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/FieldDescriptorProto; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FieldDescriptorProto; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$FieldDescriptorProtoDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/FieldDescriptorProto; + public final fun getDefaultValue ()Ljava/lang/String; + public final fun getExtendee ()Ljava/lang/String; + public final fun getJsonName ()Ljava/lang/String; + public final fun getLabel ()Lprotokt/v1/google/protobuf/FieldDescriptorProto$Label; + public final fun getName ()Ljava/lang/String; + public final fun getNumber ()Ljava/lang/Integer; + public final fun getOneofIndex ()Ljava/lang/Integer; + public final fun getOptions ()Lprotokt/v1/google/protobuf/FieldOptions; + public final fun getProto3Optional ()Ljava/lang/Boolean; + public final fun getType ()Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type; + public final fun getTypeName ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setDefaultValue (Ljava/lang/String;)V + public final fun setExtendee (Ljava/lang/String;)V + public final fun setJsonName (Ljava/lang/String;)V + public final fun setLabel (Lprotokt/v1/google/protobuf/FieldDescriptorProto$Label;)V + public final fun setName (Ljava/lang/String;)V + public final fun setNumber (Ljava/lang/Integer;)V + public final fun setOneofIndex (Ljava/lang/Integer;)V + public final fun setOptions (Lprotokt/v1/google/protobuf/FieldOptions;)V + public final fun setProto3Optional (Ljava/lang/Boolean;)V + public final fun setType (Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type;)V + public final fun setTypeName (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public abstract class protokt/v1/google/protobuf/FieldDescriptorProto$Label : protokt/v1/KtEnum { + public static final field Deserializer Lprotokt/v1/google/protobuf/FieldDescriptorProto$Label$Deserializer; + public synthetic fun (ILjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getName ()Ljava/lang/String; + public fun getValue ()I +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Label$Deserializer : protokt/v1/KtEnumDeserializer { + public synthetic fun from (I)Lprotokt/v1/KtEnum; + public fun from (I)Lprotokt/v1/google/protobuf/FieldDescriptorProto$Label; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Label$OPTIONAL : protokt/v1/google/protobuf/FieldDescriptorProto$Label { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Label$OPTIONAL; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Label$REPEATED : protokt/v1/google/protobuf/FieldDescriptorProto$Label { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Label$REPEATED; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Label$REQUIRED : protokt/v1/google/protobuf/FieldDescriptorProto$Label { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Label$REQUIRED; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Label$UNRECOGNIZED : protokt/v1/google/protobuf/FieldDescriptorProto$Label { + public fun (I)V +} + +public abstract class protokt/v1/google/protobuf/FieldDescriptorProto$Type : protokt/v1/KtEnum { + public static final field Deserializer Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$Deserializer; + public synthetic fun (ILjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getName ()Ljava/lang/String; + public fun getValue ()I +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$BOOL : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$BOOL; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$BYTES : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$BYTES; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$DOUBLE : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$DOUBLE; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$Deserializer : protokt/v1/KtEnumDeserializer { + public synthetic fun from (I)Lprotokt/v1/KtEnum; + public fun from (I)Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$ENUM : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$ENUM; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$FIXED32 : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$FIXED32; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$FIXED64 : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$FIXED64; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$FLOAT : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$FLOAT; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$GROUP : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$GROUP; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$INT32 : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$INT32; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$INT64 : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$INT64; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$MESSAGE : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$MESSAGE; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$SFIXED32 : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$SFIXED32; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$SFIXED64 : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$SFIXED64; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$SINT32 : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$SINT32; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$SINT64 : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$SINT64; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$STRING : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$STRING; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$UINT32 : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$UINT32; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$UINT64 : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldDescriptorProto$Type$UINT64; +} + +public final class protokt/v1/google/protobuf/FieldDescriptorProto$Type$UNRECOGNIZED : protokt/v1/google/protobuf/FieldDescriptorProto$Type { + public fun (I)V +} + +public final class protokt/v1/google/protobuf/FieldMask : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/FieldMask$Deserializer; + public synthetic fun (Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FieldMask; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getPaths ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/FieldMask$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/FieldMask; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FieldMask; +} + +public final class protokt/v1/google/protobuf/FieldMask$FieldMaskDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/FieldMask; + public final fun getPaths ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setPaths (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/FieldOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/FieldOptions$Deserializer; + public synthetic fun (Lprotokt/v1/google/protobuf/FieldOptions$CType;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Lprotokt/v1/google/protobuf/FieldOptions$JSType;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FieldOptions; + public fun equals (Ljava/lang/Object;)Z + public final fun getCtype ()Lprotokt/v1/google/protobuf/FieldOptions$CType; + public final fun getDeprecated ()Ljava/lang/Boolean; + public final fun getJstype ()Lprotokt/v1/google/protobuf/FieldOptions$JSType; + public final fun getLazy ()Ljava/lang/Boolean; + public fun getMessageSize ()I + public final fun getPacked ()Ljava/lang/Boolean; + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getUnverifiedLazy ()Ljava/lang/Boolean; + public final fun getWeak ()Ljava/lang/Boolean; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public abstract class protokt/v1/google/protobuf/FieldOptions$CType : protokt/v1/KtEnum { + public static final field Deserializer Lprotokt/v1/google/protobuf/FieldOptions$CType$Deserializer; + public synthetic fun (ILjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getName ()Ljava/lang/String; + public fun getValue ()I +} + +public final class protokt/v1/google/protobuf/FieldOptions$CType$CORD : protokt/v1/google/protobuf/FieldOptions$CType { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldOptions$CType$CORD; +} + +public final class protokt/v1/google/protobuf/FieldOptions$CType$Deserializer : protokt/v1/KtEnumDeserializer { + public synthetic fun from (I)Lprotokt/v1/KtEnum; + public fun from (I)Lprotokt/v1/google/protobuf/FieldOptions$CType; +} + +public final class protokt/v1/google/protobuf/FieldOptions$CType$STRING : protokt/v1/google/protobuf/FieldOptions$CType { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldOptions$CType$STRING; +} + +public final class protokt/v1/google/protobuf/FieldOptions$CType$STRING_PIECE : protokt/v1/google/protobuf/FieldOptions$CType { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldOptions$CType$STRING_PIECE; +} + +public final class protokt/v1/google/protobuf/FieldOptions$CType$UNRECOGNIZED : protokt/v1/google/protobuf/FieldOptions$CType { + public fun (I)V +} + +public final class protokt/v1/google/protobuf/FieldOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/FieldOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FieldOptions; +} + +public final class protokt/v1/google/protobuf/FieldOptions$FieldOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/FieldOptions; + public final fun getCtype ()Lprotokt/v1/google/protobuf/FieldOptions$CType; + public final fun getDeprecated ()Ljava/lang/Boolean; + public final fun getJstype ()Lprotokt/v1/google/protobuf/FieldOptions$JSType; + public final fun getLazy ()Ljava/lang/Boolean; + public final fun getPacked ()Ljava/lang/Boolean; + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getUnverifiedLazy ()Ljava/lang/Boolean; + public final fun getWeak ()Ljava/lang/Boolean; + public final fun setCtype (Lprotokt/v1/google/protobuf/FieldOptions$CType;)V + public final fun setDeprecated (Ljava/lang/Boolean;)V + public final fun setJstype (Lprotokt/v1/google/protobuf/FieldOptions$JSType;)V + public final fun setLazy (Ljava/lang/Boolean;)V + public final fun setPacked (Ljava/lang/Boolean;)V + public final fun setUninterpretedOption (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setUnverifiedLazy (Ljava/lang/Boolean;)V + public final fun setWeak (Ljava/lang/Boolean;)V +} + +public abstract class protokt/v1/google/protobuf/FieldOptions$JSType : protokt/v1/KtEnum { + public static final field Deserializer Lprotokt/v1/google/protobuf/FieldOptions$JSType$Deserializer; + public synthetic fun (ILjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getName ()Ljava/lang/String; + public fun getValue ()I +} + +public final class protokt/v1/google/protobuf/FieldOptions$JSType$Deserializer : protokt/v1/KtEnumDeserializer { + public synthetic fun from (I)Lprotokt/v1/KtEnum; + public fun from (I)Lprotokt/v1/google/protobuf/FieldOptions$JSType; +} + +public final class protokt/v1/google/protobuf/FieldOptions$JSType$JS_NORMAL : protokt/v1/google/protobuf/FieldOptions$JSType { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldOptions$JSType$JS_NORMAL; +} + +public final class protokt/v1/google/protobuf/FieldOptions$JSType$JS_NUMBER : protokt/v1/google/protobuf/FieldOptions$JSType { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldOptions$JSType$JS_NUMBER; +} + +public final class protokt/v1/google/protobuf/FieldOptions$JSType$JS_STRING : protokt/v1/google/protobuf/FieldOptions$JSType { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FieldOptions$JSType$JS_STRING; +} + +public final class protokt/v1/google/protobuf/FieldOptions$JSType$UNRECOGNIZED : protokt/v1/google/protobuf/FieldOptions$JSType { + public fun (I)V +} + +public final class protokt/v1/google/protobuf/Field_maskKt { + public static final fun FieldMask (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FieldMask; +} + +public final class protokt/v1/google/protobuf/FileDescriptorProto : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/FileDescriptorProto$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lprotokt/v1/google/protobuf/FileOptions;Lprotokt/v1/google/protobuf/SourceCodeInfo;Ljava/util/List;Ljava/util/List;Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FileDescriptorProto; + public fun equals (Ljava/lang/Object;)Z + public final fun getDependency ()Ljava/util/List; + public final fun getEnumType ()Ljava/util/List; + public final fun getExtension ()Ljava/util/List; + public fun getMessageSize ()I + public final fun getMessageType ()Ljava/util/List; + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Lprotokt/v1/google/protobuf/FileOptions; + public final fun getPackage ()Ljava/lang/String; + public final fun getPublicDependency ()Ljava/util/List; + public final fun getService ()Ljava/util/List; + public final fun getSourceCodeInfo ()Lprotokt/v1/google/protobuf/SourceCodeInfo; + public final fun getSyntax ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getWeakDependency ()Ljava/util/List; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/FileDescriptorProto$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/FileDescriptorProto; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FileDescriptorProto; +} + +public final class protokt/v1/google/protobuf/FileDescriptorProto$FileDescriptorProtoDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/FileDescriptorProto; + public final fun getDependency ()Ljava/util/List; + public final fun getEnumType ()Ljava/util/List; + public final fun getExtension ()Ljava/util/List; + public final fun getMessageType ()Ljava/util/List; + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Lprotokt/v1/google/protobuf/FileOptions; + public final fun getPackage ()Ljava/lang/String; + public final fun getPublicDependency ()Ljava/util/List; + public final fun getService ()Ljava/util/List; + public final fun getSourceCodeInfo ()Lprotokt/v1/google/protobuf/SourceCodeInfo; + public final fun getSyntax ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getWeakDependency ()Ljava/util/List; + public final fun setDependency (Ljava/util/List;)V + public final fun setEnumType (Ljava/util/List;)V + public final fun setExtension (Ljava/util/List;)V + public final fun setMessageType (Ljava/util/List;)V + public final fun setName (Ljava/lang/String;)V + public final fun setOptions (Lprotokt/v1/google/protobuf/FileOptions;)V + public final fun setPackage (Ljava/lang/String;)V + public final fun setPublicDependency (Ljava/util/List;)V + public final fun setService (Ljava/util/List;)V + public final fun setSourceCodeInfo (Lprotokt/v1/google/protobuf/SourceCodeInfo;)V + public final fun setSyntax (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setWeakDependency (Ljava/util/List;)V +} + +public final class protokt/v1/google/protobuf/FileDescriptorSet : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/FileDescriptorSet$Deserializer; + public synthetic fun (Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FileDescriptorSet; + public fun equals (Ljava/lang/Object;)Z + public final fun getFile ()Ljava/util/List; + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/FileDescriptorSet$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/FileDescriptorSet; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FileDescriptorSet; +} + +public final class protokt/v1/google/protobuf/FileDescriptorSet$FileDescriptorSetDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/FileDescriptorSet; + public final fun getFile ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setFile (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/FileOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/FileOptions$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lprotokt/v1/google/protobuf/FileOptions$OptimizeMode;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FileOptions; + public fun equals (Ljava/lang/Object;)Z + public final fun getCcEnableArenas ()Ljava/lang/Boolean; + public final fun getCcGenericServices ()Ljava/lang/Boolean; + public final fun getCsharpNamespace ()Ljava/lang/String; + public final fun getDeprecated ()Ljava/lang/Boolean; + public final fun getGoPackage ()Ljava/lang/String; + public final fun getJavaGenerateEqualsAndHash ()Ljava/lang/Boolean; + public final fun getJavaGenericServices ()Ljava/lang/Boolean; + public final fun getJavaMultipleFiles ()Ljava/lang/Boolean; + public final fun getJavaOuterClassname ()Ljava/lang/String; + public final fun getJavaPackage ()Ljava/lang/String; + public final fun getJavaStringCheckUtf8 ()Ljava/lang/Boolean; + public fun getMessageSize ()I + public final fun getObjcClassPrefix ()Ljava/lang/String; + public final fun getOptimizeFor ()Lprotokt/v1/google/protobuf/FileOptions$OptimizeMode; + public final fun getPhpClassPrefix ()Ljava/lang/String; + public final fun getPhpGenericServices ()Ljava/lang/Boolean; + public final fun getPhpMetadataNamespace ()Ljava/lang/String; + public final fun getPhpNamespace ()Ljava/lang/String; + public final fun getPyGenericServices ()Ljava/lang/Boolean; + public final fun getRubyPackage ()Ljava/lang/String; + public final fun getSwiftPrefix ()Ljava/lang/String; + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/FileOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/FileOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FileOptions; +} + +public final class protokt/v1/google/protobuf/FileOptions$FileOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/FileOptions; + public final fun getCcEnableArenas ()Ljava/lang/Boolean; + public final fun getCcGenericServices ()Ljava/lang/Boolean; + public final fun getCsharpNamespace ()Ljava/lang/String; + public final fun getDeprecated ()Ljava/lang/Boolean; + public final fun getGoPackage ()Ljava/lang/String; + public final fun getJavaGenerateEqualsAndHash ()Ljava/lang/Boolean; + public final fun getJavaGenericServices ()Ljava/lang/Boolean; + public final fun getJavaMultipleFiles ()Ljava/lang/Boolean; + public final fun getJavaOuterClassname ()Ljava/lang/String; + public final fun getJavaPackage ()Ljava/lang/String; + public final fun getJavaStringCheckUtf8 ()Ljava/lang/Boolean; + public final fun getObjcClassPrefix ()Ljava/lang/String; + public final fun getOptimizeFor ()Lprotokt/v1/google/protobuf/FileOptions$OptimizeMode; + public final fun getPhpClassPrefix ()Ljava/lang/String; + public final fun getPhpGenericServices ()Ljava/lang/Boolean; + public final fun getPhpMetadataNamespace ()Ljava/lang/String; + public final fun getPhpNamespace ()Ljava/lang/String; + public final fun getPyGenericServices ()Ljava/lang/Boolean; + public final fun getRubyPackage ()Ljava/lang/String; + public final fun getSwiftPrefix ()Ljava/lang/String; + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setCcEnableArenas (Ljava/lang/Boolean;)V + public final fun setCcGenericServices (Ljava/lang/Boolean;)V + public final fun setCsharpNamespace (Ljava/lang/String;)V + public final fun setDeprecated (Ljava/lang/Boolean;)V + public final fun setGoPackage (Ljava/lang/String;)V + public final fun setJavaGenerateEqualsAndHash (Ljava/lang/Boolean;)V + public final fun setJavaGenericServices (Ljava/lang/Boolean;)V + public final fun setJavaMultipleFiles (Ljava/lang/Boolean;)V + public final fun setJavaOuterClassname (Ljava/lang/String;)V + public final fun setJavaPackage (Ljava/lang/String;)V + public final fun setJavaStringCheckUtf8 (Ljava/lang/Boolean;)V + public final fun setObjcClassPrefix (Ljava/lang/String;)V + public final fun setOptimizeFor (Lprotokt/v1/google/protobuf/FileOptions$OptimizeMode;)V + public final fun setPhpClassPrefix (Ljava/lang/String;)V + public final fun setPhpGenericServices (Ljava/lang/Boolean;)V + public final fun setPhpMetadataNamespace (Ljava/lang/String;)V + public final fun setPhpNamespace (Ljava/lang/String;)V + public final fun setPyGenericServices (Ljava/lang/Boolean;)V + public final fun setRubyPackage (Ljava/lang/String;)V + public final fun setSwiftPrefix (Ljava/lang/String;)V + public final fun setUninterpretedOption (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public abstract class protokt/v1/google/protobuf/FileOptions$OptimizeMode : protokt/v1/KtEnum { + public static final field Deserializer Lprotokt/v1/google/protobuf/FileOptions$OptimizeMode$Deserializer; + public synthetic fun (ILjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getName ()Ljava/lang/String; + public fun getValue ()I +} + +public final class protokt/v1/google/protobuf/FileOptions$OptimizeMode$CODE_SIZE : protokt/v1/google/protobuf/FileOptions$OptimizeMode { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FileOptions$OptimizeMode$CODE_SIZE; +} + +public final class protokt/v1/google/protobuf/FileOptions$OptimizeMode$Deserializer : protokt/v1/KtEnumDeserializer { + public synthetic fun from (I)Lprotokt/v1/KtEnum; + public fun from (I)Lprotokt/v1/google/protobuf/FileOptions$OptimizeMode; +} + +public final class protokt/v1/google/protobuf/FileOptions$OptimizeMode$LITE_RUNTIME : protokt/v1/google/protobuf/FileOptions$OptimizeMode { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FileOptions$OptimizeMode$LITE_RUNTIME; +} + +public final class protokt/v1/google/protobuf/FileOptions$OptimizeMode$SPEED : protokt/v1/google/protobuf/FileOptions$OptimizeMode { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FileOptions$OptimizeMode$SPEED; +} + +public final class protokt/v1/google/protobuf/FileOptions$OptimizeMode$UNRECOGNIZED : protokt/v1/google/protobuf/FileOptions$OptimizeMode { + public fun (I)V +} + +public final class protokt/v1/google/protobuf/FloatValue : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/FloatValue$Deserializer; + public synthetic fun (FLprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FloatValue; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()F + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/FloatValue$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/FloatValue; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FloatValue; +} + +public final class protokt/v1/google/protobuf/FloatValue$FloatValueDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/FloatValue; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()F + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setValue (F)V +} + +public final class protokt/v1/google/protobuf/FloatValueConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/google/protobuf/FloatValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public fun unwrap (F)Lprotokt/v1/google/protobuf/FloatValue; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/google/protobuf/FloatValue;)Ljava/lang/Float; +} + +public final class protokt/v1/google/protobuf/GeneratedCodeInfo : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/GeneratedCodeInfo$Deserializer; + public synthetic fun (Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/GeneratedCodeInfo; + public fun equals (Ljava/lang/Object;)Z + public final fun getAnnotation ()Ljava/util/List; + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/GeneratedCodeInfo$Annotation : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/GeneratedCodeInfo$Annotation$Deserializer; + public synthetic fun (Ljava/util/List;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/GeneratedCodeInfo$Annotation; + public fun equals (Ljava/lang/Object;)Z + public final fun getBegin ()Ljava/lang/Integer; + public final fun getEnd ()Ljava/lang/Integer; + public fun getMessageSize ()I + public final fun getPath ()Ljava/util/List; + public final fun getSourceFile ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/GeneratedCodeInfo$Annotation$AnnotationDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/GeneratedCodeInfo$Annotation; + public final fun getBegin ()Ljava/lang/Integer; + public final fun getEnd ()Ljava/lang/Integer; + public final fun getPath ()Ljava/util/List; + public final fun getSourceFile ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setBegin (Ljava/lang/Integer;)V + public final fun setEnd (Ljava/lang/Integer;)V + public final fun setPath (Ljava/util/List;)V + public final fun setSourceFile (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/GeneratedCodeInfo$Annotation$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/GeneratedCodeInfo$Annotation; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/GeneratedCodeInfo$Annotation; +} + +public final class protokt/v1/google/protobuf/GeneratedCodeInfo$Deserializer : protokt/v1/AbstractKtDeserializer { + public final fun Annotation (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/GeneratedCodeInfo$Annotation; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/GeneratedCodeInfo; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/GeneratedCodeInfo; +} + +public final class protokt/v1/google/protobuf/GeneratedCodeInfo$GeneratedCodeInfoDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/GeneratedCodeInfo; + public final fun getAnnotation ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setAnnotation (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/Int32Value : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Int32Value$Deserializer; + public synthetic fun (ILprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Int32Value; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()I + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Int32Value$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Int32Value; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Int32Value; +} + +public final class protokt/v1/google/protobuf/Int32Value$Int32ValueDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Int32Value; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()I + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setValue (I)V +} + +public final class protokt/v1/google/protobuf/Int32ValueConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Int32ValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public fun unwrap (I)Lprotokt/v1/google/protobuf/Int32Value; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/google/protobuf/Int32Value;)Ljava/lang/Integer; +} + +public final class protokt/v1/google/protobuf/Int64Value : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Int64Value$Deserializer; + public synthetic fun (JLprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Int64Value; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()J + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Int64Value$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Int64Value; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Int64Value; +} + +public final class protokt/v1/google/protobuf/Int64Value$Int64ValueDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Int64Value; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()J + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setValue (J)V +} + +public final class protokt/v1/google/protobuf/Int64ValueConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Int64ValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public fun unwrap (J)Lprotokt/v1/google/protobuf/Int64Value; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/google/protobuf/Int64Value;)Ljava/lang/Long; +} + +public final class protokt/v1/google/protobuf/ListValue : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/ListValue$Deserializer; + public synthetic fun (Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/ListValue; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValues ()Ljava/util/List; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/ListValue$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/ListValue; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/ListValue; +} + +public final class protokt/v1/google/protobuf/ListValue$ListValueDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/ListValue; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValues ()Ljava/util/List; + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setValues (Ljava/util/List;)V +} + +public final class protokt/v1/google/protobuf/MessageOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/MessageOptions$Deserializer; + public synthetic fun (Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/MessageOptions; + public fun equals (Ljava/lang/Object;)Z + public final fun getDeprecated ()Ljava/lang/Boolean; + public final fun getMapEntry ()Ljava/lang/Boolean; + public final fun getMessageSetWireFormat ()Ljava/lang/Boolean; + public fun getMessageSize ()I + public final fun getNoStandardDescriptorAccessor ()Ljava/lang/Boolean; + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/MessageOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/MessageOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/MessageOptions; +} + +public final class protokt/v1/google/protobuf/MessageOptions$MessageOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/MessageOptions; + public final fun getDeprecated ()Ljava/lang/Boolean; + public final fun getMapEntry ()Ljava/lang/Boolean; + public final fun getMessageSetWireFormat ()Ljava/lang/Boolean; + public final fun getNoStandardDescriptorAccessor ()Ljava/lang/Boolean; + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setDeprecated (Ljava/lang/Boolean;)V + public final fun setMapEntry (Ljava/lang/Boolean;)V + public final fun setMessageSetWireFormat (Ljava/lang/Boolean;)V + public final fun setNoStandardDescriptorAccessor (Ljava/lang/Boolean;)V + public final fun setUninterpretedOption (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/Method : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Method$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;ZLjava/util/List;Lprotokt/v1/google/protobuf/Syntax;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Method; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Ljava/util/List; + public final fun getRequestStreaming ()Z + public final fun getRequestTypeUrl ()Ljava/lang/String; + public final fun getResponseStreaming ()Z + public final fun getResponseTypeUrl ()Ljava/lang/String; + public final fun getSyntax ()Lprotokt/v1/google/protobuf/Syntax; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Method$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Method; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Method; +} + +public final class protokt/v1/google/protobuf/Method$MethodDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Method; + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Ljava/util/List; + public final fun getRequestStreaming ()Z + public final fun getRequestTypeUrl ()Ljava/lang/String; + public final fun getResponseStreaming ()Z + public final fun getResponseTypeUrl ()Ljava/lang/String; + public final fun getSyntax ()Lprotokt/v1/google/protobuf/Syntax; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setName (Ljava/lang/String;)V + public final fun setOptions (Ljava/util/List;)V + public final fun setRequestStreaming (Z)V + public final fun setRequestTypeUrl (Ljava/lang/String;)V + public final fun setResponseStreaming (Z)V + public final fun setResponseTypeUrl (Ljava/lang/String;)V + public final fun setSyntax (Lprotokt/v1/google/protobuf/Syntax;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/MethodDescriptorProto : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/MethodDescriptorProto$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lprotokt/v1/google/protobuf/MethodOptions;Ljava/lang/Boolean;Ljava/lang/Boolean;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/MethodDescriptorProto; + public fun equals (Ljava/lang/Object;)Z + public final fun getClientStreaming ()Ljava/lang/Boolean; + public final fun getInputType ()Ljava/lang/String; + public fun getMessageSize ()I + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Lprotokt/v1/google/protobuf/MethodOptions; + public final fun getOutputType ()Ljava/lang/String; + public final fun getServerStreaming ()Ljava/lang/Boolean; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/MethodDescriptorProto$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/MethodDescriptorProto; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/MethodDescriptorProto; +} + +public final class protokt/v1/google/protobuf/MethodDescriptorProto$MethodDescriptorProtoDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/MethodDescriptorProto; + public final fun getClientStreaming ()Ljava/lang/Boolean; + public final fun getInputType ()Ljava/lang/String; + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Lprotokt/v1/google/protobuf/MethodOptions; + public final fun getOutputType ()Ljava/lang/String; + public final fun getServerStreaming ()Ljava/lang/Boolean; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setClientStreaming (Ljava/lang/Boolean;)V + public final fun setInputType (Ljava/lang/String;)V + public final fun setName (Ljava/lang/String;)V + public final fun setOptions (Lprotokt/v1/google/protobuf/MethodOptions;)V + public final fun setOutputType (Ljava/lang/String;)V + public final fun setServerStreaming (Ljava/lang/Boolean;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/MethodOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/MethodOptions$Deserializer; + public synthetic fun (Ljava/lang/Boolean;Lprotokt/v1/google/protobuf/MethodOptions$IdempotencyLevel;Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/MethodOptions; + public fun equals (Ljava/lang/Object;)Z + public final fun getDeprecated ()Ljava/lang/Boolean; + public final fun getIdempotencyLevel ()Lprotokt/v1/google/protobuf/MethodOptions$IdempotencyLevel; + public fun getMessageSize ()I + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/MethodOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/MethodOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/MethodOptions; +} + +public abstract class protokt/v1/google/protobuf/MethodOptions$IdempotencyLevel : protokt/v1/KtEnum { + public static final field Deserializer Lprotokt/v1/google/protobuf/MethodOptions$IdempotencyLevel$Deserializer; + public synthetic fun (ILjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getName ()Ljava/lang/String; + public fun getValue ()I +} + +public final class protokt/v1/google/protobuf/MethodOptions$IdempotencyLevel$Deserializer : protokt/v1/KtEnumDeserializer { + public synthetic fun from (I)Lprotokt/v1/KtEnum; + public fun from (I)Lprotokt/v1/google/protobuf/MethodOptions$IdempotencyLevel; +} + +public final class protokt/v1/google/protobuf/MethodOptions$IdempotencyLevel$IDEMPOTENCY_UNKNOWN : protokt/v1/google/protobuf/MethodOptions$IdempotencyLevel { + public static final field INSTANCE Lprotokt/v1/google/protobuf/MethodOptions$IdempotencyLevel$IDEMPOTENCY_UNKNOWN; +} + +public final class protokt/v1/google/protobuf/MethodOptions$IdempotencyLevel$IDEMPOTENT : protokt/v1/google/protobuf/MethodOptions$IdempotencyLevel { + public static final field INSTANCE Lprotokt/v1/google/protobuf/MethodOptions$IdempotencyLevel$IDEMPOTENT; +} + +public final class protokt/v1/google/protobuf/MethodOptions$IdempotencyLevel$NO_SIDE_EFFECTS : protokt/v1/google/protobuf/MethodOptions$IdempotencyLevel { + public static final field INSTANCE Lprotokt/v1/google/protobuf/MethodOptions$IdempotencyLevel$NO_SIDE_EFFECTS; +} + +public final class protokt/v1/google/protobuf/MethodOptions$IdempotencyLevel$UNRECOGNIZED : protokt/v1/google/protobuf/MethodOptions$IdempotencyLevel { + public fun (I)V +} + +public final class protokt/v1/google/protobuf/MethodOptions$MethodOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/MethodOptions; + public final fun getDeprecated ()Ljava/lang/Boolean; + public final fun getIdempotencyLevel ()Lprotokt/v1/google/protobuf/MethodOptions$IdempotencyLevel; + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setDeprecated (Ljava/lang/Boolean;)V + public final fun setIdempotencyLevel (Lprotokt/v1/google/protobuf/MethodOptions$IdempotencyLevel;)V + public final fun setUninterpretedOption (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/Mixin : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Mixin$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Mixin; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getName ()Ljava/lang/String; + public final fun getRoot ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Mixin$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Mixin; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Mixin; +} + +public final class protokt/v1/google/protobuf/Mixin$MixinDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Mixin; + public final fun getName ()Ljava/lang/String; + public final fun getRoot ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setName (Ljava/lang/String;)V + public final fun setRoot (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public abstract class protokt/v1/google/protobuf/NullValue : protokt/v1/KtEnum { + public static final field Deserializer Lprotokt/v1/google/protobuf/NullValue$Deserializer; + public synthetic fun (ILjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getName ()Ljava/lang/String; + public fun getValue ()I +} + +public final class protokt/v1/google/protobuf/NullValue$Deserializer : protokt/v1/KtEnumDeserializer { + public synthetic fun from (I)Lprotokt/v1/KtEnum; + public fun from (I)Lprotokt/v1/google/protobuf/NullValue; +} + +public final class protokt/v1/google/protobuf/NullValue$NULL_VALUE : protokt/v1/google/protobuf/NullValue { + public static final field INSTANCE Lprotokt/v1/google/protobuf/NullValue$NULL_VALUE; +} + +public final class protokt/v1/google/protobuf/NullValue$UNRECOGNIZED : protokt/v1/google/protobuf/NullValue { + public fun (I)V +} + +public final class protokt/v1/google/protobuf/OneofDescriptorProto : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/OneofDescriptorProto$Deserializer; + public synthetic fun (Ljava/lang/String;Lprotokt/v1/google/protobuf/OneofOptions;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/OneofDescriptorProto; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Lprotokt/v1/google/protobuf/OneofOptions; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/OneofDescriptorProto$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/OneofDescriptorProto; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/OneofDescriptorProto; +} + +public final class protokt/v1/google/protobuf/OneofDescriptorProto$OneofDescriptorProtoDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/OneofDescriptorProto; + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Lprotokt/v1/google/protobuf/OneofOptions; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setName (Ljava/lang/String;)V + public final fun setOptions (Lprotokt/v1/google/protobuf/OneofOptions;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/OneofOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/OneofOptions$Deserializer; + public synthetic fun (Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/OneofOptions; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/OneofOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/OneofOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/OneofOptions; +} + +public final class protokt/v1/google/protobuf/OneofOptions$OneofOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/OneofOptions; + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setUninterpretedOption (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/Option : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Option$Deserializer; + public synthetic fun (Ljava/lang/String;Lprotokt/v1/google/protobuf/Any;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Option; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getName ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()Lprotokt/v1/google/protobuf/Any; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Option$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Option; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Option; +} + +public final class protokt/v1/google/protobuf/Option$OptionDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Option; + public final fun getName ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()Lprotokt/v1/google/protobuf/Any; + public final fun setName (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setValue (Lprotokt/v1/google/protobuf/Any;)V +} + +public final class protokt/v1/google/protobuf/ServiceDescriptorProto : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/ServiceDescriptorProto$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/util/List;Lprotokt/v1/google/protobuf/ServiceOptions;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/ServiceDescriptorProto; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getMethod ()Ljava/util/List; + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Lprotokt/v1/google/protobuf/ServiceOptions; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/ServiceDescriptorProto$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/ServiceDescriptorProto; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/ServiceDescriptorProto; +} + +public final class protokt/v1/google/protobuf/ServiceDescriptorProto$ServiceDescriptorProtoDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/ServiceDescriptorProto; + public final fun getMethod ()Ljava/util/List; + public final fun getName ()Ljava/lang/String; + public final fun getOptions ()Lprotokt/v1/google/protobuf/ServiceOptions; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setMethod (Ljava/util/List;)V + public final fun setName (Ljava/lang/String;)V + public final fun setOptions (Lprotokt/v1/google/protobuf/ServiceOptions;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/ServiceOptions : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/ServiceOptions$Deserializer; + public synthetic fun (Ljava/lang/Boolean;Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/ServiceOptions; + public fun equals (Ljava/lang/Object;)Z + public final fun getDeprecated ()Ljava/lang/Boolean; + public fun getMessageSize ()I + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/ServiceOptions$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/ServiceOptions; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/ServiceOptions; +} + +public final class protokt/v1/google/protobuf/ServiceOptions$ServiceOptionsDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/ServiceOptions; + public final fun getDeprecated ()Ljava/lang/Boolean; + public final fun getUninterpretedOption ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setDeprecated (Ljava/lang/Boolean;)V + public final fun setUninterpretedOption (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/SourceCodeInfo : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/SourceCodeInfo$Deserializer; + public synthetic fun (Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/SourceCodeInfo; + public fun equals (Ljava/lang/Object;)Z + public final fun getLocation ()Ljava/util/List; + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/SourceCodeInfo$Deserializer : protokt/v1/AbstractKtDeserializer { + public final fun Location (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/SourceCodeInfo$Location; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/SourceCodeInfo; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/SourceCodeInfo; +} + +public final class protokt/v1/google/protobuf/SourceCodeInfo$Location : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/SourceCodeInfo$Location$Deserializer; + public synthetic fun (Ljava/util/List;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/SourceCodeInfo$Location; + public fun equals (Ljava/lang/Object;)Z + public final fun getLeadingComments ()Ljava/lang/String; + public final fun getLeadingDetachedComments ()Ljava/util/List; + public fun getMessageSize ()I + public final fun getPath ()Ljava/util/List; + public final fun getSpan ()Ljava/util/List; + public final fun getTrailingComments ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/SourceCodeInfo$Location$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/SourceCodeInfo$Location; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/SourceCodeInfo$Location; +} + +public final class protokt/v1/google/protobuf/SourceCodeInfo$Location$LocationDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/SourceCodeInfo$Location; + public final fun getLeadingComments ()Ljava/lang/String; + public final fun getLeadingDetachedComments ()Ljava/util/List; + public final fun getPath ()Ljava/util/List; + public final fun getSpan ()Ljava/util/List; + public final fun getTrailingComments ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setLeadingComments (Ljava/lang/String;)V + public final fun setLeadingDetachedComments (Ljava/util/List;)V + public final fun setPath (Ljava/util/List;)V + public final fun setSpan (Ljava/util/List;)V + public final fun setTrailingComments (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/SourceCodeInfo$SourceCodeInfoDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/SourceCodeInfo; + public final fun getLocation ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setLocation (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/SourceContext : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/SourceContext$Deserializer; + public synthetic fun (Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/SourceContext; + public fun equals (Ljava/lang/Object;)Z + public final fun getFileName ()Ljava/lang/String; + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/SourceContext$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/SourceContext; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/SourceContext; +} + +public final class protokt/v1/google/protobuf/SourceContext$SourceContextDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/SourceContext; + public final fun getFileName ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setFileName (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/Source_contextKt { + public static final fun SourceContext (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/SourceContext; +} + +public final class protokt/v1/google/protobuf/StringValue : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/StringValue$Deserializer; + public synthetic fun (Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/StringValue; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()Ljava/lang/String; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/StringValue$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/StringValue; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/StringValue; +} + +public final class protokt/v1/google/protobuf/StringValue$StringValueDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/StringValue; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue ()Ljava/lang/String; + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setValue (Ljava/lang/String;)V +} + +public final class protokt/v1/google/protobuf/StringValueConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/google/protobuf/StringValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap (Ljava/lang/String;)Lprotokt/v1/google/protobuf/StringValue; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap (Lprotokt/v1/google/protobuf/StringValue;)Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Struct : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Struct$Deserializer; + public synthetic fun (Ljava/util/Map;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Struct; + public fun equals (Ljava/lang/Object;)Z + public final fun getFields ()Ljava/util/Map; + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Struct$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Struct; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Struct; +} + +public final class protokt/v1/google/protobuf/Struct$StructDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Struct; + public final fun getFields ()Ljava/util/Map; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setFields (Ljava/util/Map;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/StructKt { + public static final fun ListValue (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/ListValue; + public static final fun Struct (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Struct; + public static final fun Value (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Value; +} + +public abstract class protokt/v1/google/protobuf/Syntax : protokt/v1/KtEnum { + public static final field Deserializer Lprotokt/v1/google/protobuf/Syntax$Deserializer; + public synthetic fun (ILjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getName ()Ljava/lang/String; + public fun getValue ()I +} + +public final class protokt/v1/google/protobuf/Syntax$Deserializer : protokt/v1/KtEnumDeserializer { + public synthetic fun from (I)Lprotokt/v1/KtEnum; + public fun from (I)Lprotokt/v1/google/protobuf/Syntax; +} + +public final class protokt/v1/google/protobuf/Syntax$PROTO2 : protokt/v1/google/protobuf/Syntax { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Syntax$PROTO2; +} + +public final class protokt/v1/google/protobuf/Syntax$PROTO3 : protokt/v1/google/protobuf/Syntax { + public static final field INSTANCE Lprotokt/v1/google/protobuf/Syntax$PROTO3; +} + +public final class protokt/v1/google/protobuf/Syntax$UNRECOGNIZED : protokt/v1/google/protobuf/Syntax { + public fun (I)V +} + +public final class protokt/v1/google/protobuf/Timestamp : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Timestamp$Deserializer; + public synthetic fun (JILprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Timestamp; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getNanos ()I + public final fun getSeconds ()J + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Timestamp$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Timestamp; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Timestamp; +} + +public final class protokt/v1/google/protobuf/Timestamp$TimestampDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Timestamp; + public final fun getNanos ()I + public final fun getSeconds ()J + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setNanos (I)V + public final fun setSeconds (J)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/TimestampKt { + public static final fun Timestamp (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Timestamp; +} + +public final class protokt/v1/google/protobuf/Type : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Type$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lprotokt/v1/google/protobuf/SourceContext;Lprotokt/v1/google/protobuf/Syntax;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Type; + public fun equals (Ljava/lang/Object;)Z + public final fun getFields ()Ljava/util/List; + public fun getMessageSize ()I + public final fun getName ()Ljava/lang/String; + public final fun getOneofs ()Ljava/util/List; + public final fun getOptions ()Ljava/util/List; + public final fun getSourceContext ()Lprotokt/v1/google/protobuf/SourceContext; + public final fun getSyntax ()Lprotokt/v1/google/protobuf/Syntax; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Type$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Type; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Type; +} + +public final class protokt/v1/google/protobuf/Type$TypeDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Type; + public final fun getFields ()Ljava/util/List; + public final fun getName ()Ljava/lang/String; + public final fun getOneofs ()Ljava/util/List; + public final fun getOptions ()Ljava/util/List; + public final fun getSourceContext ()Lprotokt/v1/google/protobuf/SourceContext; + public final fun getSyntax ()Lprotokt/v1/google/protobuf/Syntax; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setFields (Ljava/util/List;)V + public final fun setName (Ljava/lang/String;)V + public final fun setOneofs (Ljava/util/List;)V + public final fun setOptions (Ljava/util/List;)V + public final fun setSourceContext (Lprotokt/v1/google/protobuf/SourceContext;)V + public final fun setSyntax (Lprotokt/v1/google/protobuf/Syntax;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/TypeKt { + public static final fun Enum (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Enum; + public static final fun EnumValue (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/EnumValue; + public static final fun Field (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Field; + public static final fun Option (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Option; + public static final fun Type (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Type; +} + +public final class protokt/v1/google/protobuf/UInt32Value : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/UInt32Value$Deserializer; + public synthetic fun (ILprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/UInt32Value; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue-pVg5ArA ()I + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/UInt32Value$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/UInt32Value; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/UInt32Value; +} + +public final class protokt/v1/google/protobuf/UInt32Value$UInt32ValueDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/UInt32Value; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue-pVg5ArA ()I + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setValue-WZ4Q5Ns (I)V +} + +public final class protokt/v1/google/protobuf/UInt32ValueConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/google/protobuf/UInt32ValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap-WZ4Q5Ns (I)Lprotokt/v1/google/protobuf/UInt32Value; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap-OGnWXxg (Lprotokt/v1/google/protobuf/UInt32Value;)I +} + +public final class protokt/v1/google/protobuf/UInt64Value : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/UInt64Value$Deserializer; + public synthetic fun (JLprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/UInt64Value; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue-s-VKNKU ()J + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/UInt64Value$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/UInt64Value; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/UInt64Value; +} + +public final class protokt/v1/google/protobuf/UInt64Value$UInt64ValueDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/UInt64Value; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun getValue-s-VKNKU ()J + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V + public final fun setValue-VKZWuLQ (J)V +} + +public final class protokt/v1/google/protobuf/UInt64ValueConverter : protokt/v1/Converter { + public static final field INSTANCE Lprotokt/v1/google/protobuf/UInt64ValueConverter; + public fun getWrapped ()Lkotlin/reflect/KClass; + public fun getWrapper ()Lkotlin/reflect/KClass; + public synthetic fun unwrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun unwrap-VKZWuLQ (J)Lprotokt/v1/google/protobuf/UInt64Value; + public synthetic fun wrap (Ljava/lang/Object;)Ljava/lang/Object; + public fun wrap-I7RO_PI (Lprotokt/v1/google/protobuf/UInt64Value;)J +} + +public final class protokt/v1/google/protobuf/UninterpretedOption : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/UninterpretedOption$Deserializer; + public synthetic fun (Ljava/util/List;Ljava/lang/String;Lkotlin/ULong;Ljava/lang/Long;Ljava/lang/Double;Lprotokt/v1/Bytes;Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/UninterpretedOption; + public fun equals (Ljava/lang/Object;)Z + public final fun getAggregateValue ()Ljava/lang/String; + public final fun getDoubleValue ()Ljava/lang/Double; + public final fun getIdentifierValue ()Ljava/lang/String; + public fun getMessageSize ()I + public final fun getName ()Ljava/util/List; + public final fun getNegativeIntValue ()Ljava/lang/Long; + public final fun getPositiveIntValue-6VbMDqA ()Lkotlin/ULong; + public final fun getStringValue ()Lprotokt/v1/Bytes; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/UninterpretedOption$Deserializer : protokt/v1/AbstractKtDeserializer { + public final fun NamePart (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/UninterpretedOption$NamePart; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/UninterpretedOption; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/UninterpretedOption; +} + +public final class protokt/v1/google/protobuf/UninterpretedOption$NamePart : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/UninterpretedOption$NamePart$Deserializer; + public synthetic fun (Ljava/lang/String;ZLprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/UninterpretedOption$NamePart; + public fun equals (Ljava/lang/Object;)Z + public fun getMessageSize ()I + public final fun getNamePart ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public final fun isExtension ()Z + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/UninterpretedOption$NamePart$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/UninterpretedOption$NamePart; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/UninterpretedOption$NamePart; +} + +public final class protokt/v1/google/protobuf/UninterpretedOption$NamePart$NamePartDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/UninterpretedOption$NamePart; + public final fun getNamePart ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun isExtension ()Z + public final fun setExtension (Z)V + public final fun setNamePart (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/UninterpretedOption$UninterpretedOptionDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/UninterpretedOption; + public final fun getAggregateValue ()Ljava/lang/String; + public final fun getDoubleValue ()Ljava/lang/Double; + public final fun getIdentifierValue ()Ljava/lang/String; + public final fun getName ()Ljava/util/List; + public final fun getNegativeIntValue ()Ljava/lang/Long; + public final fun getPositiveIntValue-6VbMDqA ()Lkotlin/ULong; + public final fun getStringValue ()Lprotokt/v1/Bytes; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setAggregateValue (Ljava/lang/String;)V + public final fun setDoubleValue (Ljava/lang/Double;)V + public final fun setIdentifierValue (Ljava/lang/String;)V + public final fun setName (Ljava/util/List;)V + public final fun setNegativeIntValue (Ljava/lang/Long;)V + public final fun setPositiveIntValue-ADd3fzo (Lkotlin/ULong;)V + public final fun setStringValue (Lprotokt/v1/Bytes;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/Value : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/Value$Deserializer; + public synthetic fun (Lprotokt/v1/google/protobuf/Value$Kind;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Value; + public fun equals (Ljava/lang/Object;)Z + public final fun getKind ()Lprotokt/v1/google/protobuf/Value$Kind; + public fun getMessageSize ()I + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Value$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/Value; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Value; +} + +public abstract class protokt/v1/google/protobuf/Value$Kind { +} + +public final class protokt/v1/google/protobuf/Value$Kind$BoolValue : protokt/v1/google/protobuf/Value$Kind { + public fun (Z)V + public final fun component1 ()Z + public final fun copy (Z)Lprotokt/v1/google/protobuf/Value$Kind$BoolValue; + public static synthetic fun copy$default (Lprotokt/v1/google/protobuf/Value$Kind$BoolValue;ZILjava/lang/Object;)Lprotokt/v1/google/protobuf/Value$Kind$BoolValue; + public fun equals (Ljava/lang/Object;)Z + public final fun getBoolValue ()Z + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Value$Kind$ListValue : protokt/v1/google/protobuf/Value$Kind { + public fun (Lprotokt/v1/google/protobuf/ListValue;)V + public final fun component1 ()Lprotokt/v1/google/protobuf/ListValue; + public final fun copy (Lprotokt/v1/google/protobuf/ListValue;)Lprotokt/v1/google/protobuf/Value$Kind$ListValue; + public static synthetic fun copy$default (Lprotokt/v1/google/protobuf/Value$Kind$ListValue;Lprotokt/v1/google/protobuf/ListValue;ILjava/lang/Object;)Lprotokt/v1/google/protobuf/Value$Kind$ListValue; + public fun equals (Ljava/lang/Object;)Z + public final fun getListValue ()Lprotokt/v1/google/protobuf/ListValue; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Value$Kind$NullValue : protokt/v1/google/protobuf/Value$Kind { + public fun (Lprotokt/v1/google/protobuf/NullValue;)V + public final fun component1 ()Lprotokt/v1/google/protobuf/NullValue; + public final fun copy (Lprotokt/v1/google/protobuf/NullValue;)Lprotokt/v1/google/protobuf/Value$Kind$NullValue; + public static synthetic fun copy$default (Lprotokt/v1/google/protobuf/Value$Kind$NullValue;Lprotokt/v1/google/protobuf/NullValue;ILjava/lang/Object;)Lprotokt/v1/google/protobuf/Value$Kind$NullValue; + public fun equals (Ljava/lang/Object;)Z + public final fun getNullValue ()Lprotokt/v1/google/protobuf/NullValue; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Value$Kind$NumberValue : protokt/v1/google/protobuf/Value$Kind { + public fun (D)V + public final fun component1 ()D + public final fun copy (D)Lprotokt/v1/google/protobuf/Value$Kind$NumberValue; + public static synthetic fun copy$default (Lprotokt/v1/google/protobuf/Value$Kind$NumberValue;DILjava/lang/Object;)Lprotokt/v1/google/protobuf/Value$Kind$NumberValue; + public fun equals (Ljava/lang/Object;)Z + public final fun getNumberValue ()D + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Value$Kind$StringValue : protokt/v1/google/protobuf/Value$Kind { + public fun (Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;)Lprotokt/v1/google/protobuf/Value$Kind$StringValue; + public static synthetic fun copy$default (Lprotokt/v1/google/protobuf/Value$Kind$StringValue;Ljava/lang/String;ILjava/lang/Object;)Lprotokt/v1/google/protobuf/Value$Kind$StringValue; + public fun equals (Ljava/lang/Object;)Z + public final fun getStringValue ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Value$Kind$StructValue : protokt/v1/google/protobuf/Value$Kind { + public fun (Lprotokt/v1/google/protobuf/Struct;)V + public final fun component1 ()Lprotokt/v1/google/protobuf/Struct; + public final fun copy (Lprotokt/v1/google/protobuf/Struct;)Lprotokt/v1/google/protobuf/Value$Kind$StructValue; + public static synthetic fun copy$default (Lprotokt/v1/google/protobuf/Value$Kind$StructValue;Lprotokt/v1/google/protobuf/Struct;ILjava/lang/Object;)Lprotokt/v1/google/protobuf/Value$Kind$StructValue; + public fun equals (Ljava/lang/Object;)Z + public final fun getStructValue ()Lprotokt/v1/google/protobuf/Struct; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/Value$ValueDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/Value; + public final fun getKind ()Lprotokt/v1/google/protobuf/Value$Kind; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setKind (Lprotokt/v1/google/protobuf/Value$Kind;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/WrappersKt { + public static final fun BoolValue (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/BoolValue; + public static final fun BytesValue (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/BytesValue; + public static final fun DoubleValue (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/DoubleValue; + public static final fun FloatValue (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/FloatValue; + public static final fun Int32Value (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Int32Value; + public static final fun Int64Value (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/Int64Value; + public static final fun StringValue (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/StringValue; + public static final fun UInt32Value (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/UInt32Value; + public static final fun UInt64Value (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/UInt64Value; +} + +public final class protokt/v1/google/protobuf/compiler/CodeGeneratorRequest : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/compiler/CodeGeneratorRequest$Deserializer; + public synthetic fun (Ljava/util/List;Ljava/lang/String;Lprotokt/v1/google/protobuf/compiler/Version;Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/compiler/CodeGeneratorRequest; + public fun equals (Ljava/lang/Object;)Z + public final fun getCompilerVersion ()Lprotokt/v1/google/protobuf/compiler/Version; + public final fun getFileToGenerate ()Ljava/util/List; + public fun getMessageSize ()I + public final fun getParameter ()Ljava/lang/String; + public final fun getProtoFile ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/compiler/CodeGeneratorRequest$CodeGeneratorRequestDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/compiler/CodeGeneratorRequest; + public final fun getCompilerVersion ()Lprotokt/v1/google/protobuf/compiler/Version; + public final fun getFileToGenerate ()Ljava/util/List; + public final fun getParameter ()Ljava/lang/String; + public final fun getProtoFile ()Ljava/util/List; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setCompilerVersion (Lprotokt/v1/google/protobuf/compiler/Version;)V + public final fun setFileToGenerate (Ljava/util/List;)V + public final fun setParameter (Ljava/lang/String;)V + public final fun setProtoFile (Ljava/util/List;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/compiler/CodeGeneratorRequest$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/compiler/CodeGeneratorRequest; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/compiler/CodeGeneratorRequest; +} + +public final class protokt/v1/google/protobuf/compiler/CodeGeneratorResponse : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse$Deserializer; + public synthetic fun (Ljava/lang/String;Lkotlin/ULong;Ljava/util/List;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getError ()Ljava/lang/String; + public final fun getFile ()Ljava/util/List; + public fun getMessageSize ()I + public final fun getSupportedFeatures-6VbMDqA ()Lkotlin/ULong; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/compiler/CodeGeneratorResponse$CodeGeneratorResponseDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse; + public final fun getError ()Ljava/lang/String; + public final fun getFile ()Ljava/util/List; + public final fun getSupportedFeatures-6VbMDqA ()Lkotlin/ULong; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setError (Ljava/lang/String;)V + public final fun setFile (Ljava/util/List;)V + public final fun setSupportedFeatures-ADd3fzo (Lkotlin/ULong;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/compiler/CodeGeneratorResponse$Deserializer : protokt/v1/AbstractKtDeserializer { + public final fun File (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse$File; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse; +} + +public abstract class protokt/v1/google/protobuf/compiler/CodeGeneratorResponse$Feature : protokt/v1/KtEnum { + public static final field Deserializer Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse$Feature$Deserializer; + public synthetic fun (ILjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun getName ()Ljava/lang/String; + public fun getValue ()I +} + +public final class protokt/v1/google/protobuf/compiler/CodeGeneratorResponse$Feature$Deserializer : protokt/v1/KtEnumDeserializer { + public synthetic fun from (I)Lprotokt/v1/KtEnum; + public fun from (I)Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse$Feature; +} + +public final class protokt/v1/google/protobuf/compiler/CodeGeneratorResponse$Feature$NONE : protokt/v1/google/protobuf/compiler/CodeGeneratorResponse$Feature { + public static final field INSTANCE Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse$Feature$NONE; +} + +public final class protokt/v1/google/protobuf/compiler/CodeGeneratorResponse$Feature$PROTO3_OPTIONAL : protokt/v1/google/protobuf/compiler/CodeGeneratorResponse$Feature { + public static final field INSTANCE Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse$Feature$PROTO3_OPTIONAL; +} + +public final class protokt/v1/google/protobuf/compiler/CodeGeneratorResponse$Feature$UNRECOGNIZED : protokt/v1/google/protobuf/compiler/CodeGeneratorResponse$Feature { + public fun (I)V +} + +public final class protokt/v1/google/protobuf/compiler/CodeGeneratorResponse$File : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse$File$Deserializer; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lprotokt/v1/google/protobuf/GeneratedCodeInfo;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse$File; + public fun equals (Ljava/lang/Object;)Z + public final fun getContent ()Ljava/lang/String; + public final fun getGeneratedCodeInfo ()Lprotokt/v1/google/protobuf/GeneratedCodeInfo; + public final fun getInsertionPoint ()Ljava/lang/String; + public fun getMessageSize ()I + public final fun getName ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/compiler/CodeGeneratorResponse$File$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse$File; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse$File; +} + +public final class protokt/v1/google/protobuf/compiler/CodeGeneratorResponse$File$FileDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse$File; + public final fun getContent ()Ljava/lang/String; + public final fun getGeneratedCodeInfo ()Lprotokt/v1/google/protobuf/GeneratedCodeInfo; + public final fun getInsertionPoint ()Ljava/lang/String; + public final fun getName ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setContent (Ljava/lang/String;)V + public final fun setGeneratedCodeInfo (Lprotokt/v1/google/protobuf/GeneratedCodeInfo;)V + public final fun setInsertionPoint (Ljava/lang/String;)V + public final fun setName (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + +public final class protokt/v1/google/protobuf/compiler/PluginKt { + public static final fun CodeGeneratorRequest (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/compiler/CodeGeneratorRequest; + public static final fun CodeGeneratorResponse (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/compiler/CodeGeneratorResponse; + public static final fun Version (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/compiler/Version; +} + +public final class protokt/v1/google/protobuf/compiler/Version : protokt/v1/AbstractKtMessage { + public static final field Deserializer Lprotokt/v1/google/protobuf/compiler/Version$Deserializer; + public synthetic fun (Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/String;Lprotokt/v1/UnknownFieldSet;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun copy (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/compiler/Version; + public fun equals (Ljava/lang/Object;)Z + public final fun getMajor ()Ljava/lang/Integer; + public fun getMessageSize ()I + public final fun getMinor ()Ljava/lang/Integer; + public final fun getPatch ()Ljava/lang/Integer; + public final fun getSuffix ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public fun hashCode ()I + public fun serialize (Lprotokt/v1/KtMessageSerializer;)V + public fun toString ()Ljava/lang/String; +} + +public final class protokt/v1/google/protobuf/compiler/Version$Deserializer : protokt/v1/AbstractKtDeserializer { + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lcom/toasttab/protokt/rt/KtMessage; + public synthetic fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/KtMessage; + public fun deserialize (Lprotokt/v1/KtMessageDeserializer;)Lprotokt/v1/google/protobuf/compiler/Version; + public final synthetic fun invoke (Lkotlin/jvm/functions/Function1;)Lprotokt/v1/google/protobuf/compiler/Version; +} + +public final class protokt/v1/google/protobuf/compiler/Version$VersionDsl { + public fun ()V + public final fun build ()Lprotokt/v1/google/protobuf/compiler/Version; + public final fun getMajor ()Ljava/lang/Integer; + public final fun getMinor ()Ljava/lang/Integer; + public final fun getPatch ()Ljava/lang/Integer; + public final fun getSuffix ()Ljava/lang/String; + public final fun getUnknownFields ()Lprotokt/v1/UnknownFieldSet; + public final fun setMajor (Ljava/lang/Integer;)V + public final fun setMinor (Ljava/lang/Integer;)V + public final fun setPatch (Ljava/lang/Integer;)V + public final fun setSuffix (Ljava/lang/String;)V + public final fun setUnknownFields (Lprotokt/v1/UnknownFieldSet;)V +} + diff --git a/protokt-core-lite/build.gradle.kts b/protokt-core-lite/build.gradle.kts index 5eef4397e..4146f40fd 100644 --- a/protokt-core-lite/build.gradle.kts +++ b/protokt-core-lite/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Toast Inc. + * Copyright (c) 2021 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,31 +14,62 @@ */ import com.google.protobuf.gradle.protobuf -import com.toasttab.protokt.gradle.protokt +import protokt.v1.gradle.protokt plugins { - id("protokt.jvm-conventions") + id("protokt.multiplatform-conventions") kotlin("kapt") } localProtokt() -pureKotlin() enablePublishing() compatibleWithAndroid() trackKotlinApiCompatibility() +spotless { + kotlin { + targetExclude( + "src/jvmMain/kotlin/com/toasttab/protokt/compiler/plugin.kt", + "src/jvmMain/kotlin/com/toasttab/protokt/any.kt", + "src/jvmMain/kotlin/com/toasttab/protokt/api.kt", + "src/jvmMain/kotlin/com/toasttab/protokt/descriptor.kt", + "src/jvmMain/kotlin/com/toasttab/protokt/duration.kt", + "src/jvmMain/kotlin/com/toasttab/protokt/empty.kt", + "src/jvmMain/kotlin/com/toasttab/protokt/field_mask.kt", + "src/jvmMain/kotlin/com/toasttab/protokt/source_context.kt", + "src/jvmMain/kotlin/com/toasttab/protokt/struct.kt", + "src/jvmMain/kotlin/com/toasttab/protokt/timestamp.kt", + "src/jvmMain/kotlin/com/toasttab/protokt/type.kt", + "src/jvmMain/kotlin/com/toasttab/protokt/wrappers.kt" + ) + } +} + protokt { - lite = true + generate { + lite() + } } -dependencies { - api(project(":extensions:protokt-extensions-api")) - api(project(":protokt-runtime")) +kotlin { + sourceSets { + val commonMain by getting { + dependencies { + api(project(":extensions:protokt-extensions-api")) + api(project(":protokt-runtime")) + } + } - protobuf(libraries.protobufJava) - compileOnly(libraries.protobufJava) + val jvmMain by getting {} - implementation(libraries.autoServiceAnnotations) + val jvmTest by getting { + dependencies { + runtimeOnly(libs.protobuf.java) + } + } + } +} - kapt(libraries.autoService) +dependencies { + protobuf(libs.protobuf.java) } diff --git a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/BoolValueConverter.kt b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/BoolValueConverter.kt similarity index 82% rename from protokt-core-lite/src/main/kotlin/com/toasttab/protokt/BoolValueConverter.kt rename to protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/BoolValueConverter.kt index d370db84b..aa1a82906 100644 --- a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/BoolValueConverter.kt +++ b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/BoolValueConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,12 +13,10 @@ * limitations under the License. */ -package com.toasttab.protokt +package protokt.v1.google.protobuf -import com.google.auto.service.AutoService -import com.toasttab.protokt.ext.Converter +import protokt.v1.Converter -@AutoService(Converter::class) object BoolValueConverter : Converter { override val wrapper = Boolean::class diff --git a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/BytesValueConverter.kt b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/BytesValueConverter.kt similarity index 80% rename from protokt-core-lite/src/main/kotlin/com/toasttab/protokt/BytesValueConverter.kt rename to protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/BytesValueConverter.kt index 3546d889b..a8bbc8149 100644 --- a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/BytesValueConverter.kt +++ b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/BytesValueConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,13 +13,11 @@ * limitations under the License. */ -package com.toasttab.protokt +package protokt.v1.google.protobuf -import com.google.auto.service.AutoService -import com.toasttab.protokt.ext.Converter -import com.toasttab.protokt.rt.Bytes +import protokt.v1.Bytes +import protokt.v1.Converter -@AutoService(Converter::class) object BytesValueConverter : Converter { override val wrapper = Bytes::class diff --git a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/DoubleValueConverter.kt b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/DoubleValueConverter.kt similarity index 83% rename from protokt-core-lite/src/main/kotlin/com/toasttab/protokt/DoubleValueConverter.kt rename to protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/DoubleValueConverter.kt index 2d19bf615..a3badb2f3 100644 --- a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/DoubleValueConverter.kt +++ b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/DoubleValueConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,12 +13,10 @@ * limitations under the License. */ -package com.toasttab.protokt +package protokt.v1.google.protobuf -import com.google.auto.service.AutoService -import com.toasttab.protokt.ext.Converter +import protokt.v1.Converter -@AutoService(Converter::class) object DoubleValueConverter : Converter { override val wrapper = Double::class diff --git a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/FloatValueConverter.kt b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/FloatValueConverter.kt similarity index 82% rename from protokt-core-lite/src/main/kotlin/com/toasttab/protokt/FloatValueConverter.kt rename to protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/FloatValueConverter.kt index c1adf069b..43cae6289 100644 --- a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/FloatValueConverter.kt +++ b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/FloatValueConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,12 +13,10 @@ * limitations under the License. */ -package com.toasttab.protokt +package protokt.v1.google.protobuf -import com.google.auto.service.AutoService -import com.toasttab.protokt.ext.Converter +import protokt.v1.Converter -@AutoService(Converter::class) object FloatValueConverter : Converter { override val wrapper = Float::class diff --git a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/Int32ValueConverter.kt b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/Int32ValueConverter.kt similarity index 82% rename from protokt-core-lite/src/main/kotlin/com/toasttab/protokt/Int32ValueConverter.kt rename to protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/Int32ValueConverter.kt index 82eaeed7a..428e74f45 100644 --- a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/Int32ValueConverter.kt +++ b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/Int32ValueConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,12 +13,10 @@ * limitations under the License. */ -package com.toasttab.protokt +package protokt.v1.google.protobuf -import com.google.auto.service.AutoService -import com.toasttab.protokt.ext.Converter +import protokt.v1.Converter -@AutoService(Converter::class) object Int32ValueConverter : Converter { override val wrapper = Int::class diff --git a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/Int64ValueConverter.kt b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/Int64ValueConverter.kt similarity index 82% rename from protokt-core-lite/src/main/kotlin/com/toasttab/protokt/Int64ValueConverter.kt rename to protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/Int64ValueConverter.kt index e96f2738f..1f588fa51 100644 --- a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/Int64ValueConverter.kt +++ b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/Int64ValueConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,12 +13,10 @@ * limitations under the License. */ -package com.toasttab.protokt +package protokt.v1.google.protobuf -import com.google.auto.service.AutoService -import com.toasttab.protokt.ext.Converter +import protokt.v1.Converter -@AutoService(Converter::class) object Int64ValueConverter : Converter { override val wrapper = Long::class diff --git a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/StringValueConverter.kt b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/StringValueConverter.kt similarity index 83% rename from protokt-core-lite/src/main/kotlin/com/toasttab/protokt/StringValueConverter.kt rename to protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/StringValueConverter.kt index 3b1d05b5a..bdcd6d457 100644 --- a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/StringValueConverter.kt +++ b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/StringValueConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,12 +13,10 @@ * limitations under the License. */ -package com.toasttab.protokt +package protokt.v1.google.protobuf -import com.google.auto.service.AutoService -import com.toasttab.protokt.ext.Converter +import protokt.v1.Converter -@AutoService(Converter::class) object StringValueConverter : Converter { override val wrapper = String::class diff --git a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/UInt32ValueConverter.kt b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/UInt32ValueConverter.kt similarity index 69% rename from protokt-core-lite/src/main/kotlin/com/toasttab/protokt/UInt32ValueConverter.kt rename to protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/UInt32ValueConverter.kt index 4046e9681..cc5d61afc 100644 --- a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/UInt32ValueConverter.kt +++ b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/UInt32ValueConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,20 +13,18 @@ * limitations under the License. */ -package com.toasttab.protokt +package protokt.v1.google.protobuf -import com.google.auto.service.AutoService -import com.toasttab.protokt.ext.Converter +import protokt.v1.Converter -@AutoService(Converter::class) -object UInt32ValueConverter : Converter { - override val wrapper = Int::class +object UInt32ValueConverter : Converter { + override val wrapper = UInt::class override val wrapped = UInt32Value::class override fun wrap(unwrapped: UInt32Value) = unwrapped.value - override fun unwrap(wrapped: Int) = + override fun unwrap(wrapped: UInt) = UInt32Value { value = wrapped } } diff --git a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/UInt64ValueConverter.kt b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/UInt64ValueConverter.kt similarity index 69% rename from protokt-core-lite/src/main/kotlin/com/toasttab/protokt/UInt64ValueConverter.kt rename to protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/UInt64ValueConverter.kt index 9f02a3745..18d32858c 100644 --- a/protokt-core-lite/src/main/kotlin/com/toasttab/protokt/UInt64ValueConverter.kt +++ b/protokt-core-lite/src/commonMain/kotlin/protokt.v1/google.protobuf/UInt64ValueConverter.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Toast Inc. + * Copyright (c) 2020 Toast, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,20 +13,18 @@ * limitations under the License. */ -package com.toasttab.protokt +package protokt.v1.google.protobuf -import com.google.auto.service.AutoService -import com.toasttab.protokt.ext.Converter +import protokt.v1.Converter -@AutoService(Converter::class) -object UInt64ValueConverter : Converter { - override val wrapper = Long::class +object UInt64ValueConverter : Converter { + override val wrapper = ULong::class override val wrapped = UInt64Value::class override fun wrap(unwrapped: UInt64Value) = unwrapped.value - override fun unwrap(wrapped: Long) = + override fun unwrap(wrapped: ULong) = UInt64Value { value = wrapped } } diff --git a/protokt-core-lite/src/commonMain/resources/META-INF/services/com.toasttab.protokt.ext.Converter b/protokt-core-lite/src/commonMain/resources/META-INF/services/com.toasttab.protokt.ext.Converter new file mode 100644 index 000000000..51c44e69c --- /dev/null +++ b/protokt-core-lite/src/commonMain/resources/META-INF/services/com.toasttab.protokt.ext.Converter @@ -0,0 +1,9 @@ +protokt.v1.google.protobuf.BoolValueConverter +protokt.v1.google.protobuf.BytesValueConverter +protokt.v1.google.protobuf.DoubleValueConverter +protokt.v1.google.protobuf.FloatValueConverter +protokt.v1.google.protobuf.Int32ValueConverter +protokt.v1.google.protobuf.Int64ValueConverter +protokt.v1.google.protobuf.StringValueConverter +protokt.v1.google.protobuf.UInt32ValueConverter +protokt.v1.google.protobuf.UInt64ValueConverter diff --git a/protokt-core-lite/src/commonMain/resources/META-INF/services/protokt.v1.Converter b/protokt-core-lite/src/commonMain/resources/META-INF/services/protokt.v1.Converter new file mode 100644 index 000000000..51c44e69c --- /dev/null +++ b/protokt-core-lite/src/commonMain/resources/META-INF/services/protokt.v1.Converter @@ -0,0 +1,9 @@ +protokt.v1.google.protobuf.BoolValueConverter +protokt.v1.google.protobuf.BytesValueConverter +protokt.v1.google.protobuf.DoubleValueConverter +protokt.v1.google.protobuf.FloatValueConverter +protokt.v1.google.protobuf.Int32ValueConverter +protokt.v1.google.protobuf.Int64ValueConverter +protokt.v1.google.protobuf.StringValueConverter +protokt.v1.google.protobuf.UInt32ValueConverter +protokt.v1.google.protobuf.UInt64ValueConverter diff --git a/protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/any.kt b/protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/any.kt new file mode 100644 index 000000000..0cc33e1e7 --- /dev/null +++ b/protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/any.kt @@ -0,0 +1,202 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@file:Suppress("DEPRECATION") + +// Generated by protokt version 0.10.2. Do not modify. +// Source: google/protobuf/any.proto +package com.toasttab.protokt + +import com.toasttab.protokt.rt.Bytes +import com.toasttab.protokt.rt.KtDeserializer +import com.toasttab.protokt.rt.KtGeneratedMessage +import com.toasttab.protokt.rt.KtMessageDeserializer +import com.toasttab.protokt.rt.Tag +import com.toasttab.protokt.rt.UnknownFieldSet +import com.toasttab.protokt.rt.sizeof +import protokt.v1.AbstractKtMessage +import protokt.v1.NewToOldAdapter +import kotlin.Boolean +import kotlin.Int +import kotlin.String +import kotlin.Unit + +/** + * `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes + * the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form of utility functions or + * additional generated methods of the Any type. + * + * Example 1: Pack and unpack a message in C++. + * + * Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { + * ... } + * + * Example 2: Pack and unpack a message in Java. + * + * Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = + * any.unpack(Foo.class); } + * + * Example 3: Pack and unpack a message in Python. + * + * foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) ... + * + * Example 4: Pack and unpack a message in Go + * + * foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } + * ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } + * + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully + * qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield + * type name "y.z". + * + * + * + * JSON + * + * The JSON representation of an `Any` value uses the regular representation of the deserialized, + * embedded message, with an additional field `@type` which contains the type URL. Example: + * + * package google.profile; message Person { string first_name = 1; string + * last_name = 2; } + * + * { "@type": "type.googleapis.com/google.profile.Person", "firstName": , + * "lastName": } + * + * If the embedded message type is well-known and has a custom JSON representation, that + * representation will be embedded adding a field `value` which holds the custom JSON in addition to + * the `@type` field. Example (for message [google.protobuf.Duration][]): + * + * { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" + * } + */ +@KtGeneratedMessage("google.protobuf.Any") +@protokt.v1.KtGeneratedMessage("google.protobuf.Any") +@Deprecated("use v1") +class Any private constructor( + /** + * A URL/resource name that uniquely identifies the type of the serialized protocol buffer + * message. This string must contain at least one "/" character. The last segment of the URL's path + * must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The + * name should be in a canonical form (e.g., leading "." is not accepted). + * + * In practice, teams usually precompile into the binary all types that they expect it to use + * in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one + * can optionally set up a type server that maps type URLs to message definitions as follows: + * + * * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a + * [google.protobuf.Type][] value in binary format, or produce an error. * Applications are + * allowed to cache lookup results based on the URL, or have them precompiled into a binary to + * avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. + * (Use versioned type names to manage breaking changes.) + * + * Note: this functionality is not currently available in the official protobuf release, and it + * is not used for type URLs beginning with type.googleapis.com. + * + * Schemes other than `http`, `https` (or the empty scheme) might be used with implementation + * specific semantics. + */ + val typeUrl: String, + /** + * Must be a valid serialized protocol buffer of the above specified type. + */ + val `value`: Bytes, + val unknownFields: UnknownFieldSet = UnknownFieldSet.empty(), +) : AbstractKtMessage() { + override val messageSize: Int by lazy { messageSize() } + + private fun messageSize(): Int { + var result = 0 + if (typeUrl.isNotEmpty()) { + result += sizeof(Tag(1)) + sizeof(typeUrl) + } + if (value.isNotEmpty()) { + result += sizeof(Tag(2)) + sizeof(value) + } + result += unknownFields.size() + return result + } + + override fun serialize(serializer: protokt.v1.KtMessageSerializer) { + val adapter = NewToOldAdapter(serializer) + if (typeUrl.isNotEmpty()) { + adapter.write(Tag(10)).write(typeUrl) + } + if (value.isNotEmpty()) { + adapter.write(Tag(18)).write(value) + } + adapter.writeUnknown(unknownFields) + } + + override fun equals(other: kotlin.Any?): Boolean = other is Any && + other.typeUrl == typeUrl && + other.value == value && + other.unknownFields == unknownFields + + override fun hashCode(): Int { + var result = unknownFields.hashCode() + result = 31 * result + typeUrl.hashCode() + result = 31 * result + value.hashCode() + return result + } + + override fun toString(): String = "Any(" + + "typeUrl=$typeUrl, " + + "value=$value" + + "${if (unknownFields.isEmpty()) "" else ", unknownFields=$unknownFields"})" + + fun copy(dsl: AnyDsl.() -> Unit): Any = Any.Deserializer { + typeUrl = this@Any.typeUrl + value = this@Any.value + unknownFields = this@Any.unknownFields + dsl() + } + + class AnyDsl { + var typeUrl: String = "" + + var `value`: Bytes = Bytes.empty() + + var unknownFields: UnknownFieldSet = UnknownFieldSet.empty() + + fun build(): Any = Any(typeUrl, + value, + unknownFields) + } + + companion object Deserializer : KtDeserializer, (AnyDsl.() -> Unit) -> Any { + override fun deserialize(deserializer: KtMessageDeserializer): Any { + var typeUrl = "" + var value = Bytes.empty() + var unknownFields: UnknownFieldSet.Builder? = null + while (true) { + when(deserializer.readTag()) { + 0 -> return Any(typeUrl, + value, + UnknownFieldSet.from(unknownFields)) + 10 -> typeUrl = deserializer.readString() + 18 -> value = deserializer.readBytes() + else -> unknownFields = (unknownFields ?: + UnknownFieldSet.Builder()).also {it.add(deserializer.readUnknown()) } + } + } + } + + override fun invoke(dsl: AnyDsl.() -> Unit): Any = AnyDsl().apply(dsl).build() + } +} diff --git a/protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/api.kt b/protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/api.kt new file mode 100644 index 000000000..7cf367d87 --- /dev/null +++ b/protokt-core-lite/src/jvmMain/kotlin/com/toasttab/protokt/api.kt @@ -0,0 +1,642 @@ +/* + * Copyright (c) 2023 Toast, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@file:Suppress("DEPRECATION") + +// Generated by protokt version 0.10.2. Do not modify. +// Source: google/protobuf/api.proto +package com.toasttab.protokt + +import com.toasttab.protokt.rt.KtDeserializer +import com.toasttab.protokt.rt.KtGeneratedMessage +import com.toasttab.protokt.rt.KtMessageDeserializer +import com.toasttab.protokt.rt.Tag +import com.toasttab.protokt.rt.UnknownFieldSet +import com.toasttab.protokt.rt.copyList +import com.toasttab.protokt.rt.finishList +import com.toasttab.protokt.rt.sizeof +import protokt.v1.AbstractKtMessage +import protokt.v1.NewToOldAdapter +import kotlin.Any +import kotlin.Boolean +import kotlin.Int +import kotlin.String +import kotlin.Unit +import kotlin.collections.List +import kotlin.collections.MutableList + +/** + * Api is a light-weight descriptor for an API Interface. + * + * Interfaces are also described as "protocol buffer services" in some contexts, such as by the + * "service" keyword in a .proto file, but they are different from API Services, which represent a + * concrete implementation of an interface as opposed to simply a description of methods and bindings. + * They are also sometimes simply referred to as "APIs" in other contexts, such as the name of this + * message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology. + */ +@KtGeneratedMessage("google.protobuf.Api") +@protokt.v1.KtGeneratedMessage("google.protobuf.Api") +@Deprecated("use v1") +class Api private constructor( + /** + * The fully qualified name of this interface, including package name followed by the + * interface's simple name. + */ + val name: String, + /** + * The methods of this interface, in unspecified order. + */ + val methods: List, + /** + * Any metadata attached to the interface. + */ + val options: List