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

scala.googleapis.bigquery.ScriptStackFrame.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 ScriptStackFrame(
    /** Output only. One-based start line.
      */
    startLine: Option[Int] = None,
    /** Output only. One-based end column.
      */
    endColumn: Option[Int] = None,
    /** Output only. Name of the active procedure, empty if in a top-level script.
      */
    procedureId: Option[String] = None,
    /** Output only. Text of the current statement/expression.
      */
    text: Option[String] = None,
    /** Output only. One-based end line.
      */
    endLine: Option[Int] = None,
    /** Output only. One-based start column.
      */
    startColumn: Option[Int] = None,
)
object ScriptStackFrame {
  implicit val encoder: Encoder[ScriptStackFrame] = Encoder.instance { x =>
    Json.obj(
      "startLine" := x.startLine,
      "endColumn" := x.endColumn,
      "procedureId" := x.procedureId,
      "text" := x.text,
      "endLine" := x.endLine,
      "startColumn" := x.startColumn,
    )
  }
  implicit val decoder: Decoder[ScriptStackFrame] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[Int]]("startLine")
      v1 <- c.get[Option[Int]]("endColumn")
      v2 <- c.get[Option[String]]("procedureId")
      v3 <- c.get[Option[String]]("text")
      v4 <- c.get[Option[Int]]("endLine")
      v5 <- c.get[Option[Int]]("startColumn")
    } yield ScriptStackFrame(v0, v1, v2, v3, v4, v5)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy