org.signal.svr2.proto.ExposeRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of signal-service-java Show documentation
Show all versions of signal-service-java Show documentation
Signal Service communication library for Java, unofficial fork
// Code generated by Wire protocol buffer compiler, do not edit.
// Source: ExposeRequest in SVR2.proto
package org.signal.svr2.proto
import com.squareup.wire.FieldEncoding
import com.squareup.wire.Message
import com.squareup.wire.ProtoAdapter
import com.squareup.wire.ProtoReader
import com.squareup.wire.ProtoWriter
import com.squareup.wire.ReverseProtoWriter
import com.squareup.wire.Syntax.PROTO_3
import com.squareup.wire.WireField
import kotlin.Any
import kotlin.Boolean
import kotlin.Int
import kotlin.Long
import kotlin.String
import kotlin.Unit
import kotlin.jvm.JvmField
import okio.ByteString
public class ExposeRequest(
@field:WireField(
tag = 1,
adapter = "com.squareup.wire.ProtoAdapter#BYTES",
label = WireField.Label.OMIT_IDENTITY,
declaredName = "data",
)
@JvmField
public val data_: ByteString = ByteString.EMPTY,
unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
public override fun newBuilder(): Builder {
val builder = Builder()
builder.data_ = data_
builder.addUnknownFields(unknownFields)
return builder
}
public override fun equals(other: Any?): Boolean {
if (other === this) return true
if (other !is ExposeRequest) return false
if (unknownFields != other.unknownFields) return false
if (data_ != other.data_) return false
return true
}
public override fun hashCode(): Int {
var result = super.hashCode
if (result == 0) {
result = unknownFields.hashCode()
result = result * 37 + data_.hashCode()
super.hashCode = result
}
return result
}
public override fun toString(): String {
val result = mutableListOf()
result += """data_=$data_"""
return result.joinToString(prefix = "ExposeRequest{", separator = ", ", postfix = "}")
}
public fun copy(data_: ByteString = this.data_, unknownFields: ByteString = this.unknownFields):
ExposeRequest = ExposeRequest(data_, unknownFields)
public class Builder : Message.Builder() {
@JvmField
public var data_: ByteString = ByteString.EMPTY
public fun data_(data_: ByteString): Builder {
this.data_ = data_
return this
}
public override fun build(): ExposeRequest = ExposeRequest(
data_ = data_,
unknownFields = buildUnknownFields()
)
}
public companion object {
@JvmField
public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
FieldEncoding.LENGTH_DELIMITED,
ExposeRequest::class,
"type.googleapis.com/ExposeRequest",
PROTO_3,
null,
"SVR2.proto"
) {
public override fun encodedSize(`value`: ExposeRequest): Int {
var size = value.unknownFields.size
if (value.data_ != ByteString.EMPTY) size += ProtoAdapter.BYTES.encodedSizeWithTag(1,
value.data_)
return size
}
public override fun encode(writer: ProtoWriter, `value`: ExposeRequest): Unit {
if (value.data_ != ByteString.EMPTY) ProtoAdapter.BYTES.encodeWithTag(writer, 1,
value.data_)
writer.writeBytes(value.unknownFields)
}
public override fun encode(writer: ReverseProtoWriter, `value`: ExposeRequest): Unit {
writer.writeBytes(value.unknownFields)
if (value.data_ != ByteString.EMPTY) ProtoAdapter.BYTES.encodeWithTag(writer, 1,
value.data_)
}
public override fun decode(reader: ProtoReader): ExposeRequest {
var data_: ByteString = ByteString.EMPTY
val unknownFields = reader.forEachTag { tag ->
when (tag) {
1 -> data_ = ProtoAdapter.BYTES.decode(reader)
else -> reader.readUnknownField(tag)
}
}
return ExposeRequest(
data_ = data_,
unknownFields = unknownFields
)
}
public override fun redact(`value`: ExposeRequest): ExposeRequest = value.copy(
unknownFields = ByteString.EMPTY
)
}
private const val serialVersionUID: Long = 0L
}
}