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

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

There is a newer version: 0.4.5-v2-20240905
Show newest version
package googleapis.bigquery

import io.circe._

sealed abstract class TableReplicationInfoReplicationStatus(val value: String)
    extends Product
    with Serializable
object TableReplicationInfoReplicationStatus {

  /** Default value.
    */
  case object REPLICATION_STATUS_UNSPECIFIED
      extends TableReplicationInfoReplicationStatus("REPLICATION_STATUS_UNSPECIFIED")

  /** Replication is Active with no errors.
    */
  case object ACTIVE extends TableReplicationInfoReplicationStatus("ACTIVE")

  /** Source object is deleted.
    */
  case object SOURCE_DELETED extends TableReplicationInfoReplicationStatus("SOURCE_DELETED")

  /** Source revoked replication permissions.
    */
  case object PERMISSION_DENIED extends TableReplicationInfoReplicationStatus("PERMISSION_DENIED")

  /** Source configuration doesn’t allow replication.
    */
  case object UNSUPPORTED_CONFIGURATION
      extends TableReplicationInfoReplicationStatus("UNSUPPORTED_CONFIGURATION")
  val values = List(
    REPLICATION_STATUS_UNSPECIFIED,
    ACTIVE,
    SOURCE_DELETED,
    PERMISSION_DENIED,
    UNSUPPORTED_CONFIGURATION,
  )
  def fromString(input: String): Either[String, TableReplicationInfoReplicationStatus] = values
    .find(_.value == input)
    .toRight(s"'$input' was not a valid value for TableReplicationInfoReplicationStatus")
  implicit val decoder: Decoder[TableReplicationInfoReplicationStatus] =
    Decoder[String].emap(s => fromString(s))
  implicit val encoder: Encoder[TableReplicationInfoReplicationStatus] =
    Encoder[String].contramap(_.value)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy