FieldOptions

final case class FieldOptions(`type`: Option[String], scalaName: Option[String], collectionType: Option[String], collection: Option[Collection], keyType: Option[String], valueType: Option[String], annotations: Seq[String], mapType: Option[String], noDefaultValueInConstructor: Option[Boolean], noBox: Option[Boolean], required: Option[Boolean], unknownFields: UnknownFieldSet) extends GeneratedMessage with Updatable[FieldOptions] with ExtendableMessage[FieldOptions]
Value parameters:
annotations

Custom annotations to add to the field.

collectionType

Can be specified only if this field is repeated. If unspecified, it falls back to the file option named collection_type, which defaults to scala.collection.Seq.

keyType

If the field is a map, you can specify custom Scala types for the key or value.

mapType

Can be specified only if this field is a map. If unspecified, it falls back to the file option named map_type which defaults to scala.collection.immutable.Map

noBox

Do not box this value in Option[T]. If set, this overrides MessageOptions.no_box

noDefaultValueInConstructor

If true, no default value will be generated for this field in the message constructor. If this field is set, it has the highest precedence and overrides the values at the message-level and file-level.

required

Like no_box it does not box a value in Option[T], but also fails parsing when a value is not provided. This enables to emulate required fields in proto3.

Companion:
object
trait Updatable[FieldOptions]
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def addAllAnnotations(`__vs`: Iterable[String]): FieldOptions
def addAnnotations(`__vs`: String*): FieldOptions
def getCollectionType: String
def getFieldByNumber(`__fieldNumber`: Int): Any
def getKeyType: String
def getMapType: String
def getNoBox: Boolean
def getRequired: Boolean
def getScalaName: String
def getType: String
def getValueType: String
override def serializedSize: Int
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.

Returns:

human-readable representation of this message.

def withAnnotations(`__v`: Seq[String]): FieldOptions
def withCollectionType(`__v`: String): FieldOptions
def withKeyType(`__v`: String): FieldOptions
def withMapType(`__v`: String): FieldOptions
def withNoBox(`__v`: Boolean): FieldOptions
def withRequired(`__v`: Boolean): FieldOptions
def withScalaName(`__v`: String): FieldOptions
def withType(`__v`: String): FieldOptions
def withValueType(`__v`: String): FieldOptions
def writeTo(`_output__`: CodedOutputStream): Unit

Serializes the message into the given coded output stream

Serializes the message into the given coded output stream

Inherited methods

def extension[T](generatedExtension: GeneratedExtension[FieldOptions, T]): T
Inherited from:
ExtendableMessage
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
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

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

Inherited from:
GeneratedMessage
final def toPMessage: PMessage
Inherited from:
GeneratedMessage
def update(ms: Lens[FieldOptions, FieldOptions] => () => FieldOptions*): A
Inherited from:
Updatable
def withExtension[T](generatedExtension: GeneratedExtension[FieldOptions, T])(value: T): A
Inherited from:
ExtendableMessage
final def writeDelimitedTo(output: OutputStream): Unit
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

Inherited from:
GeneratedMessage