final case class FieldDescriptorProto(name: scala.Option[String] = _root_.scala.None, number: scala.Option[Int] = _root_.scala.None, label: scala.Option[Label] = _root_.scala.None, type: scala.Option[FieldDescriptorProto.Type] = _root_.scala.None, typeName: scala.Option[String] = _root_.scala.None, extendee: scala.Option[String] = _root_.scala.None, defaultValue: scala.Option[String] = _root_.scala.None, oneofIndex: scala.Option[Int] = _root_.scala.None, jsonName: scala.Option[String] = _root_.scala.None, options: scala.Option[FieldOptions] = _root_.scala.None, proto3Optional: scala.Option[Boolean] = _root_.scala.None, unknownFields: scalapb.UnknownFieldSet = ...) extends scalapb.GeneratedMessage with Updatable[FieldDescriptorProto] with Product with Serializable
Describes a field within a message.
- type
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.
- typeName
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).
- extendee
For extensions, this is the name of the type being extended. It is resolved in the same manner as type_name.
- defaultValue
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.
- oneofIndex
If set, gives the index of a oneof in the containing type's oneof_decl list. This field is a member of that oneof.
- jsonName
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.
- proto3Optional
If true, this is a proto3 "optional". When a proto3 field is optional, it tracks presence regardless of field type. When proto3_optional is true, this field must belong to a oneof to signal to old proto3 clients that presence is tracked for this field. This oneof is known as a "synthetic" oneof, and this field must be its sole member (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs exist in the descriptor only, and do not generate any API. Synthetic oneofs must be ordered after all "real" oneofs. For message fields, proto3_optional doesn't create any semantic change, since non-repeated message fields always track presence. However it still indicates the semantic detail of whether the user wrote "optional" or not. This can be useful for round-tripping the .proto file. For consistency we give message fields a synthetic oneof also, even though it is not required to track presence. This is especially important because the parser can't tell if a field is a message or an enum, so it must always create a synthetic oneof. Proto2 optional fields do not set this flag, because they already indicate optional with
LABEL_OPTIONAL
.
- Annotations
- @SerialVersionUID()
- Alphabetic
- By Inheritance
- FieldDescriptorProto
- Updatable
- GeneratedMessage
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
FieldDescriptorProto(name: scala.Option[String] = _root_.scala.None, number: scala.Option[Int] = _root_.scala.None, label: scala.Option[Label] = _root_.scala.None, type: scala.Option[FieldDescriptorProto.Type] = _root_.scala.None, typeName: scala.Option[String] = _root_.scala.None, extendee: scala.Option[String] = _root_.scala.None, defaultValue: scala.Option[String] = _root_.scala.None, oneofIndex: scala.Option[Int] = _root_.scala.None, jsonName: scala.Option[String] = _root_.scala.None, options: scala.Option[FieldOptions] = _root_.scala.None, proto3Optional: scala.Option[Boolean] = _root_.scala.None, unknownFields: scalapb.UnknownFieldSet = ...)
- type
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.
- typeName
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).
- extendee
For extensions, this is the name of the type being extended. It is resolved in the same manner as type_name.
- defaultValue
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.
- oneofIndex
If set, gives the index of a oneof in the containing type's oneof_decl list. This field is a member of that oneof.
- jsonName
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.
- proto3Optional
If true, this is a proto3 "optional". When a proto3 field is optional, it tracks presence regardless of field type. When proto3_optional is true, this field must belong to a oneof to signal to old proto3 clients that presence is tracked for this field. This oneof is known as a "synthetic" oneof, and this field must be its sole member (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs exist in the descriptor only, and do not generate any API. Synthetic oneofs must be ordered after all "real" oneofs. For message fields, proto3_optional doesn't create any semantic change, since non-repeated message fields always track presence. However it still indicates the semantic detail of whether the user wrote "optional" or not. This can be useful for round-tripping the .proto file. For consistency we give message fields a synthetic oneof also, even though it is not required to track presence. This is especially important because the parser can't tell if a field is a message or an enum, so it must always create a synthetic oneof. Proto2 optional fields do not set this flag, because they already indicate optional with
LABEL_OPTIONAL
.
Value Members
-
final
def
!=(arg0: scala.Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: scala.Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clearDefaultValue: FieldDescriptorProto
- def clearExtendee: FieldDescriptorProto
- def clearJsonName: FieldDescriptorProto
- def clearLabel: FieldDescriptorProto
- def clearName: FieldDescriptorProto
- def clearNumber: FieldDescriptorProto
- def clearOneofIndex: FieldDescriptorProto
- def clearOptions: FieldDescriptorProto
- def clearProto3Optional: FieldDescriptorProto
- def clearType: FieldDescriptorProto
- def clearTypeName: FieldDescriptorProto
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
companion: FieldDescriptorProto.type
- Definition Classes
- FieldDescriptorProto → GeneratedMessage
- val defaultValue: scala.Option[String]
- def discardUnknownFields: FieldDescriptorProto
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val extendee: scala.Option[String]
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getDefaultValue: String
- def getExtendee: String
-
def
getField(__field: FieldDescriptor): PValue
- Definition Classes
- FieldDescriptorProto → GeneratedMessage
-
def
getFieldByNumber(__fieldNumber: Int): scala.Any
- Definition Classes
- FieldDescriptorProto → GeneratedMessage
- def getJsonName: String
- def getLabel: Label
- def getName: String
- def getNumber: Int
- def getOneofIndex: Int
- def getOptions: FieldOptions
- def getProto3Optional: Boolean
- def getType: FieldDescriptorProto.Type
- def getTypeName: String
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val jsonName: scala.Option[String]
- val label: scala.Option[Label]
- val name: scala.Option[String]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val number: scala.Option[Int]
- val oneofIndex: scala.Option[Int]
- val options: scala.Option[FieldOptions]
- val proto3Optional: scala.Option[Boolean]
-
def
serializedSize: Int
- Definition Classes
- FieldDescriptorProto → GeneratedMessage
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
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
- Definition Classes
- 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
- Definition Classes
- GeneratedMessage
-
final
def
toPMessage: PMessage
- Definition Classes
- GeneratedMessage
-
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.
- Definition Classes
- FieldDescriptorProto → GeneratedMessage
- val type: scala.Option[FieldDescriptorProto.Type]
- val typeName: scala.Option[String]
- val unknownFields: scalapb.UnknownFieldSet
-
def
update(ms: (Lens[FieldDescriptorProto, FieldDescriptorProto]) ⇒ Mutation[FieldDescriptorProto]*): FieldDescriptorProto
- Definition Classes
- Updatable
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def withDefaultValue(__v: String): FieldDescriptorProto
- def withExtendee(__v: String): FieldDescriptorProto
- def withJsonName(__v: String): FieldDescriptorProto
- def withLabel(__v: Label): FieldDescriptorProto
- def withName(__v: String): FieldDescriptorProto
- def withNumber(__v: Int): FieldDescriptorProto
- def withOneofIndex(__v: Int): FieldDescriptorProto
- def withOptions(__v: FieldOptions): FieldDescriptorProto
- def withProto3Optional(__v: Boolean): FieldDescriptorProto
- def withType(__v: FieldDescriptorProto.Type): FieldDescriptorProto
- def withTypeName(__v: String): FieldDescriptorProto
- def withUnknownFields(__v: scalapb.UnknownFieldSet): FieldDescriptorProto
-
final
def
writeDelimitedTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
-
def
writeTo(_output__: CodedOutputStream): Unit
Serializes the message into the given coded output stream
Serializes the message into the given coded output stream
- Definition Classes
- FieldDescriptorProto → GeneratedMessage
-
final
def
writeTo(output: OutputStream): Unit
Serializes the message into the given output stream
Serializes the message into the given output stream
- Definition Classes
- GeneratedMessage