FieldDescriptorProto

Describes a field within a message.

Types

Link copied to clipboard
sealed class Label(val number: Int)
Link copied to clipboard
sealed class Type(val number: Int)

Properties

Link copied to clipboard
abstract val defaultValue: String?

For numeric types, contains the original text representation of the value. For booleans, "true" or "false". For strings, contains the default text contents (not escaped in any way). For bytes, contains the C escaped value. All bytes >= 128 are escaped.

Link copied to clipboard
abstract val extendee: String?

For extensions, this is the name of the type being extended. It is resolved in the same manner as type_name.

Link copied to clipboard
abstract val jsonName: String?

JSON name of this field. The value is set by protocol compiler. If the user has set a "json_name" option on this field, that option's value will be used. Otherwise, it's deduced from the field's name by converting it to camelCase.

Link copied to clipboard
Link copied to clipboard
abstract val name: String?
Link copied to clipboard
abstract val number: Int?
Link copied to clipboard
abstract val oneofIndex: Int?

If set, gives the index of a oneof in the containing type's oneof_decl list. This field is a member of that oneof.

Link copied to clipboard
abstract val options: FieldOptions
Link copied to clipboard
Link copied to clipboard
abstract val proto3Optional: Boolean?

If true, this is a proto3 "optional". When a proto3 field is optional, it tracks presence regardless of field type.

Link copied to clipboard

If type_name is set, this need not be set. If both this and type_name are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.

Link copied to clipboard
abstract val typeName: String?

For message and enum types, this is the name of the type. If the name starts with a '.', it is fully-qualified. Otherwise, C++-like scoping rules are used to find the type (i.e. first the nested types within this message are searched, then within the parent, on up to the root namespace).

Functions

Link copied to clipboard
fun FieldDescriptorProto.copy(body: ERROR CLASS: Symbol not found for FieldDescriptorProto.Builder.() -> Unit = {}): FieldDescriptorProto

Copies the original message, including unknown fields.