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

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

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

import io.circe._
import io.circe.syntax._

final case class Entry(
    /** Number of items being predicted as this label.
      */
    itemCount: Option[Long] = None,
    /** The predicted label. For confidence_threshold > 0, we will also add an entry indicating the number of items under the confidence threshold.
      */
    predictedLabel: Option[String] = None,
)
object Entry {
  implicit val encoder: Encoder[Entry] = Encoder.instance { x =>
    Json.obj("itemCount" := x.itemCount, "predictedLabel" := x.predictedLabel)
  }
  implicit val decoder: Decoder[Entry] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[Long]]("itemCount")
      v1 <- c.get[Option[String]]("predictedLabel")
    } yield Entry(v0, v1)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy