Skip to content

Commit 76409fe

Browse files
committed
Update generated protos
1 parent ff72bee commit 76409fe

File tree

25 files changed

+11485
-239
lines changed

25 files changed

+11485
-239
lines changed

protobuf/protobuf-core/src/commonMain/generated-code/kotlin-multiplatform/com/google/protobuf/kotlin/Struct.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public sealed class NullValue(public open val number: Int) {
114114
/**
115115
* Null value.
116116
*/
117-
public object NULL_VALUE: NullValue(number = 0)
117+
public data object NULL_VALUE: NullValue(number = 0)
118118

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

protobuf/protobuf-core/src/commonMain/generated-code/kotlin-multiplatform/com/google/protobuf/kotlin/Type.kt

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -95,97 +95,97 @@ public interface Field {
9595
/**
9696
* Field type unknown.
9797
*/
98-
public object TYPE_UNKNOWN: Kind(number = 0)
98+
public data object TYPE_UNKNOWN: Kind(number = 0)
9999

100100
/**
101101
* Field type double.
102102
*/
103-
public object TYPE_DOUBLE: Kind(number = 1)
103+
public data object TYPE_DOUBLE: Kind(number = 1)
104104

105105
/**
106106
* Field type float.
107107
*/
108-
public object TYPE_FLOAT: Kind(number = 2)
108+
public data object TYPE_FLOAT: Kind(number = 2)
109109

110110
/**
111111
* Field type int64.
112112
*/
113-
public object TYPE_INT64: Kind(number = 3)
113+
public data object TYPE_INT64: Kind(number = 3)
114114

115115
/**
116116
* Field type uint64.
117117
*/
118-
public object TYPE_UINT64: Kind(number = 4)
118+
public data object TYPE_UINT64: Kind(number = 4)
119119

120120
/**
121121
* Field type int32.
122122
*/
123-
public object TYPE_INT32: Kind(number = 5)
123+
public data object TYPE_INT32: Kind(number = 5)
124124

125125
/**
126126
* Field type fixed64.
127127
*/
128-
public object TYPE_FIXED64: Kind(number = 6)
128+
public data object TYPE_FIXED64: Kind(number = 6)
129129

130130
/**
131131
* Field type fixed32.
132132
*/
133-
public object TYPE_FIXED32: Kind(number = 7)
133+
public data object TYPE_FIXED32: Kind(number = 7)
134134

135135
/**
136136
* Field type bool.
137137
*/
138-
public object TYPE_BOOL: Kind(number = 8)
138+
public data object TYPE_BOOL: Kind(number = 8)
139139

140140
/**
141141
* Field type string.
142142
*/
143-
public object TYPE_STRING: Kind(number = 9)
143+
public data object TYPE_STRING: Kind(number = 9)
144144

145145
/**
146146
* Field type group. Proto2 syntax only, and deprecated.
147147
*/
148-
public object TYPE_GROUP: Kind(number = 10)
148+
public data object TYPE_GROUP: Kind(number = 10)
149149

150150
/**
151151
* Field type message.
152152
*/
153-
public object TYPE_MESSAGE: Kind(number = 11)
153+
public data object TYPE_MESSAGE: Kind(number = 11)
154154

155155
/**
156156
* Field type bytes.
157157
*/
158-
public object TYPE_BYTES: Kind(number = 12)
158+
public data object TYPE_BYTES: Kind(number = 12)
159159

160160
/**
161161
* Field type uint32.
162162
*/
163-
public object TYPE_UINT32: Kind(number = 13)
163+
public data object TYPE_UINT32: Kind(number = 13)
164164

165165
/**
166166
* Field type enum.
167167
*/
168-
public object TYPE_ENUM: Kind(number = 14)
168+
public data object TYPE_ENUM: Kind(number = 14)
169169

170170
/**
171171
* Field type sfixed32.
172172
*/
173-
public object TYPE_SFIXED32: Kind(number = 15)
173+
public data object TYPE_SFIXED32: Kind(number = 15)
174174

175175
/**
176176
* Field type sfixed64.
177177
*/
178-
public object TYPE_SFIXED64: Kind(number = 16)
178+
public data object TYPE_SFIXED64: Kind(number = 16)
179179

180180
/**
181181
* Field type sint32.
182182
*/
183-
public object TYPE_SINT32: Kind(number = 17)
183+
public data object TYPE_SINT32: Kind(number = 17)
184184

185185
/**
186186
* Field type sint64.
187187
*/
188-
public object TYPE_SINT64: Kind(number = 18)
188+
public data object TYPE_SINT64: Kind(number = 18)
189189

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

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

206206
/**
207207
* For optional fields.
208208
*/
209-
public object CARDINALITY_OPTIONAL: Cardinality(number = 1)
209+
public data object CARDINALITY_OPTIONAL: Cardinality(number = 1)
210210

211211
/**
212212
* For required fields. Proto2 syntax only.
213213
*/
214-
public object CARDINALITY_REQUIRED: Cardinality(number = 2)
214+
public data object CARDINALITY_REQUIRED: Cardinality(number = 2)
215215

216216
/**
217217
* For repeated fields.
218218
*/
219-
public object CARDINALITY_REPEATED: Cardinality(number = 3)
219+
public data object CARDINALITY_REPEATED: Cardinality(number = 3)
220220

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

@@ -313,17 +313,17 @@ public sealed class Syntax(public open val number: Int) {
313313
/**
314314
* Syntax `proto2`.
315315
*/
316-
public object SYNTAX_PROTO2: Syntax(number = 0)
316+
public data object SYNTAX_PROTO2: Syntax(number = 0)
317317

318318
/**
319319
* Syntax `proto3`.
320320
*/
321-
public object SYNTAX_PROTO3: Syntax(number = 1)
321+
public data object SYNTAX_PROTO3: Syntax(number = 1)
322322

323323
/**
324324
* Syntax `editions`.
325325
*/
326-
public object SYNTAX_EDITIONS: Syntax(number = 2)
326+
public data object SYNTAX_EDITIONS: Syntax(number = 2)
327327

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

protobuf/protobuf-core/src/commonMain/generated-code/kotlin-multiplatform/com/google/protobuf/kotlin/_rpc_internal/Any.kt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,40 @@ public class AnyInternal: com.google.protobuf.kotlin.Any, kotlinx.rpc.protobuf.i
1212
public override var typeUrl: String by MsgFieldDelegate { "" }
1313
public override var value: ByteArray by MsgFieldDelegate { byteArrayOf() }
1414

15+
public override fun hashCode(): kotlin.Int {
16+
checkRequiredFields()
17+
var result = typeUrl.hashCode()
18+
result = 31 * result + value.contentHashCode()
19+
return result
20+
}
21+
22+
public override fun equals(other: kotlin.Any?): kotlin.Boolean {
23+
checkRequiredFields()
24+
if (this === other) return true
25+
if (other == null || this::class != other::class) return false
26+
other as AnyInternal
27+
other.checkRequiredFields()
28+
if (typeUrl != other.typeUrl) return false
29+
if (!value.contentEquals(other.value)) return false
30+
return true
31+
}
32+
33+
public override fun toString(): kotlin.String {
34+
return asString()
35+
}
36+
37+
public fun asString(indent: kotlin.Int = 0): kotlin.String {
38+
checkRequiredFields()
39+
val indentString = " ".repeat(indent)
40+
val nextIndentString = " ".repeat(indent + 4)
41+
return buildString {
42+
appendLine("com.google.protobuf.kotlin.Any(")
43+
appendLine("${nextIndentString}typeUrl=${typeUrl},")
44+
appendLine("${nextIndentString}value=${value.contentToString()},")
45+
append("${indentString})")
46+
}
47+
}
48+
1549
@kotlinx.rpc.internal.utils.InternalRpcApi
1650
public object CODEC: kotlinx.rpc.grpc.codec.MessageCodec<com.google.protobuf.kotlin.Any> {
1751
public override fun encode(value: com.google.protobuf.kotlin.Any): kotlinx.rpc.protobuf.input.stream.InputStream {

protobuf/protobuf-core/src/commonMain/generated-code/kotlin-multiplatform/com/google/protobuf/kotlin/_rpc_internal/Api.kt

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,60 @@ public class ApiInternal: com.google.protobuf.kotlin.Api, kotlinx.rpc.protobuf.i
2121
public override var mixins: List<com.google.protobuf.kotlin.Mixin> by MsgFieldDelegate { mutableListOf() }
2222
public override var syntax: com.google.protobuf.kotlin.Syntax by MsgFieldDelegate { com.google.protobuf.kotlin.Syntax.SYNTAX_PROTO2 }
2323

24+
public override fun hashCode(): kotlin.Int {
25+
checkRequiredFields()
26+
var result = name.hashCode()
27+
result = 31 * result + methods.hashCode()
28+
result = 31 * result + options.hashCode()
29+
result = 31 * result + version.hashCode()
30+
result = 31 * result + if (presenceMask[0]) sourceContext.hashCode() else 0
31+
result = 31 * result + mixins.hashCode()
32+
result = 31 * result + syntax.hashCode()
33+
return result
34+
}
35+
36+
public override fun equals(other: kotlin.Any?): kotlin.Boolean {
37+
checkRequiredFields()
38+
if (this === other) return true
39+
if (other == null || this::class != other::class) return false
40+
other as ApiInternal
41+
other.checkRequiredFields()
42+
if (name != other.name) return false
43+
if (methods != other.methods) return false
44+
if (options != other.options) return false
45+
if (version != other.version) return false
46+
if (presenceMask[0] != other.presenceMask[0] || presenceMask[0] && sourceContext != other.sourceContext) return false
47+
if (mixins != other.mixins) return false
48+
if (syntax != other.syntax) return false
49+
return true
50+
}
51+
52+
public override fun toString(): kotlin.String {
53+
return asString()
54+
}
55+
56+
public fun asString(indent: kotlin.Int = 0): kotlin.String {
57+
checkRequiredFields()
58+
val indentString = " ".repeat(indent)
59+
val nextIndentString = " ".repeat(indent + 4)
60+
return buildString {
61+
appendLine("com.google.protobuf.kotlin.Api(")
62+
appendLine("${nextIndentString}name=${name},")
63+
appendLine("${nextIndentString}methods=${methods},")
64+
appendLine("${nextIndentString}options=${options},")
65+
appendLine("${nextIndentString}version=${version},")
66+
if (presenceMask[0]) {
67+
appendLine("${nextIndentString}sourceContext=${sourceContext.asInternal().asString(indent = indent + 4)},")
68+
} else {
69+
appendLine("${nextIndentString}sourceContext=<unset>,")
70+
}
71+
72+
appendLine("${nextIndentString}mixins=${mixins},")
73+
appendLine("${nextIndentString}syntax=${syntax},")
74+
append("${indentString})")
75+
}
76+
}
77+
2478
@kotlinx.rpc.internal.utils.InternalRpcApi
2579
public object CODEC: kotlinx.rpc.grpc.codec.MessageCodec<com.google.protobuf.kotlin.Api> {
2680
public override fun encode(value: com.google.protobuf.kotlin.Api): kotlinx.rpc.protobuf.input.stream.InputStream {
@@ -61,6 +115,55 @@ public class MethodInternal: com.google.protobuf.kotlin.Method, kotlinx.rpc.prot
61115
public override var options: List<com.google.protobuf.kotlin.Option> by MsgFieldDelegate { mutableListOf() }
62116
public override var syntax: com.google.protobuf.kotlin.Syntax by MsgFieldDelegate { com.google.protobuf.kotlin.Syntax.SYNTAX_PROTO2 }
63117

118+
public override fun hashCode(): kotlin.Int {
119+
checkRequiredFields()
120+
var result = name.hashCode()
121+
result = 31 * result + requestTypeUrl.hashCode()
122+
result = 31 * result + requestStreaming.hashCode()
123+
result = 31 * result + responseTypeUrl.hashCode()
124+
result = 31 * result + responseStreaming.hashCode()
125+
result = 31 * result + options.hashCode()
126+
result = 31 * result + syntax.hashCode()
127+
return result
128+
}
129+
130+
public override fun equals(other: kotlin.Any?): kotlin.Boolean {
131+
checkRequiredFields()
132+
if (this === other) return true
133+
if (other == null || this::class != other::class) return false
134+
other as MethodInternal
135+
other.checkRequiredFields()
136+
if (name != other.name) return false
137+
if (requestTypeUrl != other.requestTypeUrl) return false
138+
if (requestStreaming != other.requestStreaming) return false
139+
if (responseTypeUrl != other.responseTypeUrl) return false
140+
if (responseStreaming != other.responseStreaming) return false
141+
if (options != other.options) return false
142+
if (syntax != other.syntax) return false
143+
return true
144+
}
145+
146+
public override fun toString(): kotlin.String {
147+
return asString()
148+
}
149+
150+
public fun asString(indent: kotlin.Int = 0): kotlin.String {
151+
checkRequiredFields()
152+
val indentString = " ".repeat(indent)
153+
val nextIndentString = " ".repeat(indent + 4)
154+
return buildString {
155+
appendLine("com.google.protobuf.kotlin.Method(")
156+
appendLine("${nextIndentString}name=${name},")
157+
appendLine("${nextIndentString}requestTypeUrl=${requestTypeUrl},")
158+
appendLine("${nextIndentString}requestStreaming=${requestStreaming},")
159+
appendLine("${nextIndentString}responseTypeUrl=${responseTypeUrl},")
160+
appendLine("${nextIndentString}responseStreaming=${responseStreaming},")
161+
appendLine("${nextIndentString}options=${options},")
162+
appendLine("${nextIndentString}syntax=${syntax},")
163+
append("${indentString})")
164+
}
165+
}
166+
64167
@kotlinx.rpc.internal.utils.InternalRpcApi
65168
public object CODEC: kotlinx.rpc.grpc.codec.MessageCodec<com.google.protobuf.kotlin.Method> {
66169
public override fun encode(value: com.google.protobuf.kotlin.Method): kotlinx.rpc.protobuf.input.stream.InputStream {
@@ -96,6 +199,40 @@ public class MixinInternal: com.google.protobuf.kotlin.Mixin, kotlinx.rpc.protob
96199
public override var name: String by MsgFieldDelegate { "" }
97200
public override var root: String by MsgFieldDelegate { "" }
98201

202+
public override fun hashCode(): kotlin.Int {
203+
checkRequiredFields()
204+
var result = name.hashCode()
205+
result = 31 * result + root.hashCode()
206+
return result
207+
}
208+
209+
public override fun equals(other: kotlin.Any?): kotlin.Boolean {
210+
checkRequiredFields()
211+
if (this === other) return true
212+
if (other == null || this::class != other::class) return false
213+
other as MixinInternal
214+
other.checkRequiredFields()
215+
if (name != other.name) return false
216+
if (root != other.root) return false
217+
return true
218+
}
219+
220+
public override fun toString(): kotlin.String {
221+
return asString()
222+
}
223+
224+
public fun asString(indent: kotlin.Int = 0): kotlin.String {
225+
checkRequiredFields()
226+
val indentString = " ".repeat(indent)
227+
val nextIndentString = " ".repeat(indent + 4)
228+
return buildString {
229+
appendLine("com.google.protobuf.kotlin.Mixin(")
230+
appendLine("${nextIndentString}name=${name},")
231+
appendLine("${nextIndentString}root=${root},")
232+
append("${indentString})")
233+
}
234+
}
235+
99236
@kotlinx.rpc.internal.utils.InternalRpcApi
100237
public object CODEC: kotlinx.rpc.grpc.codec.MessageCodec<com.google.protobuf.kotlin.Mixin> {
101238
public override fun encode(value: com.google.protobuf.kotlin.Mixin): kotlinx.rpc.protobuf.input.stream.InputStream {

0 commit comments

Comments
 (0)