
scala.googleapis.bigquery.SearchStatistics.scala Maven / Gradle / Ivy
package googleapis.bigquery
import io.circe._
import io.circe.syntax._
final case class SearchStatistics(
/** When `indexUsageMode` is `UNUSED` or `PARTIALLY_USED`, this field explains why indexes were not used in all or part of the search query. If `indexUsageMode` is `FULLY_USED`, this field is not populated.
*/
indexUnusedReasons: Option[List[IndexUnusedReason]] = None,
/** Specifies the index usage mode for the query.
*/
indexUsageMode: Option[SearchStatisticsIndexUsageMode] = None,
)
object SearchStatistics {
implicit val encoder: Encoder[SearchStatistics] = Encoder.instance { x =>
Json.obj(
"indexUnusedReasons" := x.indexUnusedReasons,
"indexUsageMode" := x.indexUsageMode,
)
}
implicit val decoder: Decoder[SearchStatistics] = Decoder.instance { c =>
for {
v0 <- c.get[Option[List[IndexUnusedReason]]]("indexUnusedReasons")
v1 <- c.get[Option[SearchStatisticsIndexUsageMode]]("indexUsageMode")
} yield SearchStatistics(v0, v1)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy