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

commonMain.protokt.v1.google.rpc.code.kt Maven / Gradle / Ivy

// Generated by protokt version 1.0.0-alpha.8. Do not modify.
// Source: google/rpc/code.proto
@file:Suppress("DEPRECATION")

package protokt.v1.google.rpc

import protokt.v1.KtEnum
import protokt.v1.KtEnumDeserializer
import kotlin.Int
import kotlin.String
import kotlin.Suppress

public sealed class Code(
  override val `value`: Int,
  override val name: String
) : KtEnum() {
  public object OK : Code(0, "OK")

  public object CANCELLED : Code(1, "CANCELLED")

  public object UNKNOWN : Code(2, "UNKNOWN")

  public object INVALID_ARGUMENT : Code(3, "INVALID_ARGUMENT")

  public object DEADLINE_EXCEEDED : Code(4, "DEADLINE_EXCEEDED")

  public object NOT_FOUND : Code(5, "NOT_FOUND")

  public object ALREADY_EXISTS : Code(6, "ALREADY_EXISTS")

  public object PERMISSION_DENIED : Code(7, "PERMISSION_DENIED")

  public object UNAUTHENTICATED : Code(16, "UNAUTHENTICATED")

  public object RESOURCE_EXHAUSTED : Code(8, "RESOURCE_EXHAUSTED")

  public object FAILED_PRECONDITION : Code(9, "FAILED_PRECONDITION")

  public object ABORTED : Code(10, "ABORTED")

  public object OUT_OF_RANGE : Code(11, "OUT_OF_RANGE")

  public object UNIMPLEMENTED : Code(12, "UNIMPLEMENTED")

  public object INTERNAL : Code(13, "INTERNAL")

  public object UNAVAILABLE : Code(14, "UNAVAILABLE")

  public object DATA_LOSS : Code(15, "DATA_LOSS")

  public class UNRECOGNIZED(
    `value`: Int
  ) : Code(value, "UNRECOGNIZED")

  public companion object Deserializer : KtEnumDeserializer {
    override fun from(`value`: Int): Code =
      when (value) {
        0 -> OK
        1 -> CANCELLED
        2 -> UNKNOWN
        3 -> INVALID_ARGUMENT
        4 -> DEADLINE_EXCEEDED
        5 -> NOT_FOUND
        6 -> ALREADY_EXISTS
        7 -> PERMISSION_DENIED
        16 -> UNAUTHENTICATED
        8 -> RESOURCE_EXHAUSTED
        9 -> FAILED_PRECONDITION
        10 -> ABORTED
        11 -> OUT_OF_RANGE
        12 -> UNIMPLEMENTED
        13 -> INTERNAL
        14 -> UNAVAILABLE
        15 -> DATA_LOSS
        else -> UNRECOGNIZED(value)
      }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy