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

xyz.block.ftl.v1.StatusResponse.kt Maven / Gradle / Ivy

There is a newer version: 0.189.0
Show newest version
// Code generated by Wire protocol buffer compiler, do not edit.
// Source: xyz.block.ftl.v1.StatusResponse in xyz/block/ftl/v1/ftl.proto
package xyz.block.ftl.v1

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 com.squareup.wire.`internal`.JvmField
import com.squareup.wire.`internal`.immutableCopyOf
import com.squareup.wire.`internal`.immutableCopyOfStruct
import com.squareup.wire.`internal`.redactElements
import com.squareup.wire.`internal`.sanitize
import kotlin.Any
import kotlin.AssertionError
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.DeprecationLevel
import kotlin.Int
import kotlin.Long
import kotlin.Nothing
import kotlin.String
import kotlin.collections.List
import kotlin.collections.Map
import okio.ByteString
import xyz.block.ftl.v1.schema.Module
import xyz.block.ftl.v1.schema.VerbRef

public class StatusResponse(
  controllers: List = emptyList(),
  runners: List = emptyList(),
  deployments: List = emptyList(),
  ingress_routes: List = emptyList(),
  routes: List = emptyList(),
  unknownFields: ByteString = ByteString.EMPTY,
) : Message(ADAPTER, unknownFields) {
  @field:WireField(
    tag = 1,
    adapter = "xyz.block.ftl.v1.StatusResponse${'$'}Controller#ADAPTER",
    label = WireField.Label.REPEATED,
    schemaIndex = 0,
  )
  public val controllers: List = immutableCopyOf("controllers", controllers)

  @field:WireField(
    tag = 2,
    adapter = "xyz.block.ftl.v1.StatusResponse${'$'}Runner#ADAPTER",
    label = WireField.Label.REPEATED,
    schemaIndex = 1,
  )
  public val runners: List = immutableCopyOf("runners", runners)

  @field:WireField(
    tag = 3,
    adapter = "xyz.block.ftl.v1.StatusResponse${'$'}Deployment#ADAPTER",
    label = WireField.Label.REPEATED,
    schemaIndex = 2,
  )
  public val deployments: List = immutableCopyOf("deployments", deployments)

  @field:WireField(
    tag = 4,
    adapter = "xyz.block.ftl.v1.StatusResponse${'$'}IngressRoute#ADAPTER",
    label = WireField.Label.REPEATED,
    jsonName = "ingressRoutes",
    schemaIndex = 3,
  )
  public val ingress_routes: List = immutableCopyOf("ingress_routes", ingress_routes)

  @field:WireField(
    tag = 5,
    adapter = "xyz.block.ftl.v1.StatusResponse${'$'}Route#ADAPTER",
    label = WireField.Label.REPEATED,
    schemaIndex = 4,
  )
  public val routes: List = immutableCopyOf("routes", routes)

  @Deprecated(
    message = "Shouldn't be used in Kotlin",
    level = DeprecationLevel.HIDDEN,
  )
  override fun newBuilder(): Nothing = throw
      AssertionError("Builders are deprecated and only available in a javaInterop build; see https://square.github.io/wire/wire_compiler/#kotlin")

  override fun equals(other: Any?): Boolean {
    if (other === this) return true
    if (other !is StatusResponse) return false
    if (unknownFields != other.unknownFields) return false
    if (controllers != other.controllers) return false
    if (runners != other.runners) return false
    if (deployments != other.deployments) return false
    if (ingress_routes != other.ingress_routes) return false
    if (routes != other.routes) return false
    return true
  }

  override fun hashCode(): Int {
    var result = super.hashCode
    if (result == 0) {
      result = unknownFields.hashCode()
      result = result * 37 + controllers.hashCode()
      result = result * 37 + runners.hashCode()
      result = result * 37 + deployments.hashCode()
      result = result * 37 + ingress_routes.hashCode()
      result = result * 37 + routes.hashCode()
      super.hashCode = result
    }
    return result
  }

  override fun toString(): String {
    val result = mutableListOf()
    if (controllers.isNotEmpty()) result += """controllers=$controllers"""
    if (runners.isNotEmpty()) result += """runners=$runners"""
    if (deployments.isNotEmpty()) result += """deployments=$deployments"""
    if (ingress_routes.isNotEmpty()) result += """ingress_routes=$ingress_routes"""
    if (routes.isNotEmpty()) result += """routes=$routes"""
    return result.joinToString(prefix = "StatusResponse{", separator = ", ", postfix = "}")
  }

  public fun copy(
    controllers: List = this.controllers,
    runners: List = this.runners,
    deployments: List = this.deployments,
    ingress_routes: List = this.ingress_routes,
    routes: List = this.routes,
    unknownFields: ByteString = this.unknownFields,
  ): StatusResponse = StatusResponse(controllers, runners, deployments, ingress_routes, routes,
      unknownFields)

  public companion object {
    @JvmField
    public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
      FieldEncoding.LENGTH_DELIMITED, 
      StatusResponse::class, 
      "type.googleapis.com/xyz.block.ftl.v1.StatusResponse", 
      PROTO_3, 
      null, 
      "xyz/block/ftl/v1/ftl.proto"
    ) {
      override fun encodedSize(`value`: StatusResponse): Int {
        var size = value.unknownFields.size
        size += Controller.ADAPTER.asRepeated().encodedSizeWithTag(1, value.controllers)
        size += Runner.ADAPTER.asRepeated().encodedSizeWithTag(2, value.runners)
        size += Deployment.ADAPTER.asRepeated().encodedSizeWithTag(3, value.deployments)
        size += IngressRoute.ADAPTER.asRepeated().encodedSizeWithTag(4, value.ingress_routes)
        size += Route.ADAPTER.asRepeated().encodedSizeWithTag(5, value.routes)
        return size
      }

      override fun encode(writer: ProtoWriter, `value`: StatusResponse) {
        Controller.ADAPTER.asRepeated().encodeWithTag(writer, 1, value.controllers)
        Runner.ADAPTER.asRepeated().encodeWithTag(writer, 2, value.runners)
        Deployment.ADAPTER.asRepeated().encodeWithTag(writer, 3, value.deployments)
        IngressRoute.ADAPTER.asRepeated().encodeWithTag(writer, 4, value.ingress_routes)
        Route.ADAPTER.asRepeated().encodeWithTag(writer, 5, value.routes)
        writer.writeBytes(value.unknownFields)
      }

      override fun encode(writer: ReverseProtoWriter, `value`: StatusResponse) {
        writer.writeBytes(value.unknownFields)
        Route.ADAPTER.asRepeated().encodeWithTag(writer, 5, value.routes)
        IngressRoute.ADAPTER.asRepeated().encodeWithTag(writer, 4, value.ingress_routes)
        Deployment.ADAPTER.asRepeated().encodeWithTag(writer, 3, value.deployments)
        Runner.ADAPTER.asRepeated().encodeWithTag(writer, 2, value.runners)
        Controller.ADAPTER.asRepeated().encodeWithTag(writer, 1, value.controllers)
      }

      override fun decode(reader: ProtoReader): StatusResponse {
        val controllers = mutableListOf()
        val runners = mutableListOf()
        val deployments = mutableListOf()
        val ingress_routes = mutableListOf()
        val routes = mutableListOf()
        val unknownFields = reader.forEachTag { tag ->
          when (tag) {
            1 -> controllers.add(Controller.ADAPTER.decode(reader))
            2 -> runners.add(Runner.ADAPTER.decode(reader))
            3 -> deployments.add(Deployment.ADAPTER.decode(reader))
            4 -> ingress_routes.add(IngressRoute.ADAPTER.decode(reader))
            5 -> routes.add(Route.ADAPTER.decode(reader))
            else -> reader.readUnknownField(tag)
          }
        }
        return StatusResponse(
          controllers = controllers,
          runners = runners,
          deployments = deployments,
          ingress_routes = ingress_routes,
          routes = routes,
          unknownFields = unknownFields
        )
      }

      override fun redact(`value`: StatusResponse): StatusResponse = value.copy(
        controllers = value.controllers.redactElements(Controller.ADAPTER),
        runners = value.runners.redactElements(Runner.ADAPTER),
        deployments = value.deployments.redactElements(Deployment.ADAPTER),
        ingress_routes = value.ingress_routes.redactElements(IngressRoute.ADAPTER),
        routes = value.routes.redactElements(Route.ADAPTER),
        unknownFields = ByteString.EMPTY
      )
    }

    private const val serialVersionUID: Long = 0L
  }

  public class Controller(
    @field:WireField(
      tag = 1,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 0,
    )
    public val key: String = "",
    @field:WireField(
      tag = 2,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 1,
    )
    public val endpoint: String = "",
    @field:WireField(
      tag = 4,
      adapter = "xyz.block.ftl.v1.ControllerState#ADAPTER",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 2,
    )
    public val state: ControllerState = ControllerState.CONTROLLER_LIVE,
    unknownFields: ByteString = ByteString.EMPTY,
  ) : Message(ADAPTER, unknownFields) {
    @Deprecated(
      message = "Shouldn't be used in Kotlin",
      level = DeprecationLevel.HIDDEN,
    )
    override fun newBuilder(): Nothing = throw
        AssertionError("Builders are deprecated and only available in a javaInterop build; see https://square.github.io/wire/wire_compiler/#kotlin")

    override fun equals(other: Any?): Boolean {
      if (other === this) return true
      if (other !is Controller) return false
      if (unknownFields != other.unknownFields) return false
      if (key != other.key) return false
      if (endpoint != other.endpoint) return false
      if (state != other.state) return false
      return true
    }

    override fun hashCode(): Int {
      var result = super.hashCode
      if (result == 0) {
        result = unknownFields.hashCode()
        result = result * 37 + key.hashCode()
        result = result * 37 + endpoint.hashCode()
        result = result * 37 + state.hashCode()
        super.hashCode = result
      }
      return result
    }

    override fun toString(): String {
      val result = mutableListOf()
      result += """key=${sanitize(key)}"""
      result += """endpoint=${sanitize(endpoint)}"""
      result += """state=$state"""
      return result.joinToString(prefix = "Controller{", separator = ", ", postfix = "}")
    }

    public fun copy(
      key: String = this.key,
      endpoint: String = this.endpoint,
      state: ControllerState = this.state,
      unknownFields: ByteString = this.unknownFields,
    ): Controller = Controller(key, endpoint, state, unknownFields)

    public companion object {
      @JvmField
      public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
        FieldEncoding.LENGTH_DELIMITED, 
        Controller::class, 
        "type.googleapis.com/xyz.block.ftl.v1.StatusResponse.Controller", 
        PROTO_3, 
        null, 
        "xyz/block/ftl/v1/ftl.proto"
      ) {
        override fun encodedSize(`value`: Controller): Int {
          var size = value.unknownFields.size
          if (value.key != "") size += ProtoAdapter.STRING.encodedSizeWithTag(1, value.key)
          if (value.endpoint != "") size += ProtoAdapter.STRING.encodedSizeWithTag(2,
              value.endpoint)
          if (value.state != ControllerState.CONTROLLER_LIVE) size +=
              ControllerState.ADAPTER.encodedSizeWithTag(4, value.state)
          return size
        }

        override fun encode(writer: ProtoWriter, `value`: Controller) {
          if (value.key != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.key)
          if (value.endpoint != "") ProtoAdapter.STRING.encodeWithTag(writer, 2, value.endpoint)
          if (value.state != ControllerState.CONTROLLER_LIVE)
              ControllerState.ADAPTER.encodeWithTag(writer, 4, value.state)
          writer.writeBytes(value.unknownFields)
        }

        override fun encode(writer: ReverseProtoWriter, `value`: Controller) {
          writer.writeBytes(value.unknownFields)
          if (value.state != ControllerState.CONTROLLER_LIVE)
              ControllerState.ADAPTER.encodeWithTag(writer, 4, value.state)
          if (value.endpoint != "") ProtoAdapter.STRING.encodeWithTag(writer, 2, value.endpoint)
          if (value.key != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.key)
        }

        override fun decode(reader: ProtoReader): Controller {
          var key: String = ""
          var endpoint: String = ""
          var state: ControllerState = ControllerState.CONTROLLER_LIVE
          val unknownFields = reader.forEachTag { tag ->
            when (tag) {
              1 -> key = ProtoAdapter.STRING.decode(reader)
              2 -> endpoint = ProtoAdapter.STRING.decode(reader)
              4 -> try {
                state = ControllerState.ADAPTER.decode(reader)
              } catch (e: ProtoAdapter.EnumConstantNotFoundException) {
                reader.addUnknownField(tag, FieldEncoding.VARINT, e.value.toLong())
              }
              else -> reader.readUnknownField(tag)
            }
          }
          return Controller(
            key = key,
            endpoint = endpoint,
            state = state,
            unknownFields = unknownFields
          )
        }

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

      private const val serialVersionUID: Long = 0L
    }
  }

  public class Runner(
    @field:WireField(
      tag = 1,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 0,
    )
    public val key: String = "",
    languages: List = emptyList(),
    @field:WireField(
      tag = 3,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 2,
    )
    public val endpoint: String = "",
    @field:WireField(
      tag = 4,
      adapter = "xyz.block.ftl.v1.RunnerState#ADAPTER",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 3,
    )
    public val state: RunnerState = RunnerState.RUNNER_IDLE,
    @field:WireField(
      tag = 5,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      schemaIndex = 4,
    )
    public val deployment: String? = null,
    labels: Map? = null,
    unknownFields: ByteString = ByteString.EMPTY,
  ) : Message(ADAPTER, unknownFields) {
    @field:WireField(
      tag = 2,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.REPEATED,
      schemaIndex = 1,
    )
    public val languages: List = immutableCopyOf("languages", languages)

    @field:WireField(
      tag = 6,
      adapter = "com.squareup.wire.ProtoAdapter#STRUCT_MAP",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 5,
    )
    public val labels: Map? = immutableCopyOfStruct("labels", labels)

    @Deprecated(
      message = "Shouldn't be used in Kotlin",
      level = DeprecationLevel.HIDDEN,
    )
    override fun newBuilder(): Nothing = throw
        AssertionError("Builders are deprecated and only available in a javaInterop build; see https://square.github.io/wire/wire_compiler/#kotlin")

    override fun equals(other: Any?): Boolean {
      if (other === this) return true
      if (other !is Runner) return false
      if (unknownFields != other.unknownFields) return false
      if (key != other.key) return false
      if (languages != other.languages) return false
      if (endpoint != other.endpoint) return false
      if (state != other.state) return false
      if (deployment != other.deployment) return false
      if (labels != other.labels) return false
      return true
    }

    override fun hashCode(): Int {
      var result = super.hashCode
      if (result == 0) {
        result = unknownFields.hashCode()
        result = result * 37 + key.hashCode()
        result = result * 37 + languages.hashCode()
        result = result * 37 + endpoint.hashCode()
        result = result * 37 + state.hashCode()
        result = result * 37 + (deployment?.hashCode() ?: 0)
        result = result * 37 + (labels?.hashCode() ?: 0)
        super.hashCode = result
      }
      return result
    }

    override fun toString(): String {
      val result = mutableListOf()
      result += """key=${sanitize(key)}"""
      if (languages.isNotEmpty()) result += """languages=${sanitize(languages)}"""
      result += """endpoint=${sanitize(endpoint)}"""
      result += """state=$state"""
      if (deployment != null) result += """deployment=${sanitize(deployment)}"""
      if (labels != null) result += """labels=$labels"""
      return result.joinToString(prefix = "Runner{", separator = ", ", postfix = "}")
    }

    public fun copy(
      key: String = this.key,
      languages: List = this.languages,
      endpoint: String = this.endpoint,
      state: RunnerState = this.state,
      deployment: String? = this.deployment,
      labels: Map? = this.labels,
      unknownFields: ByteString = this.unknownFields,
    ): Runner = Runner(key, languages, endpoint, state, deployment, labels, unknownFields)

    public companion object {
      @JvmField
      public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
        FieldEncoding.LENGTH_DELIMITED, 
        Runner::class, 
        "type.googleapis.com/xyz.block.ftl.v1.StatusResponse.Runner", 
        PROTO_3, 
        null, 
        "xyz/block/ftl/v1/ftl.proto"
      ) {
        override fun encodedSize(`value`: Runner): Int {
          var size = value.unknownFields.size
          if (value.key != "") size += ProtoAdapter.STRING.encodedSizeWithTag(1, value.key)
          size += ProtoAdapter.STRING.asRepeated().encodedSizeWithTag(2, value.languages)
          if (value.endpoint != "") size += ProtoAdapter.STRING.encodedSizeWithTag(3,
              value.endpoint)
          if (value.state != RunnerState.RUNNER_IDLE) size +=
              RunnerState.ADAPTER.encodedSizeWithTag(4, value.state)
          size += ProtoAdapter.STRING.encodedSizeWithTag(5, value.deployment)
          if (value.labels != null) size += ProtoAdapter.STRUCT_MAP.encodedSizeWithTag(6,
              value.labels)
          return size
        }

        override fun encode(writer: ProtoWriter, `value`: Runner) {
          if (value.key != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.key)
          ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 2, value.languages)
          if (value.endpoint != "") ProtoAdapter.STRING.encodeWithTag(writer, 3, value.endpoint)
          if (value.state != RunnerState.RUNNER_IDLE) RunnerState.ADAPTER.encodeWithTag(writer, 4,
              value.state)
          ProtoAdapter.STRING.encodeWithTag(writer, 5, value.deployment)
          if (value.labels != null) ProtoAdapter.STRUCT_MAP.encodeWithTag(writer, 6, value.labels)
          writer.writeBytes(value.unknownFields)
        }

        override fun encode(writer: ReverseProtoWriter, `value`: Runner) {
          writer.writeBytes(value.unknownFields)
          if (value.labels != null) ProtoAdapter.STRUCT_MAP.encodeWithTag(writer, 6, value.labels)
          ProtoAdapter.STRING.encodeWithTag(writer, 5, value.deployment)
          if (value.state != RunnerState.RUNNER_IDLE) RunnerState.ADAPTER.encodeWithTag(writer, 4,
              value.state)
          if (value.endpoint != "") ProtoAdapter.STRING.encodeWithTag(writer, 3, value.endpoint)
          ProtoAdapter.STRING.asRepeated().encodeWithTag(writer, 2, value.languages)
          if (value.key != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.key)
        }

        override fun decode(reader: ProtoReader): Runner {
          var key: String = ""
          val languages = mutableListOf()
          var endpoint: String = ""
          var state: RunnerState = RunnerState.RUNNER_IDLE
          var deployment: String? = null
          var labels: Map? = null
          val unknownFields = reader.forEachTag { tag ->
            when (tag) {
              1 -> key = ProtoAdapter.STRING.decode(reader)
              2 -> languages.add(ProtoAdapter.STRING.decode(reader))
              3 -> endpoint = ProtoAdapter.STRING.decode(reader)
              4 -> try {
                state = RunnerState.ADAPTER.decode(reader)
              } catch (e: ProtoAdapter.EnumConstantNotFoundException) {
                reader.addUnknownField(tag, FieldEncoding.VARINT, e.value.toLong())
              }
              5 -> deployment = ProtoAdapter.STRING.decode(reader)
              6 -> labels = ProtoAdapter.STRUCT_MAP.decode(reader)
              else -> reader.readUnknownField(tag)
            }
          }
          return Runner(
            key = key,
            languages = languages,
            endpoint = endpoint,
            state = state,
            deployment = deployment,
            labels = labels,
            unknownFields = unknownFields
          )
        }

        override fun redact(`value`: Runner): Runner = value.copy(
          labels = value.labels?.let(ProtoAdapter.STRUCT_MAP::redact),
          unknownFields = ByteString.EMPTY
        )
      }

      private const val serialVersionUID: Long = 0L
    }
  }

  public class Deployment(
    @field:WireField(
      tag = 1,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 0,
    )
    public val key: String = "",
    @field:WireField(
      tag = 2,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 1,
    )
    public val language: String = "",
    @field:WireField(
      tag = 3,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 2,
    )
    public val name: String = "",
    @field:WireField(
      tag = 4,
      adapter = "com.squareup.wire.ProtoAdapter#INT32",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "minReplicas",
      schemaIndex = 3,
    )
    public val min_replicas: Int = 0,
    labels: Map? = null,
    @field:WireField(
      tag = 6,
      adapter = "xyz.block.ftl.v1.schema.Module#ADAPTER",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 5,
    )
    public val schema: Module? = null,
    unknownFields: ByteString = ByteString.EMPTY,
  ) : Message(ADAPTER, unknownFields) {
    @field:WireField(
      tag = 5,
      adapter = "com.squareup.wire.ProtoAdapter#STRUCT_MAP",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 4,
    )
    public val labels: Map? = immutableCopyOfStruct("labels", labels)

    @Deprecated(
      message = "Shouldn't be used in Kotlin",
      level = DeprecationLevel.HIDDEN,
    )
    override fun newBuilder(): Nothing = throw
        AssertionError("Builders are deprecated and only available in a javaInterop build; see https://square.github.io/wire/wire_compiler/#kotlin")

    override fun equals(other: Any?): Boolean {
      if (other === this) return true
      if (other !is Deployment) return false
      if (unknownFields != other.unknownFields) return false
      if (key != other.key) return false
      if (language != other.language) return false
      if (name != other.name) return false
      if (min_replicas != other.min_replicas) return false
      if (labels != other.labels) return false
      if (schema != other.schema) return false
      return true
    }

    override fun hashCode(): Int {
      var result = super.hashCode
      if (result == 0) {
        result = unknownFields.hashCode()
        result = result * 37 + key.hashCode()
        result = result * 37 + language.hashCode()
        result = result * 37 + name.hashCode()
        result = result * 37 + min_replicas.hashCode()
        result = result * 37 + (labels?.hashCode() ?: 0)
        result = result * 37 + (schema?.hashCode() ?: 0)
        super.hashCode = result
      }
      return result
    }

    override fun toString(): String {
      val result = mutableListOf()
      result += """key=${sanitize(key)}"""
      result += """language=${sanitize(language)}"""
      result += """name=${sanitize(name)}"""
      result += """min_replicas=$min_replicas"""
      if (labels != null) result += """labels=$labels"""
      if (schema != null) result += """schema=$schema"""
      return result.joinToString(prefix = "Deployment{", separator = ", ", postfix = "}")
    }

    public fun copy(
      key: String = this.key,
      language: String = this.language,
      name: String = this.name,
      min_replicas: Int = this.min_replicas,
      labels: Map? = this.labels,
      schema: Module? = this.schema,
      unknownFields: ByteString = this.unknownFields,
    ): Deployment = Deployment(key, language, name, min_replicas, labels, schema, unknownFields)

    public companion object {
      @JvmField
      public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
        FieldEncoding.LENGTH_DELIMITED, 
        Deployment::class, 
        "type.googleapis.com/xyz.block.ftl.v1.StatusResponse.Deployment", 
        PROTO_3, 
        null, 
        "xyz/block/ftl/v1/ftl.proto"
      ) {
        override fun encodedSize(`value`: Deployment): Int {
          var size = value.unknownFields.size
          if (value.key != "") size += ProtoAdapter.STRING.encodedSizeWithTag(1, value.key)
          if (value.language != "") size += ProtoAdapter.STRING.encodedSizeWithTag(2,
              value.language)
          if (value.name != "") size += ProtoAdapter.STRING.encodedSizeWithTag(3, value.name)
          if (value.min_replicas != 0) size += ProtoAdapter.INT32.encodedSizeWithTag(4,
              value.min_replicas)
          if (value.labels != null) size += ProtoAdapter.STRUCT_MAP.encodedSizeWithTag(5,
              value.labels)
          if (value.schema != null) size += Module.ADAPTER.encodedSizeWithTag(6, value.schema)
          return size
        }

        override fun encode(writer: ProtoWriter, `value`: Deployment) {
          if (value.key != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.key)
          if (value.language != "") ProtoAdapter.STRING.encodeWithTag(writer, 2, value.language)
          if (value.name != "") ProtoAdapter.STRING.encodeWithTag(writer, 3, value.name)
          if (value.min_replicas != 0) ProtoAdapter.INT32.encodeWithTag(writer, 4,
              value.min_replicas)
          if (value.labels != null) ProtoAdapter.STRUCT_MAP.encodeWithTag(writer, 5, value.labels)
          if (value.schema != null) Module.ADAPTER.encodeWithTag(writer, 6, value.schema)
          writer.writeBytes(value.unknownFields)
        }

        override fun encode(writer: ReverseProtoWriter, `value`: Deployment) {
          writer.writeBytes(value.unknownFields)
          if (value.schema != null) Module.ADAPTER.encodeWithTag(writer, 6, value.schema)
          if (value.labels != null) ProtoAdapter.STRUCT_MAP.encodeWithTag(writer, 5, value.labels)
          if (value.min_replicas != 0) ProtoAdapter.INT32.encodeWithTag(writer, 4,
              value.min_replicas)
          if (value.name != "") ProtoAdapter.STRING.encodeWithTag(writer, 3, value.name)
          if (value.language != "") ProtoAdapter.STRING.encodeWithTag(writer, 2, value.language)
          if (value.key != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.key)
        }

        override fun decode(reader: ProtoReader): Deployment {
          var key: String = ""
          var language: String = ""
          var name: String = ""
          var min_replicas: Int = 0
          var labels: Map? = null
          var schema: Module? = null
          val unknownFields = reader.forEachTag { tag ->
            when (tag) {
              1 -> key = ProtoAdapter.STRING.decode(reader)
              2 -> language = ProtoAdapter.STRING.decode(reader)
              3 -> name = ProtoAdapter.STRING.decode(reader)
              4 -> min_replicas = ProtoAdapter.INT32.decode(reader)
              5 -> labels = ProtoAdapter.STRUCT_MAP.decode(reader)
              6 -> schema = Module.ADAPTER.decode(reader)
              else -> reader.readUnknownField(tag)
            }
          }
          return Deployment(
            key = key,
            language = language,
            name = name,
            min_replicas = min_replicas,
            labels = labels,
            schema = schema,
            unknownFields = unknownFields
          )
        }

        override fun redact(`value`: Deployment): Deployment = value.copy(
          labels = value.labels?.let(ProtoAdapter.STRUCT_MAP::redact),
          schema = value.schema?.let(Module.ADAPTER::redact),
          unknownFields = ByteString.EMPTY
        )
      }

      private const val serialVersionUID: Long = 0L
    }
  }

  public class IngressRoute(
    @field:WireField(
      tag = 1,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      jsonName = "deploymentName",
      schemaIndex = 0,
    )
    public val deployment_name: String = "",
    @field:WireField(
      tag = 2,
      adapter = "xyz.block.ftl.v1.schema.VerbRef#ADAPTER",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 1,
    )
    public val verb: VerbRef? = null,
    @field:WireField(
      tag = 3,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 2,
    )
    public val method: String = "",
    @field:WireField(
      tag = 4,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 3,
    )
    public val path: String = "",
    unknownFields: ByteString = ByteString.EMPTY,
  ) : Message(ADAPTER, unknownFields) {
    @Deprecated(
      message = "Shouldn't be used in Kotlin",
      level = DeprecationLevel.HIDDEN,
    )
    override fun newBuilder(): Nothing = throw
        AssertionError("Builders are deprecated and only available in a javaInterop build; see https://square.github.io/wire/wire_compiler/#kotlin")

    override fun equals(other: Any?): Boolean {
      if (other === this) return true
      if (other !is IngressRoute) return false
      if (unknownFields != other.unknownFields) return false
      if (deployment_name != other.deployment_name) return false
      if (verb != other.verb) return false
      if (method != other.method) return false
      if (path != other.path) return false
      return true
    }

    override fun hashCode(): Int {
      var result = super.hashCode
      if (result == 0) {
        result = unknownFields.hashCode()
        result = result * 37 + deployment_name.hashCode()
        result = result * 37 + (verb?.hashCode() ?: 0)
        result = result * 37 + method.hashCode()
        result = result * 37 + path.hashCode()
        super.hashCode = result
      }
      return result
    }

    override fun toString(): String {
      val result = mutableListOf()
      result += """deployment_name=${sanitize(deployment_name)}"""
      if (verb != null) result += """verb=$verb"""
      result += """method=${sanitize(method)}"""
      result += """path=${sanitize(path)}"""
      return result.joinToString(prefix = "IngressRoute{", separator = ", ", postfix = "}")
    }

    public fun copy(
      deployment_name: String = this.deployment_name,
      verb: VerbRef? = this.verb,
      method: String = this.method,
      path: String = this.path,
      unknownFields: ByteString = this.unknownFields,
    ): IngressRoute = IngressRoute(deployment_name, verb, method, path, unknownFields)

    public companion object {
      @JvmField
      public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
        FieldEncoding.LENGTH_DELIMITED, 
        IngressRoute::class, 
        "type.googleapis.com/xyz.block.ftl.v1.StatusResponse.IngressRoute", 
        PROTO_3, 
        null, 
        "xyz/block/ftl/v1/ftl.proto"
      ) {
        override fun encodedSize(`value`: IngressRoute): Int {
          var size = value.unknownFields.size
          if (value.deployment_name != "") size += ProtoAdapter.STRING.encodedSizeWithTag(1,
              value.deployment_name)
          if (value.verb != null) size += VerbRef.ADAPTER.encodedSizeWithTag(2, value.verb)
          if (value.method != "") size += ProtoAdapter.STRING.encodedSizeWithTag(3, value.method)
          if (value.path != "") size += ProtoAdapter.STRING.encodedSizeWithTag(4, value.path)
          return size
        }

        override fun encode(writer: ProtoWriter, `value`: IngressRoute) {
          if (value.deployment_name != "") ProtoAdapter.STRING.encodeWithTag(writer, 1,
              value.deployment_name)
          if (value.verb != null) VerbRef.ADAPTER.encodeWithTag(writer, 2, value.verb)
          if (value.method != "") ProtoAdapter.STRING.encodeWithTag(writer, 3, value.method)
          if (value.path != "") ProtoAdapter.STRING.encodeWithTag(writer, 4, value.path)
          writer.writeBytes(value.unknownFields)
        }

        override fun encode(writer: ReverseProtoWriter, `value`: IngressRoute) {
          writer.writeBytes(value.unknownFields)
          if (value.path != "") ProtoAdapter.STRING.encodeWithTag(writer, 4, value.path)
          if (value.method != "") ProtoAdapter.STRING.encodeWithTag(writer, 3, value.method)
          if (value.verb != null) VerbRef.ADAPTER.encodeWithTag(writer, 2, value.verb)
          if (value.deployment_name != "") ProtoAdapter.STRING.encodeWithTag(writer, 1,
              value.deployment_name)
        }

        override fun decode(reader: ProtoReader): IngressRoute {
          var deployment_name: String = ""
          var verb: VerbRef? = null
          var method: String = ""
          var path: String = ""
          val unknownFields = reader.forEachTag { tag ->
            when (tag) {
              1 -> deployment_name = ProtoAdapter.STRING.decode(reader)
              2 -> verb = VerbRef.ADAPTER.decode(reader)
              3 -> method = ProtoAdapter.STRING.decode(reader)
              4 -> path = ProtoAdapter.STRING.decode(reader)
              else -> reader.readUnknownField(tag)
            }
          }
          return IngressRoute(
            deployment_name = deployment_name,
            verb = verb,
            method = method,
            path = path,
            unknownFields = unknownFields
          )
        }

        override fun redact(`value`: IngressRoute): IngressRoute = value.copy(
          verb = value.verb?.let(VerbRef.ADAPTER::redact),
          unknownFields = ByteString.EMPTY
        )
      }

      private const val serialVersionUID: Long = 0L
    }
  }

  public class Route(
    @field:WireField(
      tag = 1,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 0,
    )
    public val module: String = "",
    @field:WireField(
      tag = 2,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 1,
    )
    public val runner: String = "",
    @field:WireField(
      tag = 3,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 2,
    )
    public val deployment: String = "",
    @field:WireField(
      tag = 4,
      adapter = "com.squareup.wire.ProtoAdapter#STRING",
      label = WireField.Label.OMIT_IDENTITY,
      schemaIndex = 3,
    )
    public val endpoint: String = "",
    unknownFields: ByteString = ByteString.EMPTY,
  ) : Message(ADAPTER, unknownFields) {
    @Deprecated(
      message = "Shouldn't be used in Kotlin",
      level = DeprecationLevel.HIDDEN,
    )
    override fun newBuilder(): Nothing = throw
        AssertionError("Builders are deprecated and only available in a javaInterop build; see https://square.github.io/wire/wire_compiler/#kotlin")

    override fun equals(other: Any?): Boolean {
      if (other === this) return true
      if (other !is Route) return false
      if (unknownFields != other.unknownFields) return false
      if (module != other.module) return false
      if (runner != other.runner) return false
      if (deployment != other.deployment) return false
      if (endpoint != other.endpoint) return false
      return true
    }

    override fun hashCode(): Int {
      var result = super.hashCode
      if (result == 0) {
        result = unknownFields.hashCode()
        result = result * 37 + module.hashCode()
        result = result * 37 + runner.hashCode()
        result = result * 37 + deployment.hashCode()
        result = result * 37 + endpoint.hashCode()
        super.hashCode = result
      }
      return result
    }

    override fun toString(): String {
      val result = mutableListOf()
      result += """module=${sanitize(module)}"""
      result += """runner=${sanitize(runner)}"""
      result += """deployment=${sanitize(deployment)}"""
      result += """endpoint=${sanitize(endpoint)}"""
      return result.joinToString(prefix = "Route{", separator = ", ", postfix = "}")
    }

    public fun copy(
      module: String = this.module,
      runner: String = this.runner,
      deployment: String = this.deployment,
      endpoint: String = this.endpoint,
      unknownFields: ByteString = this.unknownFields,
    ): Route = Route(module, runner, deployment, endpoint, unknownFields)

    public companion object {
      @JvmField
      public val ADAPTER: ProtoAdapter = object : ProtoAdapter(
        FieldEncoding.LENGTH_DELIMITED, 
        Route::class, 
        "type.googleapis.com/xyz.block.ftl.v1.StatusResponse.Route", 
        PROTO_3, 
        null, 
        "xyz/block/ftl/v1/ftl.proto"
      ) {
        override fun encodedSize(`value`: Route): Int {
          var size = value.unknownFields.size
          if (value.module != "") size += ProtoAdapter.STRING.encodedSizeWithTag(1, value.module)
          if (value.runner != "") size += ProtoAdapter.STRING.encodedSizeWithTag(2, value.runner)
          if (value.deployment != "") size += ProtoAdapter.STRING.encodedSizeWithTag(3,
              value.deployment)
          if (value.endpoint != "") size += ProtoAdapter.STRING.encodedSizeWithTag(4,
              value.endpoint)
          return size
        }

        override fun encode(writer: ProtoWriter, `value`: Route) {
          if (value.module != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.module)
          if (value.runner != "") ProtoAdapter.STRING.encodeWithTag(writer, 2, value.runner)
          if (value.deployment != "") ProtoAdapter.STRING.encodeWithTag(writer, 3, value.deployment)
          if (value.endpoint != "") ProtoAdapter.STRING.encodeWithTag(writer, 4, value.endpoint)
          writer.writeBytes(value.unknownFields)
        }

        override fun encode(writer: ReverseProtoWriter, `value`: Route) {
          writer.writeBytes(value.unknownFields)
          if (value.endpoint != "") ProtoAdapter.STRING.encodeWithTag(writer, 4, value.endpoint)
          if (value.deployment != "") ProtoAdapter.STRING.encodeWithTag(writer, 3, value.deployment)
          if (value.runner != "") ProtoAdapter.STRING.encodeWithTag(writer, 2, value.runner)
          if (value.module != "") ProtoAdapter.STRING.encodeWithTag(writer, 1, value.module)
        }

        override fun decode(reader: ProtoReader): Route {
          var module: String = ""
          var runner: String = ""
          var deployment: String = ""
          var endpoint: String = ""
          val unknownFields = reader.forEachTag { tag ->
            when (tag) {
              1 -> module = ProtoAdapter.STRING.decode(reader)
              2 -> runner = ProtoAdapter.STRING.decode(reader)
              3 -> deployment = ProtoAdapter.STRING.decode(reader)
              4 -> endpoint = ProtoAdapter.STRING.decode(reader)
              else -> reader.readUnknownField(tag)
            }
          }
          return Route(
            module = module,
            runner = runner,
            deployment = deployment,
            endpoint = endpoint,
            unknownFields = unknownFields
          )
        }

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

      private const val serialVersionUID: Long = 0L
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy