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

protokt.com.google.api.error_reason.kt Maven / Gradle / Ivy

There is a newer version: 0.12.1
Show newest version
// Generated by protokt version 0.12.0. Do not modify.
// Source: google/api/error_reason.proto
package com.google.api

import com.toasttab.protokt.rt.KtEnum
import com.toasttab.protokt.rt.KtEnumDeserializer
import kotlin.Int
import kotlin.String

sealed class ErrorReason(
    override val `value`: Int,
    override val name: String,
) : KtEnum() {
    object ERROR_REASON_UNSPECIFIED : ErrorReason(0, "ERROR_REASON_UNSPECIFIED")

    object SERVICE_DISABLED : ErrorReason(1, "SERVICE_DISABLED")

    object BILLING_DISABLED : ErrorReason(2, "BILLING_DISABLED")

    object API_KEY_INVALID : ErrorReason(3, "API_KEY_INVALID")

    object API_KEY_SERVICE_BLOCKED : ErrorReason(4, "API_KEY_SERVICE_BLOCKED")

    object API_KEY_HTTP_REFERRER_BLOCKED : ErrorReason(7, "API_KEY_HTTP_REFERRER_BLOCKED")

    object API_KEY_IP_ADDRESS_BLOCKED : ErrorReason(8, "API_KEY_IP_ADDRESS_BLOCKED")

    object API_KEY_ANDROID_APP_BLOCKED : ErrorReason(9, "API_KEY_ANDROID_APP_BLOCKED")

    object API_KEY_IOS_APP_BLOCKED : ErrorReason(13, "API_KEY_IOS_APP_BLOCKED")

    object RATE_LIMIT_EXCEEDED : ErrorReason(5, "RATE_LIMIT_EXCEEDED")

    object RESOURCE_QUOTA_EXCEEDED : ErrorReason(6, "RESOURCE_QUOTA_EXCEEDED")

    object LOCATION_TAX_POLICY_VIOLATED : ErrorReason(10, "LOCATION_TAX_POLICY_VIOLATED")

    object USER_PROJECT_DENIED : ErrorReason(11, "USER_PROJECT_DENIED")

    object CONSUMER_SUSPENDED : ErrorReason(12, "CONSUMER_SUSPENDED")

    object CONSUMER_INVALID : ErrorReason(14, "CONSUMER_INVALID")

    object SECURITY_POLICY_VIOLATED : ErrorReason(15, "SECURITY_POLICY_VIOLATED")

    object ACCESS_TOKEN_EXPIRED : ErrorReason(16, "ACCESS_TOKEN_EXPIRED")

    object ACCESS_TOKEN_SCOPE_INSUFFICIENT : ErrorReason(17,
            "ACCESS_TOKEN_SCOPE_INSUFFICIENT")

    object ACCOUNT_STATE_INVALID : ErrorReason(18, "ACCOUNT_STATE_INVALID")

    object ACCESS_TOKEN_TYPE_UNSUPPORTED : ErrorReason(19, "ACCESS_TOKEN_TYPE_UNSUPPORTED")

    class UNRECOGNIZED(
        `value`: Int,
    ) : ErrorReason(value, "UNRECOGNIZED")

    companion object Deserializer : KtEnumDeserializer {
        override fun from(`value`: Int): ErrorReason = when (value) {
          0 -> ERROR_REASON_UNSPECIFIED
          1 -> SERVICE_DISABLED
          2 -> BILLING_DISABLED
          3 -> API_KEY_INVALID
          4 -> API_KEY_SERVICE_BLOCKED
          7 -> API_KEY_HTTP_REFERRER_BLOCKED
          8 -> API_KEY_IP_ADDRESS_BLOCKED
          9 -> API_KEY_ANDROID_APP_BLOCKED
          13 -> API_KEY_IOS_APP_BLOCKED
          5 -> RATE_LIMIT_EXCEEDED
          6 -> RESOURCE_QUOTA_EXCEEDED
          10 -> LOCATION_TAX_POLICY_VIOLATED
          11 -> USER_PROJECT_DENIED
          12 -> CONSUMER_SUSPENDED
          14 -> CONSUMER_INVALID
          15 -> SECURITY_POLICY_VIOLATED
          16 -> ACCESS_TOKEN_EXPIRED
          17 -> ACCESS_TOKEN_SCOPE_INSUFFICIENT
          18 -> ACCOUNT_STATE_INVALID
          19 -> ACCESS_TOKEN_TYPE_UNSUPPORTED
          else -> UNRECOGNIZED(value)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy