
scala.googleapis.bigquery.ExternalDataConfigurationMetadataCacheMode.scala Maven / Gradle / Ivy
package googleapis.bigquery
import io.circe._
sealed abstract class ExternalDataConfigurationMetadataCacheMode(val value: String)
extends Product
with Serializable
object ExternalDataConfigurationMetadataCacheMode {
/** Unspecified metadata cache mode.
*/
case object METADATA_CACHE_MODE_UNSPECIFIED
extends ExternalDataConfigurationMetadataCacheMode("METADATA_CACHE_MODE_UNSPECIFIED")
/** Set this mode to trigger automatic background refresh of metadata cache from the external source. Queries will use the latest available cache version within the table's maxStaleness interval.
*/
case object AUTOMATIC extends ExternalDataConfigurationMetadataCacheMode("AUTOMATIC")
/** Set this mode to enable triggering manual refresh of the metadata cache from external source. Queries will use the latest manually triggered cache version within the table's maxStaleness interval.
*/
case object MANUAL extends ExternalDataConfigurationMetadataCacheMode("MANUAL")
val values = List(METADATA_CACHE_MODE_UNSPECIFIED, AUTOMATIC, MANUAL)
def fromString(input: String): Either[String, ExternalDataConfigurationMetadataCacheMode] = values
.find(_.value == input)
.toRight(s"'$input' was not a valid value for ExternalDataConfigurationMetadataCacheMode")
implicit val decoder: Decoder[ExternalDataConfigurationMetadataCacheMode] =
Decoder[String].emap(s => fromString(s))
implicit val encoder: Encoder[ExternalDataConfigurationMetadataCacheMode] =
Encoder[String].contramap(_.value)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy