All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.whispersystems.signalservice.internal.push.NullMessage.kt Maven / Gradle / Ivy

There is a newer version: 2.15.3_unofficial_107
Show newest version
// Code generated by Wire protocol buffer compiler, do not edit.
// Source: signalservice.NullMessage in SignalService.proto
package org.whispersystems.signalservice.`internal`.push

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_2
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 NullMessage(
  @field:WireField(
    tag = 1,
    adapter = "com.squareup.wire.ProtoAdapter#BYTES",
  )
  @JvmField
  public val padding: ByteString? = null,
  unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
  public override fun newBuilder(): Builder {
    val builder = Builder()
    builder.padding = padding
    builder.addUnknownFields(unknownFields)
    return builder
  }

  public override fun equals(other: Any?): Boolean {
    if (other === this) return true
    if (other !is NullMessage) return false
    if (unknownFields != other.unknownFields) return false
    if (padding != other.padding) return false
    return true
  }

  public override fun hashCode(): Int {
    var result = super.hashCode
    if (result == 0) {
      result = unknownFields.hashCode()
      result = result * 37 + (padding?.hashCode() ?: 0)
      super.hashCode = result
    }
    return result
  }

  public override fun toString(): String {
    val result = mutableListOf()
    if (padding != null) result += """padding=$padding"""
    return result.joinToString(prefix = "NullMessage{", separator = ", ", postfix = "}")
  }

  public fun copy(padding: ByteString? = this.padding, unknownFields: ByteString =
      this.unknownFields): NullMessage = NullMessage(padding, unknownFields)

  public class Builder : Message.Builder() {
    @JvmField
    public var padding: ByteString? = null

    public fun padding(padding: ByteString?): Builder {
      this.padding = padding
      return this
    }

    public override fun build(): NullMessage = NullMessage(
      padding = padding,
      unknownFields = buildUnknownFields()
    )
  }

  public companion object {
    @JvmField
    public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
      FieldEncoding.LENGTH_DELIMITED, 
      NullMessage::class, 
      "type.googleapis.com/signalservice.NullMessage", 
      PROTO_2, 
      null, 
      "SignalService.proto"
    ) {
      public override fun encodedSize(`value`: NullMessage): Int {
        var size = value.unknownFields.size
        size += ProtoAdapter.BYTES.encodedSizeWithTag(1, value.padding)
        return size
      }

      public override fun encode(writer: ProtoWriter, `value`: NullMessage): Unit {
        ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.padding)
        writer.writeBytes(value.unknownFields)
      }

      public override fun encode(writer: ReverseProtoWriter, `value`: NullMessage): Unit {
        writer.writeBytes(value.unknownFields)
        ProtoAdapter.BYTES.encodeWithTag(writer, 1, value.padding)
      }

      public override fun decode(reader: ProtoReader): NullMessage {
        var padding: ByteString? = null
        val unknownFields = reader.forEachTag { tag ->
          when (tag) {
            1 -> padding = ProtoAdapter.BYTES.decode(reader)
            else -> reader.readUnknownField(tag)
          }
        }
        return NullMessage(
          padding = padding,
          unknownFields = unknownFields
        )
      }

      public override fun redact(`value`: NullMessage): NullMessage = value.copy(
        unknownFields = ByteString.EMPTY
      )
    }

    private const val serialVersionUID: Long = 0L
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy