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

scala.googleapis.bigquery.DatasetStorageBillingModel.scala Maven / Gradle / Ivy

There is a newer version: 0.4.5-v2-20240905
Show newest version
package googleapis.bigquery

import io.circe._

sealed abstract class DatasetStorageBillingModel(val value: String)
    extends Product
    with Serializable
object DatasetStorageBillingModel {

  /** Value not set.
    */
  case object STORAGE_BILLING_MODEL_UNSPECIFIED
      extends DatasetStorageBillingModel("STORAGE_BILLING_MODEL_UNSPECIFIED")

  /** Billing for logical bytes.
    */
  case object LOGICAL extends DatasetStorageBillingModel("LOGICAL")

  /** Billing for physical bytes.
    */
  case object PHYSICAL extends DatasetStorageBillingModel("PHYSICAL")
  val values = List(STORAGE_BILLING_MODEL_UNSPECIFIED, LOGICAL, PHYSICAL)
  def fromString(input: String): Either[String, DatasetStorageBillingModel] = values
    .find(_.value == input)
    .toRight(s"'$input' was not a valid value for DatasetStorageBillingModel")
  implicit val decoder: Decoder[DatasetStorageBillingModel] =
    Decoder[String].emap(s => fromString(s))
  implicit val encoder: Encoder[DatasetStorageBillingModel] = Encoder[String].contramap(_.value)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy