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

scala.googleapis.bigquery.ExternalCatalogTableOptions.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 ExternalCatalogTableOptions(
    /** Optional. The connection specifying the credentials to be used to read external storage, such as Azure Blob, Cloud Storage, or S3. The connection is needed to read the open source table from BigQuery Engine. The connection_id can have the form `..` or `projects//locations//connections/`.
      */
    connectionId: Option[String] = None,
    /** Optional. A map of key value pairs defining the parameters and properties of the open source table. Corresponds with hive meta store table parameters. Maximum size of 4Mib.
      */
    parameters: Option[Map[String, String]] = None,
    /** Optional. A storage descriptor containing information about the physical storage of this table.
      */
    storageDescriptor: Option[StorageDescriptor] = None,
)
object ExternalCatalogTableOptions {
  implicit val encoder: Encoder[
    ExternalCatalogTableOptions
  ] = Encoder.instance { x =>
    Json.obj(
      "connectionId" := x.connectionId,
      "parameters" := x.parameters,
      "storageDescriptor" := x.storageDescriptor,
    )
  }
  implicit val decoder: Decoder[
    ExternalCatalogTableOptions
  ] = Decoder.instance { c =>
    for {
      v0 <- c.get[Option[String]]("connectionId")
      v1 <- c.get[Option[Map[String, String]]]("parameters")
      v2 <- c.get[Option[StorageDescriptor]]("storageDescriptor")
    } yield ExternalCatalogTableOptions(v0, v1, v2)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy