com.google.protobuf.descriptor

FieldOptions

final case class FieldOptions(ctype: Option[CType] = scala.None, packed: Option[Boolean] = scala.None, jstype: Option[JSType] = scala.None, lazy: Option[Boolean] = scala.None, deprecated: Option[Boolean] = scala.None, weak: Option[Boolean] = scala.None, uninterpretedOption: Seq[UninterpretedOption] = scala.collection.Seq.empty[Nothing], unknownFields: scalapb.UnknownFieldSet = ...) extends scalapb.GeneratedMessage with scalapb.Message[FieldOptions] with Updatable[FieldOptions] with ExtendableMessage[FieldOptions] with Product with Serializable

ctype

The ctype option instructs the C++ code generator to use a different representation of the field than it normally would. See the specific options below. This option is not yet implemented in the open source release -- sorry, we'll try to include it in a future version!

packed

The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire. Rather than repeatedly writing the tag and type for each element, the entire array is encoded as a single length-delimited blob. In proto3, only explicit setting it to false will avoid using packed encoding.

jstype

The jstype option determines the JavaScript type used for values of the field. The option is permitted only for 64 bit integral and fixed types (int64, uint64, sint64, fixed64, sfixed64). By default these types are represented as JavaScript strings. This avoids loss of precision that can happen when a large value is converted to a floating point JavaScript numbers. Specifying JS_NUMBER for the jstype causes the generated JavaScript code to use the JavaScript "number" type instead of strings. This option is an enum to permit additional types to be added, e.g. goog.math.Integer.

lazy

Should this field be parsed lazily? Lazy applies only to message-type fields. It means that when the outer message is initially parsed, the inner message's contents will not be parsed but instead stored in encoded form. The inner message will actually be parsed when it is first accessed.

This is only a hint. Implementations are free to choose whether to use eager or lazy parsing regardless of the value of this option. However, setting this option true suggests that the protocol author believes that using lazy parsing on this field is worth the additional bookkeeping overhead typically needed to implement it.

This option does not affect the public interface of any generated code; all method signatures remain the same. Furthermore, thread-safety of the interface is not affected by this option; const methods remain safe to call from multiple threads concurrently, while non-const methods continue to require exclusive access.

Note that implementations may choose not to check required fields within a lazy sub-message. That is, calling IsInitialized() on the outer message may return true even if the inner message has missing required fields. This is necessary because otherwise the inner message would have to be parsed in order to perform the check, defeating the purpose of lazy parsing. An implementation which chooses not to check required fields must be consistent about it. That is, for any particular sub-message, the implementation must either *always* check its required fields, or *never* check its required fields, regardless of whether or not the message has been parsed.

deprecated

Is this field deprecated? Depending on the target platform, this can emit Deprecated annotations for accessors, or it will be completely ignored; in the very least, this is a formalization for deprecating fields.

weak

For Google-internal migration only. Do not use.

uninterpretedOption

The parser stores options it doesn't recognize here. See above.

