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

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

There is a newer version: 0.6.1-v2-20241111
Show newest version
package googleapis.bigquery

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

final case class BigLakeConfiguration(
    /** Required. The connection specifying the credentials to be used to read and write to external storage, such as Cloud Storage. The connection_id can have the form `{project}.{location}.{connection_id}` or `projects/{project}/locations/{location}/connections/{connection_id}".
      */
    connectionId: Option[String] = None,
    /** Required. The file format the table data is stored in.
      */
    fileFormat: Option[BigLakeConfigurationFileFormat] = None,
    /** Required. The fully qualified location prefix of the external folder where table data is stored. The '\*' wildcard character is not allowed. The URI should be in the format `gs://bucket/path_to_table/`
      */
    storageUri: Option[String] = None,
    /** Required. The table format the metadata only snapshots are stored in.
      */
    tableFormat: Option[BigLakeConfigurationTableFormat] = None,
)
object BigLakeConfiguration {
  implicit val encoder: Encoder[BigLakeConfiguration] = Encoder.instance { x =>
    Json.obj(
      "connectionId" := x.connectionId,
      "fileFormat" := x.fileFormat,
      "storageUri" := x.storageUri,
      "tableFormat" := x.tableFormat,
    )
  }
  implicit val decoder: Decoder[BigLakeConfiguration] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[String]]("connectionId")
      v1 <- c.get[Option[BigLakeConfigurationFileFormat]]("fileFormat")
      v2 <- c.get[Option[String]]("storageUri")
      v3 <- c.get[Option[BigLakeConfigurationTableFormat]]("tableFormat")
    } yield BigLakeConfiguration(v0, v1, v2, v3)

  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy