Collection

scalapb.options.Collection
See theCollection companion object
final case class Collection(`type`: Option[String], nonEmpty: Option[Boolean], adapter: Option[String], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[Collection]

Represents a custom Collection type in Scala. This allows ScalaPB to integrate with collection types that are different enough from the ones in the standard library.

Value parameters

adapter

An Adapter is a Scala object available at runtime that provides certain static methods that can operate on this collection type.

nonEmpty

Set to true if this collection type is not allowed to be empty, for example cats.data.NonEmptyList. When true, ScalaPB will not generate clearX for the repeated field and not provide a default argument in the constructor.

type

Type of the collection

Attributes

Companion
object
Graph
Supertypes
trait Updatable[Collection]
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def companion: Collection.type
def getAdapter: String
def getField(`__field`: FieldDescriptor): PValue
def getFieldByNumber(`__fieldNumber`: Int): Any
def getNonEmpty: Boolean
def getType: String
override def serializedSize: Int

Attributes

Definition Classes
def toProtoString: String

Returns a human-readable ASCII format representation of this message.

Returns a human-readable ASCII format representation of this message.

The original message can be decoded from this format by using fromAscii on the companion object.

Attributes

Returns

human-readable representation of this message.

def withAdapter(`__v`: String): Collection
def withNonEmpty(`__v`: Boolean): Collection
def withType(`__v`: String): Collection
def writeTo(`_output__`: CodedOutputStream): Unit

Serializes the message into the given coded output stream

Serializes the message into the given coded output stream

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def toByteArray: Array[Byte]

Serializes the message and returns a byte array containing its raw bytes

Serializes the message and returns a byte array containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
final def toByteString: ByteString

Serializes the message and returns a ByteString containing its raw bytes

Serializes the message and returns a ByteString containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
final def toPMessage: PMessage

Attributes

Inherited from:
GeneratedMessage
def update(ms: (Lens[Collection, Collection]) => () => Collection*): Collection

Attributes

Inherited from:
Updatable
final def writeDelimitedTo(output: OutputStream): Unit

Attributes

Inherited from:
GeneratedMessage
final def writeTo(output: OutputStream): Unit

Serializes the message into the given output stream

Serializes the message into the given output stream

Attributes

Inherited from:
GeneratedMessage