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

com.lithic.api.models.VelocityLimitParamsPeriodWindow.kt Maven / Gradle / Ivy

Go to download

The Lithic Developer API is designed to provide a predictable programmatic interface for accessing your Lithic account through an API and transaction webhooks. Note that your API key is a secret and should be treated as such. Don't share it with anyone, including us. We will never ask you for it.

There is a newer version: 0.71.0
Show newest version
// File generated from our OpenAPI spec by Stainless.

package com.lithic.api.models

import com.fasterxml.jackson.annotation.JsonCreator
import com.lithic.api.core.Enum
import com.lithic.api.core.JsonField
import com.lithic.api.core.JsonValue
import com.lithic.api.errors.LithicInvalidDataException

class VelocityLimitParamsPeriodWindow
@JsonCreator
private constructor(
    private val value: JsonField,
) : Enum {

    @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value

    override fun equals(other: Any?): Boolean {
        if (this === other) {
            return true
        }

        return /* spotless:off */ other is VelocityLimitParamsPeriodWindow && this.value == other.value /* spotless:on */
    }

    override fun hashCode() = value.hashCode()

    override fun toString() = value.toString()

    companion object {

        @JvmField val DAY = VelocityLimitParamsPeriodWindow(JsonField.of("DAY"))

        @JvmField val MONTH = VelocityLimitParamsPeriodWindow(JsonField.of("MONTH"))

        @JvmStatic fun of(value: String) = VelocityLimitParamsPeriodWindow(JsonField.of(value))
    }

    enum class Known {
        DAY,
        MONTH,
    }

    enum class Value {
        DAY,
        MONTH,
        _UNKNOWN,
    }

    fun value(): Value =
        when (this) {
            DAY -> Value.DAY
            MONTH -> Value.MONTH
            else -> Value._UNKNOWN
        }

    fun known(): Known =
        when (this) {
            DAY -> Known.DAY
            MONTH -> Known.MONTH
            else ->
                throw LithicInvalidDataException("Unknown VelocityLimitParamsPeriodWindow: $value")
        }

    fun asString(): String = _value().asStringOrThrow()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy