Package com.google.protobuf
Class DescriptorProtos.FieldOptions.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
-
- com.google.protobuf.GeneratedMessageLite.Builder<MessageType,BuilderType>
-
- com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
-
- com.google.protobuf.DescriptorProtos.FieldOptions.Builder
-
- All Implemented Interfaces:
DescriptorProtos.FieldOptionsOrBuilder
,GeneratedMessageLite.ExtendableMessageOrBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
,MessageLite.Builder
,MessageLiteOrBuilder
,java.lang.Cloneable
- Enclosing class:
- DescriptorProtos.FieldOptions
public static final class DescriptorProtos.FieldOptions.Builder extends GeneratedMessageLite.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder> implements DescriptorProtos.FieldOptionsOrBuilder
Protobuf typegoogle.protobuf.FieldOptions
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite.Builder
AbstractMessageLite.Builder.LimitedInputStream
-
-
Field Summary
-
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DescriptorProtos.FieldOptions.Builder
addAllEditionDefaults(java.lang.Iterable<? extends DescriptorProtos.FieldOptions.EditionDefault> values)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
DescriptorProtos.FieldOptions.Builder
addAllTargets(java.lang.Iterable<? extends DescriptorProtos.FieldOptions.OptionTargetType> values)
repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
DescriptorProtos.FieldOptions.Builder
addAllUninterpretedOption(java.lang.Iterable<? extends DescriptorProtos.UninterpretedOption> values)
The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.Builder
addEditionDefaults(int index, DescriptorProtos.FieldOptions.EditionDefault value)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
DescriptorProtos.FieldOptions.Builder
addEditionDefaults(int index, DescriptorProtos.FieldOptions.EditionDefault.Builder builderForValue)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
DescriptorProtos.FieldOptions.Builder
addEditionDefaults(DescriptorProtos.FieldOptions.EditionDefault value)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
DescriptorProtos.FieldOptions.Builder
addEditionDefaults(DescriptorProtos.FieldOptions.EditionDefault.Builder builderForValue)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
DescriptorProtos.FieldOptions.Builder
addTargets(DescriptorProtos.FieldOptions.OptionTargetType value)
repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
DescriptorProtos.FieldOptions.Builder
addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)
The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.Builder
addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)
The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.Builder
addUninterpretedOption(DescriptorProtos.UninterpretedOption value)
The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.Builder
addUninterpretedOption(DescriptorProtos.UninterpretedOption.Builder builderForValue)
The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.Builder
clearCtype()
NOTE: ctype is deprecated.DescriptorProtos.FieldOptions.Builder
clearDebugRedact()
Indicate that the field value should not be printed out when using debug formats, e.g.DescriptorProtos.FieldOptions.Builder
clearDeprecated()
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.DescriptorProtos.FieldOptions.Builder
clearEditionDefaults()
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
DescriptorProtos.FieldOptions.Builder
clearFeatures()
Any features defined in the specific edition.DescriptorProtos.FieldOptions.Builder
clearFeatureSupport()
optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
DescriptorProtos.FieldOptions.Builder
clearJstype()
The jstype option determines the JavaScript type used for values of the field.DescriptorProtos.FieldOptions.Builder
clearLazy()
Should this field be parsed lazily? Lazy applies only to message-type fields.DescriptorProtos.FieldOptions.Builder
clearPacked()
The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire.DescriptorProtos.FieldOptions.Builder
clearRetention()
optional .google.protobuf.FieldOptions.OptionRetention retention = 17;
DescriptorProtos.FieldOptions.Builder
clearTargets()
repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
DescriptorProtos.FieldOptions.Builder
clearUninterpretedOption()
The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.Builder
clearUnverifiedLazy()
unverified_lazy does no correctness checks on the byte stream.DescriptorProtos.FieldOptions.Builder
clearWeak()
For Google-internal migration only.DescriptorProtos.FieldOptions.CType
getCtype()
NOTE: ctype is deprecated.boolean
getDebugRedact()
Indicate that the field value should not be printed out when using debug formats, e.g.boolean
getDeprecated()
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.DescriptorProtos.FieldOptions.EditionDefault
getEditionDefaults(int index)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
int
getEditionDefaultsCount()
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
java.util.List<DescriptorProtos.FieldOptions.EditionDefault>
getEditionDefaultsList()
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
DescriptorProtos.FeatureSet
getFeatures()
Any features defined in the specific edition.DescriptorProtos.FieldOptions.FeatureSupport
getFeatureSupport()
optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
DescriptorProtos.FieldOptions.JSType
getJstype()
The jstype option determines the JavaScript type used for values of the field.boolean
getLazy()
Should this field be parsed lazily? Lazy applies only to message-type fields.boolean
getPacked()
The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire.DescriptorProtos.FieldOptions.OptionRetention
getRetention()
optional .google.protobuf.FieldOptions.OptionRetention retention = 17;
DescriptorProtos.FieldOptions.OptionTargetType
getTargets(int index)
repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
int
getTargetsCount()
repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
java.util.List<DescriptorProtos.FieldOptions.OptionTargetType>
getTargetsList()
repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
DescriptorProtos.UninterpretedOption
getUninterpretedOption(int index)
The parser stores options it doesn't recognize here.int
getUninterpretedOptionCount()
The parser stores options it doesn't recognize here.java.util.List<DescriptorProtos.UninterpretedOption>
getUninterpretedOptionList()
The parser stores options it doesn't recognize here.boolean
getUnverifiedLazy()
unverified_lazy does no correctness checks on the byte stream.boolean
getWeak()
For Google-internal migration only.boolean
hasCtype()
NOTE: ctype is deprecated.boolean
hasDebugRedact()
Indicate that the field value should not be printed out when using debug formats, e.g.boolean
hasDeprecated()
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.boolean
hasFeatures()
Any features defined in the specific edition.boolean
hasFeatureSupport()
optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
boolean
hasJstype()
The jstype option determines the JavaScript type used for values of the field.boolean
hasLazy()
Should this field be parsed lazily? Lazy applies only to message-type fields.boolean
hasPacked()
The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire.boolean
hasRetention()
optional .google.protobuf.FieldOptions.OptionRetention retention = 17;
boolean
hasUnverifiedLazy()
unverified_lazy does no correctness checks on the byte stream.boolean
hasWeak()
For Google-internal migration only.DescriptorProtos.FieldOptions.Builder
mergeFeatures(DescriptorProtos.FeatureSet value)
Any features defined in the specific edition.DescriptorProtos.FieldOptions.Builder
mergeFeatureSupport(DescriptorProtos.FieldOptions.FeatureSupport value)
optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
DescriptorProtos.FieldOptions.Builder
removeEditionDefaults(int index)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
DescriptorProtos.FieldOptions.Builder
removeUninterpretedOption(int index)
The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.Builder
setCtype(DescriptorProtos.FieldOptions.CType value)
NOTE: ctype is deprecated.DescriptorProtos.FieldOptions.Builder
setDebugRedact(boolean value)
Indicate that the field value should not be printed out when using debug formats, e.g.DescriptorProtos.FieldOptions.Builder
setDeprecated(boolean value)
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.DescriptorProtos.FieldOptions.Builder
setEditionDefaults(int index, DescriptorProtos.FieldOptions.EditionDefault value)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
DescriptorProtos.FieldOptions.Builder
setEditionDefaults(int index, DescriptorProtos.FieldOptions.EditionDefault.Builder builderForValue)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
DescriptorProtos.FieldOptions.Builder
setFeatures(DescriptorProtos.FeatureSet value)
Any features defined in the specific edition.DescriptorProtos.FieldOptions.Builder
setFeatures(DescriptorProtos.FeatureSet.Builder builderForValue)
Any features defined in the specific edition.DescriptorProtos.FieldOptions.Builder
setFeatureSupport(DescriptorProtos.FieldOptions.FeatureSupport value)
optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
DescriptorProtos.FieldOptions.Builder
setFeatureSupport(DescriptorProtos.FieldOptions.FeatureSupport.Builder builderForValue)
optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
DescriptorProtos.FieldOptions.Builder
setJstype(DescriptorProtos.FieldOptions.JSType value)
The jstype option determines the JavaScript type used for values of the field.DescriptorProtos.FieldOptions.Builder
setLazy(boolean value)
Should this field be parsed lazily? Lazy applies only to message-type fields.DescriptorProtos.FieldOptions.Builder
setPacked(boolean value)
The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire.DescriptorProtos.FieldOptions.Builder
setRetention(DescriptorProtos.FieldOptions.OptionRetention value)
optional .google.protobuf.FieldOptions.OptionRetention retention = 17;
DescriptorProtos.FieldOptions.Builder
setTargets(int index, DescriptorProtos.FieldOptions.OptionTargetType value)
repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
DescriptorProtos.FieldOptions.Builder
setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)
The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.Builder
setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)
The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.Builder
setUnverifiedLazy(boolean value)
unverified_lazy does no correctness checks on the byte stream.DescriptorProtos.FieldOptions.Builder
setWeak(boolean value)
For Google-internal migration only.-
Methods inherited from class com.google.protobuf.GeneratedMessageLite.ExtendableBuilder
addExtension, buildPartial, clearExtension, copyOnWriteInternal, getExtension, getExtension, getExtensionCount, hasExtension, internalSetExtensionSet, setExtension, setExtension
-
Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, clear, clone, copyOnWrite, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder
getExtension, getExtension, getExtensionCount, hasExtension
-
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
-
-
-
Method Detail
-
hasCtype
public boolean hasCtype()
NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. 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 only implemented to support use of [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of type "bytes" in the open source release. TODO: make ctype actually deprecated.
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
- Specified by:
hasCtype
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the ctype field is set.
-
getCtype
public DescriptorProtos.FieldOptions.CType getCtype()
NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. 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 only implemented to support use of [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of type "bytes" in the open source release. TODO: make ctype actually deprecated.
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
- Specified by:
getCtype
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The ctype.
-
setCtype
public DescriptorProtos.FieldOptions.Builder setCtype(DescriptorProtos.FieldOptions.CType value)
NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. 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 only implemented to support use of [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of type "bytes" in the open source release. TODO: make ctype actually deprecated.
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
- Parameters:
value
- The enum numeric value on the wire for ctype to set.- Returns:
- This builder for chaining.
-
clearCtype
public DescriptorProtos.FieldOptions.Builder clearCtype()
NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. 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 only implemented to support use of [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of type "bytes" in the open source release. TODO: make ctype actually deprecated.
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
- Returns:
- This builder for chaining.
-
hasPacked
public boolean hasPacked()
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. This option is prohibited in Editions, but the `repeated_field_encoding` feature can be used to control the behavior.
optional bool packed = 2;
- Specified by:
hasPacked
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the packed field is set.
-
getPacked
public boolean getPacked()
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. This option is prohibited in Editions, but the `repeated_field_encoding` feature can be used to control the behavior.
optional bool packed = 2;
- Specified by:
getPacked
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The packed.
-
setPacked
public DescriptorProtos.FieldOptions.Builder setPacked(boolean value)
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. This option is prohibited in Editions, but the `repeated_field_encoding` feature can be used to control the behavior.
optional bool packed = 2;
- Parameters:
value
- The packed to set.- Returns:
- This builder for chaining.
-
clearPacked
public DescriptorProtos.FieldOptions.Builder clearPacked()
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. This option is prohibited in Editions, but the `repeated_field_encoding` feature can be used to control the behavior.
optional bool packed = 2;
- Returns:
- This builder for chaining.
-
hasJstype
public boolean hasJstype()
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). A field with jstype JS_STRING is represented as JavaScript string, which avoids loss of precision that can happen when a large value is converted to a floating point JavaScript. Specifying JS_NUMBER for the jstype causes the generated JavaScript code to use the JavaScript "number" type. The behavior of the default option JS_NORMAL is implementation dependent. This option is an enum to permit additional types to be added, e.g. goog.math.Integer.
optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
- Specified by:
hasJstype
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the jstype field is set.
-
getJstype
public DescriptorProtos.FieldOptions.JSType getJstype()
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). A field with jstype JS_STRING is represented as JavaScript string, which avoids loss of precision that can happen when a large value is converted to a floating point JavaScript. Specifying JS_NUMBER for the jstype causes the generated JavaScript code to use the JavaScript "number" type. The behavior of the default option JS_NORMAL is implementation dependent. This option is an enum to permit additional types to be added, e.g. goog.math.Integer.
optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
- Specified by:
getJstype
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The jstype.
-
setJstype
public DescriptorProtos.FieldOptions.Builder setJstype(DescriptorProtos.FieldOptions.JSType value)
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). A field with jstype JS_STRING is represented as JavaScript string, which avoids loss of precision that can happen when a large value is converted to a floating point JavaScript. Specifying JS_NUMBER for the jstype causes the generated JavaScript code to use the JavaScript "number" type. The behavior of the default option JS_NORMAL is implementation dependent. This option is an enum to permit additional types to be added, e.g. goog.math.Integer.
optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
- Parameters:
value
- The enum numeric value on the wire for jstype to set.- Returns:
- This builder for chaining.
-
clearJstype
public DescriptorProtos.FieldOptions.Builder clearJstype()
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). A field with jstype JS_STRING is represented as JavaScript string, which avoids loss of precision that can happen when a large value is converted to a floating point JavaScript. Specifying JS_NUMBER for the jstype causes the generated JavaScript code to use the JavaScript "number" type. The behavior of the default option JS_NORMAL is implementation dependent. This option is an enum to permit additional types to be added, e.g. goog.math.Integer.
optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
- Returns:
- This builder for chaining.
-
hasLazy
public boolean hasLazy()
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 lazy message fields are still eagerly verified to check ill-formed wireformat or missing required fields. Calling IsInitialized() on the outer message would fail if the inner message has missing required fields. Failed verification would result in parsing failure (except when uninitialized messages are acceptable).
optional bool lazy = 5 [default = false];
- Specified by:
hasLazy
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the lazy field is set.
-
getLazy
public boolean getLazy()
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 lazy message fields are still eagerly verified to check ill-formed wireformat or missing required fields. Calling IsInitialized() on the outer message would fail if the inner message has missing required fields. Failed verification would result in parsing failure (except when uninitialized messages are acceptable).
optional bool lazy = 5 [default = false];
- Specified by:
getLazy
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The lazy.
-
setLazy
public DescriptorProtos.FieldOptions.Builder setLazy(boolean value)
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 lazy message fields are still eagerly verified to check ill-formed wireformat or missing required fields. Calling IsInitialized() on the outer message would fail if the inner message has missing required fields. Failed verification would result in parsing failure (except when uninitialized messages are acceptable).
optional bool lazy = 5 [default = false];
- Parameters:
value
- The lazy to set.- Returns:
- This builder for chaining.
-
clearLazy
public DescriptorProtos.FieldOptions.Builder clearLazy()
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 lazy message fields are still eagerly verified to check ill-formed wireformat or missing required fields. Calling IsInitialized() on the outer message would fail if the inner message has missing required fields. Failed verification would result in parsing failure (except when uninitialized messages are acceptable).
optional bool lazy = 5 [default = false];
- Returns:
- This builder for chaining.
-
hasUnverifiedLazy
public boolean hasUnverifiedLazy()
unverified_lazy does no correctness checks on the byte stream. This should only be used where lazy with verification is prohibitive for performance reasons.
optional bool unverified_lazy = 15 [default = false];
- Specified by:
hasUnverifiedLazy
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the unverifiedLazy field is set.
-
getUnverifiedLazy
public boolean getUnverifiedLazy()
unverified_lazy does no correctness checks on the byte stream. This should only be used where lazy with verification is prohibitive for performance reasons.
optional bool unverified_lazy = 15 [default = false];
- Specified by:
getUnverifiedLazy
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The unverifiedLazy.
-
setUnverifiedLazy
public DescriptorProtos.FieldOptions.Builder setUnverifiedLazy(boolean value)
unverified_lazy does no correctness checks on the byte stream. This should only be used where lazy with verification is prohibitive for performance reasons.
optional bool unverified_lazy = 15 [default = false];
- Parameters:
value
- The unverifiedLazy to set.- Returns:
- This builder for chaining.
-
clearUnverifiedLazy
public DescriptorProtos.FieldOptions.Builder clearUnverifiedLazy()
unverified_lazy does no correctness checks on the byte stream. This should only be used where lazy with verification is prohibitive for performance reasons.
optional bool unverified_lazy = 15 [default = false];
- Returns:
- This builder for chaining.
-
hasDeprecated
public boolean hasDeprecated()
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.
optional bool deprecated = 3 [default = false];
- Specified by:
hasDeprecated
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the deprecated field is set.
-
getDeprecated
public boolean getDeprecated()
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.
optional bool deprecated = 3 [default = false];
- Specified by:
getDeprecated
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The deprecated.
-
setDeprecated
public DescriptorProtos.FieldOptions.Builder setDeprecated(boolean value)
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.
optional bool deprecated = 3 [default = false];
- Parameters:
value
- The deprecated to set.- Returns:
- This builder for chaining.
-
clearDeprecated
public DescriptorProtos.FieldOptions.Builder clearDeprecated()
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.
optional bool deprecated = 3 [default = false];
- Returns:
- This builder for chaining.
-
hasWeak
public boolean hasWeak()
For Google-internal migration only. Do not use.
optional bool weak = 10 [default = false];
- Specified by:
hasWeak
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the weak field is set.
-
getWeak
public boolean getWeak()
For Google-internal migration only. Do not use.
optional bool weak = 10 [default = false];
- Specified by:
getWeak
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The weak.
-
setWeak
public DescriptorProtos.FieldOptions.Builder setWeak(boolean value)
For Google-internal migration only. Do not use.
optional bool weak = 10 [default = false];
- Parameters:
value
- The weak to set.- Returns:
- This builder for chaining.
-
clearWeak
public DescriptorProtos.FieldOptions.Builder clearWeak()
For Google-internal migration only. Do not use.
optional bool weak = 10 [default = false];
- Returns:
- This builder for chaining.
-
hasDebugRedact
public boolean hasDebugRedact()
Indicate that the field value should not be printed out when using debug formats, e.g. when the field contains sensitive credentials.
optional bool debug_redact = 16 [default = false];
- Specified by:
hasDebugRedact
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the debugRedact field is set.
-
getDebugRedact
public boolean getDebugRedact()
Indicate that the field value should not be printed out when using debug formats, e.g. when the field contains sensitive credentials.
optional bool debug_redact = 16 [default = false];
- Specified by:
getDebugRedact
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The debugRedact.
-
setDebugRedact
public DescriptorProtos.FieldOptions.Builder setDebugRedact(boolean value)
Indicate that the field value should not be printed out when using debug formats, e.g. when the field contains sensitive credentials.
optional bool debug_redact = 16 [default = false];
- Parameters:
value
- The debugRedact to set.- Returns:
- This builder for chaining.
-
clearDebugRedact
public DescriptorProtos.FieldOptions.Builder clearDebugRedact()
Indicate that the field value should not be printed out when using debug formats, e.g. when the field contains sensitive credentials.
optional bool debug_redact = 16 [default = false];
- Returns:
- This builder for chaining.
-
hasRetention
public boolean hasRetention()
optional .google.protobuf.FieldOptions.OptionRetention retention = 17;
- Specified by:
hasRetention
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the retention field is set.
-
getRetention
public DescriptorProtos.FieldOptions.OptionRetention getRetention()
optional .google.protobuf.FieldOptions.OptionRetention retention = 17;
- Specified by:
getRetention
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The retention.
-
setRetention
public DescriptorProtos.FieldOptions.Builder setRetention(DescriptorProtos.FieldOptions.OptionRetention value)
optional .google.protobuf.FieldOptions.OptionRetention retention = 17;
- Parameters:
value
- The enum numeric value on the wire for retention to set.- Returns:
- This builder for chaining.
-
clearRetention
public DescriptorProtos.FieldOptions.Builder clearRetention()
optional .google.protobuf.FieldOptions.OptionRetention retention = 17;
- Returns:
- This builder for chaining.
-
getTargetsList
public java.util.List<DescriptorProtos.FieldOptions.OptionTargetType> getTargetsList()
repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
- Specified by:
getTargetsList
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- A list containing the targets.
-
getTargetsCount
public int getTargetsCount()
repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
- Specified by:
getTargetsCount
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The count of targets.
-
getTargets
public DescriptorProtos.FieldOptions.OptionTargetType getTargets(int index)
repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
- Specified by:
getTargets
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The targets at the given index.
-
setTargets
public DescriptorProtos.FieldOptions.Builder setTargets(int index, DescriptorProtos.FieldOptions.OptionTargetType value)
repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
- Parameters:
index
- The index to set the value at.value
- The targets to set.- Returns:
- This builder for chaining.
-
addTargets
public DescriptorProtos.FieldOptions.Builder addTargets(DescriptorProtos.FieldOptions.OptionTargetType value)
repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
- Parameters:
value
- The targets to add.- Returns:
- This builder for chaining.
-
addAllTargets
public DescriptorProtos.FieldOptions.Builder addAllTargets(java.lang.Iterable<? extends DescriptorProtos.FieldOptions.OptionTargetType> values)
repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
- Parameters:
values
- The targets to add.- Returns:
- This builder for chaining.
-
clearTargets
public DescriptorProtos.FieldOptions.Builder clearTargets()
repeated .google.protobuf.FieldOptions.OptionTargetType targets = 19;
- Returns:
- This builder for chaining.
-
getEditionDefaultsList
public java.util.List<DescriptorProtos.FieldOptions.EditionDefault> getEditionDefaultsList()
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
- Specified by:
getEditionDefaultsList
in interfaceDescriptorProtos.FieldOptionsOrBuilder
-
getEditionDefaultsCount
public int getEditionDefaultsCount()
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
- Specified by:
getEditionDefaultsCount
in interfaceDescriptorProtos.FieldOptionsOrBuilder
-
getEditionDefaults
public DescriptorProtos.FieldOptions.EditionDefault getEditionDefaults(int index)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
- Specified by:
getEditionDefaults
in interfaceDescriptorProtos.FieldOptionsOrBuilder
-
setEditionDefaults
public DescriptorProtos.FieldOptions.Builder setEditionDefaults(int index, DescriptorProtos.FieldOptions.EditionDefault value)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
-
setEditionDefaults
public DescriptorProtos.FieldOptions.Builder setEditionDefaults(int index, DescriptorProtos.FieldOptions.EditionDefault.Builder builderForValue)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
-
addEditionDefaults
public DescriptorProtos.FieldOptions.Builder addEditionDefaults(DescriptorProtos.FieldOptions.EditionDefault value)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
-
addEditionDefaults
public DescriptorProtos.FieldOptions.Builder addEditionDefaults(int index, DescriptorProtos.FieldOptions.EditionDefault value)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
-
addEditionDefaults
public DescriptorProtos.FieldOptions.Builder addEditionDefaults(DescriptorProtos.FieldOptions.EditionDefault.Builder builderForValue)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
-
addEditionDefaults
public DescriptorProtos.FieldOptions.Builder addEditionDefaults(int index, DescriptorProtos.FieldOptions.EditionDefault.Builder builderForValue)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
-
addAllEditionDefaults
public DescriptorProtos.FieldOptions.Builder addAllEditionDefaults(java.lang.Iterable<? extends DescriptorProtos.FieldOptions.EditionDefault> values)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
-
clearEditionDefaults
public DescriptorProtos.FieldOptions.Builder clearEditionDefaults()
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
-
removeEditionDefaults
public DescriptorProtos.FieldOptions.Builder removeEditionDefaults(int index)
repeated .google.protobuf.FieldOptions.EditionDefault edition_defaults = 20;
-
hasFeatures
public boolean hasFeatures()
Any features defined in the specific edition.
optional .google.protobuf.FeatureSet features = 21;
- Specified by:
hasFeatures
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the features field is set.
-
getFeatures
public DescriptorProtos.FeatureSet getFeatures()
Any features defined in the specific edition.
optional .google.protobuf.FeatureSet features = 21;
- Specified by:
getFeatures
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The features.
-
setFeatures
public DescriptorProtos.FieldOptions.Builder setFeatures(DescriptorProtos.FeatureSet value)
Any features defined in the specific edition.
optional .google.protobuf.FeatureSet features = 21;
-
setFeatures
public DescriptorProtos.FieldOptions.Builder setFeatures(DescriptorProtos.FeatureSet.Builder builderForValue)
Any features defined in the specific edition.
optional .google.protobuf.FeatureSet features = 21;
-
mergeFeatures
public DescriptorProtos.FieldOptions.Builder mergeFeatures(DescriptorProtos.FeatureSet value)
Any features defined in the specific edition.
optional .google.protobuf.FeatureSet features = 21;
-
clearFeatures
public DescriptorProtos.FieldOptions.Builder clearFeatures()
Any features defined in the specific edition.
optional .google.protobuf.FeatureSet features = 21;
-
hasFeatureSupport
public boolean hasFeatureSupport()
optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
- Specified by:
hasFeatureSupport
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the featureSupport field is set.
-
getFeatureSupport
public DescriptorProtos.FieldOptions.FeatureSupport getFeatureSupport()
optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
- Specified by:
getFeatureSupport
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The featureSupport.
-
setFeatureSupport
public DescriptorProtos.FieldOptions.Builder setFeatureSupport(DescriptorProtos.FieldOptions.FeatureSupport value)
optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
-
setFeatureSupport
public DescriptorProtos.FieldOptions.Builder setFeatureSupport(DescriptorProtos.FieldOptions.FeatureSupport.Builder builderForValue)
optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
-
mergeFeatureSupport
public DescriptorProtos.FieldOptions.Builder mergeFeatureSupport(DescriptorProtos.FieldOptions.FeatureSupport value)
optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
-
clearFeatureSupport
public DescriptorProtos.FieldOptions.Builder clearFeatureSupport()
optional .google.protobuf.FieldOptions.FeatureSupport feature_support = 22;
-
getUninterpretedOptionList
public java.util.List<DescriptorProtos.UninterpretedOption> getUninterpretedOptionList()
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- Specified by:
getUninterpretedOptionList
in interfaceDescriptorProtos.FieldOptionsOrBuilder
-
getUninterpretedOptionCount
public int getUninterpretedOptionCount()
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- Specified by:
getUninterpretedOptionCount
in interfaceDescriptorProtos.FieldOptionsOrBuilder
-
getUninterpretedOption
public DescriptorProtos.UninterpretedOption getUninterpretedOption(int index)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- Specified by:
getUninterpretedOption
in interfaceDescriptorProtos.FieldOptionsOrBuilder
-
setUninterpretedOption
public DescriptorProtos.FieldOptions.Builder setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
setUninterpretedOption
public DescriptorProtos.FieldOptions.Builder setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
addUninterpretedOption
public DescriptorProtos.FieldOptions.Builder addUninterpretedOption(DescriptorProtos.UninterpretedOption value)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
addUninterpretedOption
public DescriptorProtos.FieldOptions.Builder addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
addUninterpretedOption
public DescriptorProtos.FieldOptions.Builder addUninterpretedOption(DescriptorProtos.UninterpretedOption.Builder builderForValue)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
addUninterpretedOption
public DescriptorProtos.FieldOptions.Builder addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
addAllUninterpretedOption
public DescriptorProtos.FieldOptions.Builder addAllUninterpretedOption(java.lang.Iterable<? extends DescriptorProtos.UninterpretedOption> values)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
clearUninterpretedOption
public DescriptorProtos.FieldOptions.Builder clearUninterpretedOption()
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
removeUninterpretedOption
public DescriptorProtos.FieldOptions.Builder removeUninterpretedOption(int index)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
-