KotlinTarget

data class KotlinTarget(val includes: List<String> = listOf("*"), val excludes: List<String> = listOf(), val exclusive: Boolean = true, val outDirectory: String, val android: Boolean = false, val javaInterop: Boolean = false, val emitDeclaredOptions: Boolean = true, val emitAppliedOptions: Boolean = true, val rpcCallStyle: RpcCallStyle = RpcCallStyle.SUSPENDING, val rpcRole: RpcRole = RpcRole.CLIENT, val singleMethodServices: Boolean = false, val boxOneOfsMinSize: Int, val nameSuffix: String? = null, val buildersOnly: Boolean = false, val escapeKotlinKeywords: Boolean = false, val generateUnrecognizedEnumConstant: Boolean = false) : Target

Generate .kt sources.

Constructors

Link copied to clipboard
constructor(includes: List<String> = listOf("*"), excludes: List<String> = listOf(), exclusive: Boolean = true, outDirectory: String, android: Boolean = false, javaInterop: Boolean = false, emitDeclaredOptions: Boolean = true, emitAppliedOptions: Boolean = true, rpcCallStyle: RpcCallStyle = RpcCallStyle.SUSPENDING, rpcRole: RpcRole = RpcRole.CLIENT, singleMethodServices: Boolean = false, boxOneOfsMinSize: Int, nameSuffix: String? = null, buildersOnly: Boolean = false, escapeKotlinKeywords: Boolean = false, generateUnrecognizedEnumConstant: Boolean = false)

Properties

Link copied to clipboard
val android: Boolean = false

True for emitted types to implement android.os.Parcelable.

Link copied to clipboard

If a oneof has more than or boxOneOfsMinSize fields, it will be generated using boxed oneofs as defined in OneOf.

Link copied to clipboard
val buildersOnly: Boolean = false

If true, the constructor of all generated types will be non-public, and they will be instantiable via their builders, regardless of the value of javaInterop.

Link copied to clipboard

True to emit annotations for options applied on messages, fields, etc.

Link copied to clipboard

True to emit types for options declared on messages, fields, etc.

Link copied to clipboard

If true, Kotlin keywords are escaped with backticks. If false, an underscore is added as a suffix.

Link copied to clipboard
open override val excludes: List<String>
Link copied to clipboard
open override val exclusive: Boolean = true
Link copied to clipboard

If true, generated enums will have an extra UNRECOGNIZED constant with a value of -1. This only applies to enum which syntax is proto3.

Link copied to clipboard
open override val includes: List<String>
Link copied to clipboard
val javaInterop: Boolean = false

True for emitted types to implement APIs for easier migration from the Java target.

Link copied to clipboard
val nameSuffix: String? = null

If present, generated services classes will use this as a suffix instead of inferring one from the rpcRole.

Link copied to clipboard
open override val outDirectory: String
Link copied to clipboard
val rpcCallStyle: RpcCallStyle

Blocking or suspending.

Link copied to clipboard
val rpcRole: RpcRole

Client or server.

Link copied to clipboard

True for emitted services to implement one interface per RPC.

Functions

Link copied to clipboard
open override fun copyTarget(includes: List<String>, excludes: List<String>, exclusive: Boolean, outDirectory: String): Target
Link copied to clipboard
open override fun newHandler(): SchemaHandler