ProtoValue

nscn.polaris2.protoc.runtime.ProtoValue
See theProtoValue companion object
enum ProtoValue

The Scala shape of google.protobuf.Value: a JSON-like tree.

Struct, Value and ListValue exist in protobuf to carry dynamically typed data, so surfacing them as generated messages produces exactly the code a caller does not want to write. This ADT is what those three map to by default.

Attributes

Companion
object
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

final case class Arr(values: Vector[ProtoValue])
final case class Bool(value: Boolean)
case Null extends ProtoValue
final case class Number(value: Double)
final case class Obj(fields: Map[String, ProtoValue])
final case class Str(value: String)

Value members

Concrete methods

def apply(key: String): Option[ProtoValue]
Extension method from ProtoValue

Looks a key up in an Obj; None for any other shape.

Looks a key up in an Obj; None for any other shape.

Attributes

def asArr: Option[Vector[ProtoValue]]
Extension method from ProtoValue
def asBoolean: Option[Boolean]
Extension method from ProtoValue
def asDouble: Option[Double]
Extension method from ProtoValue
def asObj: Option[Map[String, ProtoValue]]
Extension method from ProtoValue
def asString: Option[String]
Extension method from ProtoValue
def isNull: Boolean
Extension method from ProtoValue