// Code generated by Wire protocol buffer compiler, do not edit.
// Source file: service_kotlin.proto
package com.squareup.wire.protos.kotlin

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.TagHandler
import kotlin.Deprecated
import kotlin.DeprecationLevel
import kotlin.Int
import kotlin.jvm.JvmField
import okio.ByteString

data class SomeRequest(val unknownFields: ByteString = ByteString.EMPTY) : Message<SomeRequest,
    SomeRequest.Builder>(ADAPTER, unknownFields) {
  @Deprecated(
      message = "Shouldn't be used in Kotlin",
      level = DeprecationLevel.HIDDEN
  )
  override fun newBuilder(): Builder = Builder(this.copy())

  class Builder(private val message: SomeRequest) : Message.Builder<SomeRequest, Builder>() {
    override fun build(): SomeRequest = message
  }

  companion object {
    @JvmField
    val ADAPTER: ProtoAdapter<SomeRequest> = object : ProtoAdapter<SomeRequest>(
      FieldEncoding.LENGTH_DELIMITED, 
      SomeRequest::class.java
    ) {
      override fun encodedSize(value: SomeRequest): Int = 
        value.unknownFields.size

      override fun encode(writer: ProtoWriter, value: SomeRequest) {
        writer.writeBytes(value.unknownFields)
      }

      override fun decode(reader: ProtoReader): SomeRequest {
        val unknownFields = reader.forEachTag { tag ->
          when (tag) {
            else -> TagHandler.UNKNOWN_TAG
          }
        }
        return SomeRequest(
          unknownFields = unknownFields
        )
      }

      override fun redact(value: SomeRequest): SomeRequest? = value.copy(
        unknownFields = ByteString.EMPTY
      )
    }
  }
}
