Field

data class Field(val namespaces: List<String>, val location: Location, val label: Field.Label?, val name: String, val documentation: String, val tag: Int, val default: String?, elementType: String, val options: Options, val isExtension: Boolean, val isOneOf: Boolean, val declaredJsonName: String?)

Constructors

Link copied to clipboard
constructor(namespaces: List<String>, location: Location, label: Field.Label?, name: String, documentation: String, tag: Int, default: String?, elementType: String, options: Options, isExtension: Boolean, isOneOf: Boolean, declaredJsonName: String?)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

May be null for proto3 fields, one-of's, or maps.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The namespaces in which the field is defined. For top-level extensions in a file that has no package declaration, this may be empty. For normal fields and extensions nested inside a message, the first entry will always be the package name, which might be the empty string if defined in a file that has no package declaration. Subsequent entries will be the names of enclosing messages, outer-most to inner-most.

Link copied to clipboard
Link copied to clipboard

Returns the package in which this field is defined. If the file that defined this field has no package declaration, returns the empty string.

Link copied to clipboard

Returns this field's name, prefixed with its namespaces. Uniquely identifies extension fields, such as in options.

Link copied to clipboard
val tag: Int
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun link(linker: Linker)
Link copied to clipboard
fun linkOptions(linker: Linker, syntaxRules: SyntaxRules, validate: Boolean)
Link copied to clipboard
fun retainAll(schema: Schema, markSet: MarkSet, enclosingType: ProtoType): Field?
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun validate(linker: Linker, syntaxRules: SyntaxRules)