Class/Object

com.google.protobuf.descriptor

FieldOptions

Related Docs: object FieldOptions | package descriptor

Permalink

final case class FieldOptions(ctype: Option[CType] = None, packed: Option[Boolean] = None, jstype: Option[JSType] = None, lazy: Option[Boolean] = None, deprecated: Option[Boolean] = None, weak: Option[Boolean] = None, uninterpretedOption: Seq[UninterpretedOption] = _root_.scala.collection.Seq.empty, unknownFields: scalapb.UnknownFieldSet = _root_.scalapb.UnknownFieldSet()) extends trueaccord.scalapb.GeneratedMessage with trueaccord.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()
Linear Supertypes
Product, Equals, ExtendableMessage[FieldOptions], Updatable[FieldOptions], trueaccord.scalapb.Message[FieldOptions], trueaccord.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
Visibility
  1. Public
  2. All

Instance Constructors

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

    Permalink

    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: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addAllUninterpretedOption(__vs: TraversableOnce[UninterpretedOption]): FieldOptions

    Permalink
  5. def addUninterpretedOption(__vs: UninterpretedOption*): FieldOptions

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clearCtype: FieldOptions

    Permalink
  8. def clearDeprecated: FieldOptions

    Permalink
  9. def clearJstype: FieldOptions

    Permalink
  10. def clearLazy: FieldOptions

    Permalink
  11. def clearPacked: FieldOptions

    Permalink
  12. def clearUninterpretedOption: FieldOptions

    Permalink
  13. def clearWeak: FieldOptions

    Permalink
  14. def clone(): AnyRef

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

    Permalink
    Definition Classes
    FieldOptionsGeneratedMessage
  16. val ctype: Option[CType]

    Permalink

    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!

  17. val deprecated: Option[Boolean]

    Permalink

    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.

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

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

    Permalink
    Definition Classes
    ExtendableMessage
  20. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. def getCtype: CType

    Permalink
  23. def getDeprecated: Boolean

    Permalink
  24. def getField(__field: FieldDescriptor): PValue

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

    Permalink
    Definition Classes
    FieldOptionsGeneratedMessage
  26. def getJstype: JSType

    Permalink
  27. def getLazy: Boolean

    Permalink
  28. def getPacked: Boolean

    Permalink
  29. def getWeak: Boolean

    Permalink
  30. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  31. val jstype: Option[JSType]

    Permalink

    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.

  32. val lazy: Option[Boolean]

    Permalink

    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.

  33. def mergeFrom(_input__: CodedInputStream): FieldOptions

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

    Permalink
    Definition Classes
    AnyRef
  35. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  36. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  37. val packed: Option[Boolean]

    Permalink

    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.

  38. final def serializedSize: Int

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

    Permalink
    Definition Classes
    AnyRef
  40. def toByteArray: Array[Byte]

    Permalink
    Definition Classes
    GeneratedMessage
  41. def toByteString: ByteString

    Permalink
    Definition Classes
    GeneratedMessage
  42. def toPMessage: PMessage

    Permalink
    Definition Classes
    GeneratedMessage
  43. def toString(): String

    Permalink
    Definition Classes
    FieldOptions → AnyRef → Any
  44. val uninterpretedOption: Seq[UninterpretedOption]

    Permalink

    The parser stores options it doesn't recognize here.

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

  45. val unknownFields: scalapb.UnknownFieldSet

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

    Permalink
    Definition Classes
    Updatable
  47. final def wait(): Unit

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

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

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

    Permalink

    For Google-internal migration only.

    For Google-internal migration only. Do not use.

  51. def withCtype(__v: CType): FieldOptions

    Permalink
  52. def withDeprecated(__v: Boolean): FieldOptions

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

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

    Permalink
  55. def withLazy(__v: Boolean): FieldOptions

    Permalink
  56. def withPacked(__v: Boolean): FieldOptions

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

    Permalink
  58. def withUnknownFields(__v: scalapb.UnknownFieldSet): FieldOptions

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

    Permalink
  60. def writeDelimitedTo(output: OutputStream): Unit

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

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

    Permalink
    Definition Classes
    GeneratedMessage

Deprecated Value Members

  1. def getAllFields: Map[FieldDescriptor, Any]

    Permalink
    Definition Classes
    GeneratedMessage
    Annotations
    @deprecated
    Deprecated

    (Since version 0.6.0) Use toPMessage

  2. def getField(field: FieldDescriptor): Any

    Permalink
    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 Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped