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

scala.googleapis.bigquery.UserDefinedFunctionResource.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 UserDefinedFunctionResource(
    /** [Pick one] An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code.
      */
    inlineCode: Option[String] = None,
    /** [Pick one] A code resource to load from a Google Cloud Storage URI (gs://bucket/path).
      */
    resourceUri: Option[String] = None,
)
object UserDefinedFunctionResource {
  implicit val encoder: Encoder[
    UserDefinedFunctionResource
  ] = Encoder.instance { x =>
    Json.obj("inlineCode" := x.inlineCode, "resourceUri" := x.resourceUri)
  }
  implicit val decoder: Decoder[
    UserDefinedFunctionResource
  ] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[String]]("inlineCode")
      v1 <- c.get[Option[String]]("resourceUri")
    } yield UserDefinedFunctionResource(v0, v1)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy