Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public sealed class NullValue(public open val number: Int) {
/**
* Null value.
*/
public object NULL_VALUE: NullValue(number = 0)
public data object NULL_VALUE: NullValue(number = 0)

public data class UNRECOGNIZED(override val number: Int): NullValue(number)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,97 +95,97 @@ public interface Field {
/**
* Field type unknown.
*/
public object TYPE_UNKNOWN: Kind(number = 0)
public data object TYPE_UNKNOWN: Kind(number = 0)

/**
* Field type double.
*/
public object TYPE_DOUBLE: Kind(number = 1)
public data object TYPE_DOUBLE: Kind(number = 1)

/**
* Field type float.
*/
public object TYPE_FLOAT: Kind(number = 2)
public data object TYPE_FLOAT: Kind(number = 2)

/**
* Field type int64.
*/
public object TYPE_INT64: Kind(number = 3)
public data object TYPE_INT64: Kind(number = 3)

/**
* Field type uint64.
*/
public object TYPE_UINT64: Kind(number = 4)
public data object TYPE_UINT64: Kind(number = 4)

/**
* Field type int32.
*/
public object TYPE_INT32: Kind(number = 5)
public data object TYPE_INT32: Kind(number = 5)

/**
* Field type fixed64.
*/
public object TYPE_FIXED64: Kind(number = 6)
public data object TYPE_FIXED64: Kind(number = 6)

/**
* Field type fixed32.
*/
public object TYPE_FIXED32: Kind(number = 7)
public data object TYPE_FIXED32: Kind(number = 7)

/**
* Field type bool.
*/
public object TYPE_BOOL: Kind(number = 8)
public data object TYPE_BOOL: Kind(number = 8)

/**
* Field type string.
*/
public object TYPE_STRING: Kind(number = 9)
public data object TYPE_STRING: Kind(number = 9)

/**
* Field type group. Proto2 syntax only, and deprecated.
*/
public object TYPE_GROUP: Kind(number = 10)
public data object TYPE_GROUP: Kind(number = 10)

/**
* Field type message.
*/
public object TYPE_MESSAGE: Kind(number = 11)
public data object TYPE_MESSAGE: Kind(number = 11)

/**
* Field type bytes.
*/
public object TYPE_BYTES: Kind(number = 12)
public data object TYPE_BYTES: Kind(number = 12)

/**
* Field type uint32.
*/
public object TYPE_UINT32: Kind(number = 13)
public data object TYPE_UINT32: Kind(number = 13)

/**
* Field type enum.
*/
public object TYPE_ENUM: Kind(number = 14)
public data object TYPE_ENUM: Kind(number = 14)

/**
* Field type sfixed32.
*/
public object TYPE_SFIXED32: Kind(number = 15)
public data object TYPE_SFIXED32: Kind(number = 15)

/**
* Field type sfixed64.
*/
public object TYPE_SFIXED64: Kind(number = 16)
public data object TYPE_SFIXED64: Kind(number = 16)

/**
* Field type sint32.
*/
public object TYPE_SINT32: Kind(number = 17)
public data object TYPE_SINT32: Kind(number = 17)

/**
* Field type sint64.
*/
public object TYPE_SINT64: Kind(number = 18)
public data object TYPE_SINT64: Kind(number = 18)

public data class UNRECOGNIZED(override val number: Int): Kind(number)

Expand All @@ -201,22 +201,22 @@ public interface Field {
/**
* For fields with unknown cardinality.
*/
public object CARDINALITY_UNKNOWN: Cardinality(number = 0)
public data object CARDINALITY_UNKNOWN: Cardinality(number = 0)

/**
* For optional fields.
*/
public object CARDINALITY_OPTIONAL: Cardinality(number = 1)
public data object CARDINALITY_OPTIONAL: Cardinality(number = 1)

/**
* For required fields. Proto2 syntax only.
*/
public object CARDINALITY_REQUIRED: Cardinality(number = 2)
public data object CARDINALITY_REQUIRED: Cardinality(number = 2)

/**
* For repeated fields.
*/
public object CARDINALITY_REPEATED: Cardinality(number = 3)
public data object CARDINALITY_REPEATED: Cardinality(number = 3)

public data class UNRECOGNIZED(override val number: Int): Cardinality(number)

Expand Down Expand Up @@ -313,17 +313,17 @@ public sealed class Syntax(public open val number: Int) {
/**
* Syntax `proto2`.
*/
public object SYNTAX_PROTO2: Syntax(number = 0)
public data object SYNTAX_PROTO2: Syntax(number = 0)

/**
* Syntax `proto3`.
*/
public object SYNTAX_PROTO3: Syntax(number = 1)
public data object SYNTAX_PROTO3: Syntax(number = 1)

/**
* Syntax `editions`.
*/
public object SYNTAX_EDITIONS: Syntax(number = 2)
public data object SYNTAX_EDITIONS: Syntax(number = 2)

public data class UNRECOGNIZED(override val number: Int): Syntax(number)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,40 @@ public class AnyInternal: com.google.protobuf.kotlin.Any, kotlinx.rpc.protobuf.i
public override var typeUrl: String by MsgFieldDelegate { "" }
public override var value: ByteArray by MsgFieldDelegate { byteArrayOf() }

public override fun hashCode(): kotlin.Int {
checkRequiredFields()
var result = typeUrl.hashCode()
result = 31 * result + value.contentHashCode()
return result
}

public override fun equals(other: kotlin.Any?): kotlin.Boolean {
checkRequiredFields()
if (this === other) return true
if (other == null || this::class != other::class) return false
other as AnyInternal
other.checkRequiredFields()
if (typeUrl != other.typeUrl) return false
if (!value.contentEquals(other.value)) return false
return true
}

public override fun toString(): kotlin.String {
return asString()
}

public fun asString(indent: kotlin.Int = 0): kotlin.String {
checkRequiredFields()
val indentString = " ".repeat(indent)
val nextIndentString = " ".repeat(indent + 4)
return buildString {
appendLine("com.google.protobuf.kotlin.Any(")
appendLine("${nextIndentString}typeUrl=${typeUrl},")
appendLine("${nextIndentString}value=${value.contentToString()},")
append("${indentString})")
}
}

@kotlinx.rpc.internal.utils.InternalRpcApi
public object CODEC: kotlinx.rpc.grpc.codec.MessageCodec<com.google.protobuf.kotlin.Any> {
public override fun encode(value: com.google.protobuf.kotlin.Any): kotlinx.rpc.protobuf.input.stream.InputStream {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,61 @@ public class ApiInternal: com.google.protobuf.kotlin.Api, kotlinx.rpc.protobuf.i
public override var mixins: List<com.google.protobuf.kotlin.Mixin> by MsgFieldDelegate { mutableListOf() }
public override var syntax: com.google.protobuf.kotlin.Syntax by MsgFieldDelegate { com.google.protobuf.kotlin.Syntax.SYNTAX_PROTO2 }

public override fun hashCode(): kotlin.Int {
checkRequiredFields()
var result = name.hashCode()
result = 31 * result + methods.hashCode()
result = 31 * result + options.hashCode()
result = 31 * result + version.hashCode()
result = 31 * result + if (presenceMask[0]) sourceContext.hashCode() else 0
result = 31 * result + mixins.hashCode()
result = 31 * result + syntax.hashCode()
return result
}

public override fun equals(other: kotlin.Any?): kotlin.Boolean {
checkRequiredFields()
if (this === other) return true
if (other == null || this::class != other::class) return false
other as ApiInternal
other.checkRequiredFields()
if (presenceMask != other.presenceMask) return false
if (name != other.name) return false
if (methods != other.methods) return false
if (options != other.options) return false
if (version != other.version) return false
if (presenceMask[0] && sourceContext != other.sourceContext) return false
if (mixins != other.mixins) return false
if (syntax != other.syntax) return false
return true
}

public override fun toString(): kotlin.String {
return asString()
}

public fun asString(indent: kotlin.Int = 0): kotlin.String {
checkRequiredFields()
val indentString = " ".repeat(indent)
val nextIndentString = " ".repeat(indent + 4)
return buildString {
appendLine("com.google.protobuf.kotlin.Api(")
appendLine("${nextIndentString}name=${name},")
appendLine("${nextIndentString}methods=${methods},")
appendLine("${nextIndentString}options=${options},")
appendLine("${nextIndentString}version=${version},")
if (presenceMask[0]) {
appendLine("${nextIndentString}sourceContext=${sourceContext.asInternal().asString(indent = indent + 4)},")
} else {
appendLine("${nextIndentString}sourceContext=<unset>,")
}

appendLine("${nextIndentString}mixins=${mixins},")
appendLine("${nextIndentString}syntax=${syntax},")
append("${indentString})")
}
}

@kotlinx.rpc.internal.utils.InternalRpcApi
public object CODEC: kotlinx.rpc.grpc.codec.MessageCodec<com.google.protobuf.kotlin.Api> {
public override fun encode(value: com.google.protobuf.kotlin.Api): kotlinx.rpc.protobuf.input.stream.InputStream {
Expand Down Expand Up @@ -61,6 +116,55 @@ public class MethodInternal: com.google.protobuf.kotlin.Method, kotlinx.rpc.prot
public override var options: List<com.google.protobuf.kotlin.Option> by MsgFieldDelegate { mutableListOf() }
public override var syntax: com.google.protobuf.kotlin.Syntax by MsgFieldDelegate { com.google.protobuf.kotlin.Syntax.SYNTAX_PROTO2 }

public override fun hashCode(): kotlin.Int {
checkRequiredFields()
var result = name.hashCode()
result = 31 * result + requestTypeUrl.hashCode()
result = 31 * result + requestStreaming.hashCode()
result = 31 * result + responseTypeUrl.hashCode()
result = 31 * result + responseStreaming.hashCode()
result = 31 * result + options.hashCode()
result = 31 * result + syntax.hashCode()
return result
}

public override fun equals(other: kotlin.Any?): kotlin.Boolean {
checkRequiredFields()
if (this === other) return true
if (other == null || this::class != other::class) return false
other as MethodInternal
other.checkRequiredFields()
if (name != other.name) return false
if (requestTypeUrl != other.requestTypeUrl) return false
if (requestStreaming != other.requestStreaming) return false
if (responseTypeUrl != other.responseTypeUrl) return false
if (responseStreaming != other.responseStreaming) return false
if (options != other.options) return false
if (syntax != other.syntax) return false
return true
}

public override fun toString(): kotlin.String {
return asString()
}

public fun asString(indent: kotlin.Int = 0): kotlin.String {
checkRequiredFields()
val indentString = " ".repeat(indent)
val nextIndentString = " ".repeat(indent + 4)
return buildString {
appendLine("com.google.protobuf.kotlin.Method(")
appendLine("${nextIndentString}name=${name},")
appendLine("${nextIndentString}requestTypeUrl=${requestTypeUrl},")
appendLine("${nextIndentString}requestStreaming=${requestStreaming},")
appendLine("${nextIndentString}responseTypeUrl=${responseTypeUrl},")
appendLine("${nextIndentString}responseStreaming=${responseStreaming},")
appendLine("${nextIndentString}options=${options},")
appendLine("${nextIndentString}syntax=${syntax},")
append("${indentString})")
}
}

@kotlinx.rpc.internal.utils.InternalRpcApi
public object CODEC: kotlinx.rpc.grpc.codec.MessageCodec<com.google.protobuf.kotlin.Method> {
public override fun encode(value: com.google.protobuf.kotlin.Method): kotlinx.rpc.protobuf.input.stream.InputStream {
Expand Down Expand Up @@ -96,6 +200,40 @@ public class MixinInternal: com.google.protobuf.kotlin.Mixin, kotlinx.rpc.protob
public override var name: String by MsgFieldDelegate { "" }
public override var root: String by MsgFieldDelegate { "" }

public override fun hashCode(): kotlin.Int {
checkRequiredFields()
var result = name.hashCode()
result = 31 * result + root.hashCode()
return result
}

public override fun equals(other: kotlin.Any?): kotlin.Boolean {
checkRequiredFields()
if (this === other) return true
if (other == null || this::class != other::class) return false
other as MixinInternal
other.checkRequiredFields()
if (name != other.name) return false
if (root != other.root) return false
return true
}

public override fun toString(): kotlin.String {
return asString()
}

public fun asString(indent: kotlin.Int = 0): kotlin.String {
checkRequiredFields()
val indentString = " ".repeat(indent)
val nextIndentString = " ".repeat(indent + 4)
return buildString {
appendLine("com.google.protobuf.kotlin.Mixin(")
appendLine("${nextIndentString}name=${name},")
appendLine("${nextIndentString}root=${root},")
append("${indentString})")
}
}

@kotlinx.rpc.internal.utils.InternalRpcApi
public object CODEC: kotlinx.rpc.grpc.codec.MessageCodec<com.google.protobuf.kotlin.Mixin> {
public override fun encode(value: com.google.protobuf.kotlin.Mixin): kotlinx.rpc.protobuf.input.stream.InputStream {
Expand Down
Loading
Loading