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()
Linear Supertypes
Updatable[FieldDescriptorProto], scalapb.GeneratedMessage, Serializable, Serializable, Product, Equals, AnyRef, scala.Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FieldDescriptorProto
  2. Updatable
  3. GeneratedMessage
  4. Serializable
  5. Serializable
  6. Product
  7. Equals
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. 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

  1. def clearDefaultValue: FieldDescriptorProto
  2. def clearExtendee: FieldDescriptorProto
  3. def clearJsonName: FieldDescriptorProto
  4. def clearLabel: FieldDescriptorProto
  5. def clearName: FieldDescriptorProto
  6. def clearNumber: FieldDescriptorProto
  7. def clearOneofIndex: FieldDescriptorProto
  8. def clearOptions: FieldDescriptorProto
  9. def clearProto3Optional: FieldDescriptorProto
  10. def clearType: FieldDescriptorProto
  11. def clearTypeName: FieldDescriptorProto
  12. def companion: FieldDescriptorProto.type
    Definition Classes
    FieldDescriptorProtoGeneratedMessage
  13. val defaultValue: scala.Option[String]
  14. def discardUnknownFields: FieldDescriptorProto
  15. val extendee: scala.Option[String]
  16. def getDefaultValue: String
  17. def getExtendee: String
  18. def getField(__field: FieldDescriptor): PValue
    Definition Classes
    FieldDescriptorProtoGeneratedMessage
  19. def getFieldByNumber(__fieldNumber: Int): scala.Any
    Definition Classes
    FieldDescriptorProtoGeneratedMessage
  20. def getJsonName: String
  21. def getLabel: Label
  22. def getName: String
  23. def getNumber: Int
  24. def getOneofIndex: Int
  25. def getOptions: FieldOptions
  26. def getProto3Optional: Boolean
  27. def getType: FieldDescriptorProto.Type
  28. def getTypeName: String
  29. val jsonName: scala.Option[String]
  30. val label: scala.Option[Label]
  31. val name: scala.Option[String]
  32. val number: scala.Option[Int]
  33. val oneofIndex: scala.Option[Int]
  34. val options: scala.Option[FieldOptions]
  35. val proto3Optional: scala.Option[Boolean]
  36. def serializedSize: Int
    Definition Classes
    FieldDescriptorProtoGeneratedMessage
  37. 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
  38. 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
  39. final def toPMessage: PMessage
    Definition Classes
    GeneratedMessage
  40. 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
    FieldDescriptorProtoGeneratedMessage
  41. val type: scala.Option[FieldDescriptorProto.Type]
  42. val typeName: scala.Option[String]
  43. val unknownFields: scalapb.UnknownFieldSet
  44. def update(ms: (Lens[FieldDescriptorProto, FieldDescriptorProto]) ⇒ Mutation[FieldDescriptorProto]*): FieldDescriptorProto
    Definition Classes
    Updatable
  45. def withDefaultValue(__v: String): FieldDescriptorProto
  46. def withExtendee(__v: String): FieldDescriptorProto
  47. def withJsonName(__v: String): FieldDescriptorProto
  48. def withLabel(__v: Label): FieldDescriptorProto
  49. def withName(__v: String): FieldDescriptorProto
  50. def withNumber(__v: Int): FieldDescriptorProto
  51. def withOneofIndex(__v: Int): FieldDescriptorProto
  52. def withOptions(__v: FieldOptions): FieldDescriptorProto
  53. def withProto3Optional(__v: Boolean): FieldDescriptorProto
  54. def withType(__v: FieldDescriptorProto.Type): FieldDescriptorProto
  55. def withTypeName(__v: String): FieldDescriptorProto
  56. def withUnknownFields(__v: scalapb.UnknownFieldSet): FieldDescriptorProto
  57. final def writeDelimitedTo(output: OutputStream): Unit
    Definition Classes
    GeneratedMessage
  58. 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
    FieldDescriptorProtoGeneratedMessage
  59. 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