Annotations
@SerialVersionUID( 0L )
Linear Supertypes
Product, Equals, ExtendableMessage[FieldOptions], Updatable[FieldOptions], scalapb.Message[FieldOptions], scalapb.GeneratedMessage, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FieldOptions
  2. Product
  3. Equals
  4. ExtendableMessage
  5. Updatable
  6. Message
  7. GeneratedMessage
  8. Serializable
  9. Serializable
  10. AnyRef
  11. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FieldOptions(ctype: Option[CType] = scala.None, packed: Option[Boolean] = scala.None, jstype: Option[JSType] = scala.None, lazy: Option[Boolean] = scala.None, deprecated: Option[Boolean] = scala.None, weak: Option[Boolean] = scala.None, uninterpretedOption: Seq[UninterpretedOption] = scala.collection.Seq.empty[Nothing], unknownFields: scalapb.UnknownFieldSet = ...)

    ctype

    The ctype option instructs the C++ code generator to use a different representation of the field than it normally would. See the specific options below. This option is not yet implemented in the open source release -- sorry, we'll try to include it in a future version!

    packed

    The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire. Rather than repeatedly writing the tag and type for each element, the entire array is encoded as a single length-delimited blob. In proto3, only explicit setting it to false will avoid using packed encoding.

    jstype

    The jstype option determines the JavaScript type used for values of the field. The option is permitted only for 64 bit integral and fixed types (int64, uint64, sint64, fixed64, sfixed64). By default these types are represented as JavaScript strings. This avoids loss of precision that can happen when a large value is converted to a floating point JavaScript numbers. Specifying JS_NUMBER for the jstype causes the generated JavaScript code to use the JavaScript "number" type instead of strings. This option is an enum to permit additional types to be added, e.g. goog.math.Integer.

    lazy

    Should this field be parsed lazily? Lazy applies only to message-type fields. It means that when the outer message is initially parsed, the inner message's contents will not be parsed but instead stored in encoded form. The inner message will actually be parsed when it is first accessed.

    This is only a hint. Implementations are free to choose whether to use eager or lazy parsing regardless of the value of this option. However, setting this option true suggests that the protocol author believes that using lazy parsing on this field is worth the additional bookkeeping overhead typically needed to implement it.

    This option does not affect the public interface of any generated code; all method signatures remain the same. Furthermore, thread-safety of the interface is not affected by this option; const methods remain safe to call from multiple threads concurrently, while non-const methods continue to require exclusive access.

    Note that implementations may choose not to check required fields within a lazy sub-message. That is, calling IsInitialized() on the outer message may return true even if the inner message has missing required fields. This is necessary because otherwise the inner message would have to be parsed in order to perform the check, defeating the purpose of lazy parsing. An implementation which chooses not to check required fields must be consistent about it. That is, for any particular sub-message, the implementation must either *always* check its required fields, or *never* check its required fields, regardless of whether or not the message has been parsed.

    deprecated

    Is this field deprecated? Depending on the target platform, this can emit Deprecated annotations for accessors, or it will be completely ignored; in the very least, this is a formalization for deprecating fields.

    weak

    For Google-internal migration only. Do not use.

    uninterpretedOption

    The parser stores options it doesn't recognize here. See above.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def addAllUninterpretedOption(__vs: TraversableOnce[UninterpretedOption]): FieldOptions

  7. def addUninterpretedOption(__vs: UninterpretedOption*): FieldOptions

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clearCtype: FieldOptions

  10. def clearDeprecated: FieldOptions

  11. def clearJstype: FieldOptions

  12. def clearLazy: FieldOptions

  13. def clearPacked: FieldOptions

  14. def clearUninterpretedOption: FieldOptions

  15. def clearWeak: FieldOptions

  16. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def companion: FieldOptions.type

    Definition Classes
    FieldOptionsGeneratedMessage
  18. val ctype: Option[CType]

    The ctype option instructs the C++ code generator to use a different representation of the field than it normally would.

    The ctype option instructs the C++ code generator to use a different representation of the field than it normally would. See the specific options below. This option is not yet implemented in the open source release -- sorry, we'll try to include it in a future version!

  19. val deprecated: Option[Boolean]

    Is this field deprecated? Depending on the target platform, this can emit Deprecated annotations for accessors, or it will be completely ignored; in the very least, this is a formalization for deprecating fields.

  20. def discardUnknownFields: FieldOptions

  21. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. def extension[T](generatedExtension: GeneratedExtension[FieldOptions, T]): T

    Definition Classes
    ExtendableMessage
  23. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  25. def getCtype: CType

  26. def getDeprecated: Boolean

  27. def getField(__field: FieldDescriptor): PValue

    Definition Classes
    FieldOptionsGeneratedMessage
  28. def getFieldByNumber(__fieldNumber: Int): Any

    Definition Classes
    FieldOptionsGeneratedMessage
  29. def getJstype: JSType

  30. def getLazy: Boolean

  31. def getPacked: Boolean

  32. def getWeak: Boolean

  33. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  34. val jstype: Option[JSType]

    The jstype option determines the JavaScript type used for values of the field.

    The jstype option determines the JavaScript type used for values of the field. The option is permitted only for 64 bit integral and fixed types (int64, uint64, sint64, fixed64, sfixed64). By default these types are represented as JavaScript strings. This avoids loss of precision that can happen when a large value is converted to a floating point JavaScript numbers. Specifying JS_NUMBER for the jstype causes the generated JavaScript code to use the JavaScript "number" type instead of strings. This option is an enum to permit additional types to be added, e.g. goog.math.Integer.

  35. val lazy: Option[Boolean]

    Should this field be parsed lazily? Lazy applies only to message-type fields.

    Should this field be parsed lazily? Lazy applies only to message-type fields. It means that when the outer message is initially parsed, the inner message's contents will not be parsed but instead stored in encoded form. The inner message will actually be parsed when it is first accessed.

    This is only a hint. Implementations are free to choose whether to use eager or lazy parsing regardless of the value of this option. However, setting this option true suggests that the protocol author believes that using lazy parsing on this field is worth the additional bookkeeping overhead typically needed to implement it.

    This option does not affect the public interface of any generated code; all method signatures remain the same. Furthermore, thread-safety of the interface is not affected by this option; const methods remain safe to call from multiple threads concurrently, while non-const methods continue to require exclusive access.

    Note that implementations may choose not to check required fields within a lazy sub-message. That is, calling IsInitialized() on the outer message may return true even if the inner message has missing required fields. This is necessary because otherwise the inner message would have to be parsed in order to perform the check, defeating the purpose of lazy parsing. An implementation which chooses not to check required fields must be consistent about it. That is, for any particular sub-message, the implementation must either *always* check its required fields, or *never* check its required fields, regardless of whether or not the message has been parsed.

  36. def mergeFrom(_input__: CodedInputStream): FieldOptions

    Definition Classes
    FieldOptionsMessage
  37. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  38. final def notify(): Unit

    Definition Classes
    AnyRef
  39. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  40. val packed: Option[Boolean]

    The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire.

    The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire. Rather than repeatedly writing the tag and type for each element, the entire array is encoded as a single length-delimited blob. In proto3, only explicit setting it to false will avoid using packed encoding.

  41. final def serializedSize: Int

    Definition Classes
    FieldOptionsGeneratedMessage
  42. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  43. def toByteArray: Array[Byte]

    Definition Classes
    GeneratedMessage
  44. def toByteString: ByteString

    Definition Classes
    GeneratedMessage
  45. def toPMessage: PMessage

    Definition Classes
    GeneratedMessage
  46. 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
    FieldOptionsGeneratedMessage
  47. val uninterpretedOption: Seq[UninterpretedOption]

    The parser stores options it doesn't recognize here.

    The parser stores options it doesn't recognize here. See above.

  48. val unknownFields: scalapb.UnknownFieldSet

    Definition Classes
    FieldOptionsExtendableMessage
  49. def update(ms: (Lens[FieldOptions, FieldOptions]) ⇒ (FieldOptions) ⇒ FieldOptions*): FieldOptions

    Definition Classes
    Updatable
  50. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. val weak: Option[Boolean]

    For Google-internal migration only.

    For Google-internal migration only. Do not use.

  54. def withCtype(__v: CType): FieldOptions

  55. def withDeprecated(__v: Boolean): FieldOptions

  56. def withExtension[T](generatedExtension: GeneratedExtension[FieldOptions, T])(value: T): FieldOptions

    Definition Classes
    ExtendableMessage
  57. def withJstype(__v: JSType): FieldOptions

  58. def withLazy(__v: Boolean): FieldOptions

  59. def withPacked(__v: Boolean): FieldOptions

  60. def withUninterpretedOption(__v: Seq[UninterpretedOption]): FieldOptions

  61. def withUnknownFields(__v: scalapb.UnknownFieldSet): FieldOptions

    Definition Classes
    FieldOptionsExtendableMessage
  62. def withWeak(__v: Boolean): FieldOptions

  63. def writeDelimitedTo(output: OutputStream): Unit

    Definition Classes
    GeneratedMessage
  64. def writeTo(_output__: CodedOutputStream): Unit

    Definition Classes
    FieldOptionsGeneratedMessage
  65. def writeTo(output: OutputStream): Unit

    Definition Classes
    GeneratedMessage

Deprecated Value Members

  1. def getAllFields: Map[FieldDescriptor, Any]

    Definition Classes
    GeneratedMessage
    Annotations
    @deprecated
    Deprecated

    (Since version 0.6.0) Use toPMessage

  2. def getField(field: FieldDescriptor): Any

    Definition Classes
    GeneratedMessage
    Annotations
    @deprecated
    Deprecated

    (Since version 0.6.0) Use getField that accepts a ScalaPB descriptor and returns PValue

Inherited from Product

Inherited from Equals

Inherited from Updatable[FieldOptions]

Inherited from scalapb.Message[FieldOptions]

Inherited from scalapb.GeneratedMessage

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped