Message in google.protobuf
Field
google.protobuf.Field
A single field of a message type.
New usages of this message as an alternative to FieldDescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.
Fields
| Field | Type | Number | Description |
|---|---|---|---|
| kind | Kind | 1 | The field type. |
| cardinality | Cardinality | 2 | The field cardinality. |
| number | int32 | 3 | The field number. |
| name | string | 4 | The field name. |
| type_url | string | 6 | The field type URL, without the scheme, for message or enumeration
types. Example: |
| oneof_index | int32 | 7 | The index of the field type in |
| packed | bool | 8 | Whether to use alternative packed wire representation. |
| options | repeatedOption | 9 | The protocol buffer options. |
| json_name | string | 10 | The field JSON name. |
| default_value | string | 11 | The string value of the default value of this field. Proto2 syntax only. |
Nested enums
- KindBasic field types.
- CardinalityWhether a field is optional, required, or repeated.
Used by
Defined in google/protobuf/type.proto