Package com.google.protobuf
Class DescriptorProtos.FieldOptions.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
-
- com.google.protobuf.DescriptorProtos.FieldOptions.Builder
-
- All Implemented Interfaces:
DescriptorProtos.FieldOptionsOrBuilder,GeneratedMessageV3.ExtendableMessageOrBuilder<DescriptorProtos.FieldOptions>,Message.Builder,MessageLite.Builder,MessageLiteOrBuilder,MessageOrBuilder,java.lang.Cloneable
- Enclosing class:
- DescriptorProtos.FieldOptions
public static final class DescriptorProtos.FieldOptions.Builder extends GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder> implements DescriptorProtos.FieldOptionsOrBuilder
Protobuf typegoogle.protobuf.FieldOptions
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DescriptorProtos.FieldOptions.BuilderaddAllUninterpretedOption(java.lang.Iterable<? extends DescriptorProtos.UninterpretedOption> values)The parser stores options it doesn't recognize here.<Type> DescriptorProtos.FieldOptions.BuilderaddExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,java.util.List<Type>> extension, Type value)Append a value to a repeated extension.DescriptorProtos.FieldOptions.BuilderaddRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)LikesetRepeatedField, but appends the value as a new element.DescriptorProtos.FieldOptions.BuilderaddUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.BuilderaddUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.BuilderaddUninterpretedOption(DescriptorProtos.UninterpretedOption value)The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.BuilderaddUninterpretedOption(DescriptorProtos.UninterpretedOption.Builder builderForValue)The parser stores options it doesn't recognize here.DescriptorProtos.UninterpretedOption.BuilderaddUninterpretedOptionBuilder()The parser stores options it doesn't recognize here.DescriptorProtos.UninterpretedOption.BuilderaddUninterpretedOptionBuilder(int index)The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptionsbuild()Constructs the message based on the state of the Builder.DescriptorProtos.FieldOptionsbuildPartial()LikeMessageLite.Builder.build(), but does not throw an exception if the message is missing required fields.DescriptorProtos.FieldOptions.Builderclear()Called by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.DescriptorProtos.FieldOptions.BuilderclearCtype()The ctype option instructs the C++ code generator to use a different representation of the field than it normally would.DescriptorProtos.FieldOptions.BuilderclearDeprecated()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.<Type> DescriptorProtos.FieldOptions.BuilderclearExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,?> extension)Clear an extension.DescriptorProtos.FieldOptions.BuilderclearField(Descriptors.FieldDescriptor field)Clears the field.DescriptorProtos.FieldOptions.BuilderclearJstype()The jstype option determines the JavaScript type used for values of the field.DescriptorProtos.FieldOptions.BuilderclearLazy()Should this field be parsed lazily? Lazy applies only to message-type fields.DescriptorProtos.FieldOptions.BuilderclearOneof(Descriptors.OneofDescriptor oneof)TODO(jieluo): Clear it when all subclasses have implemented this method.DescriptorProtos.FieldOptions.BuilderclearPacked()The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire.DescriptorProtos.FieldOptions.BuilderclearUninterpretedOption()The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.BuilderclearWeak()For Google-internal migration only.DescriptorProtos.FieldOptions.Builderclone()Clones the Builder.DescriptorProtos.FieldOptions.CTypegetCtype()The ctype option instructs the C++ code generator to use a different representation of the field than it normally would.DescriptorProtos.FieldOptionsgetDefaultInstanceForType()Get an instance of the type with no fields set.booleangetDeprecated()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.static Descriptors.DescriptorgetDescriptor()Descriptors.DescriptorgetDescriptorForType()Get the message's type's descriptor.DescriptorProtos.FieldOptions.JSTypegetJstype()The jstype option determines the JavaScript type used for values of the field.booleangetLazy()Should this field be parsed lazily? Lazy applies only to message-type fields.booleangetPacked()The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire.DescriptorProtos.UninterpretedOptiongetUninterpretedOption(int index)The parser stores options it doesn't recognize here.DescriptorProtos.UninterpretedOption.BuildergetUninterpretedOptionBuilder(int index)The parser stores options it doesn't recognize here.java.util.List<DescriptorProtos.UninterpretedOption.Builder>getUninterpretedOptionBuilderList()The parser stores options it doesn't recognize here.intgetUninterpretedOptionCount()The parser stores options it doesn't recognize here.java.util.List<DescriptorProtos.UninterpretedOption>getUninterpretedOptionList()The parser stores options it doesn't recognize here.DescriptorProtos.UninterpretedOptionOrBuildergetUninterpretedOptionOrBuilder(int index)The parser stores options it doesn't recognize here.java.util.List<? extends DescriptorProtos.UninterpretedOptionOrBuilder>getUninterpretedOptionOrBuilderList()The parser stores options it doesn't recognize here.booleangetWeak()For Google-internal migration only.booleanhasCtype()The ctype option instructs the C++ code generator to use a different representation of the field than it normally would.booleanhasDeprecated()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.booleanhasJstype()The jstype option determines the JavaScript type used for values of the field.booleanhasLazy()Should this field be parsed lazily? Lazy applies only to message-type fields.booleanhasPacked()The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire.booleanhasWeak()For Google-internal migration only.protected GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()Get the FieldAccessorTable for this type.booleanisInitialized()Returns true if all required fields in the message and all embedded messages are set, false otherwise.DescriptorProtos.FieldOptions.BuildermergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)LikeMessageLite.Builder.mergeFrom(CodedInputStream), but also parses extensions.DescriptorProtos.FieldOptions.BuildermergeFrom(DescriptorProtos.FieldOptions other)DescriptorProtos.FieldOptions.BuildermergeFrom(Message other)Mergeotherinto the message being built.DescriptorProtos.FieldOptions.BuildermergeUnknownFields(UnknownFieldSet unknownFields)Merge some unknown fields into theUnknownFieldSetfor this message.DescriptorProtos.FieldOptions.BuilderremoveUninterpretedOption(int index)The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.BuildersetCtype(DescriptorProtos.FieldOptions.CType value)The ctype option instructs the C++ code generator to use a different representation of the field than it normally would.DescriptorProtos.FieldOptions.BuildersetDeprecated(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.<Type> DescriptorProtos.FieldOptions.BuildersetExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,java.util.List<Type>> extension, int index, Type value)Set the value of one element of a repeated extension.<Type> DescriptorProtos.FieldOptions.BuildersetExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,Type> extension, Type value)Set the value of an extension.DescriptorProtos.FieldOptions.BuildersetField(Descriptors.FieldDescriptor field, java.lang.Object value)Sets a field to the given value.DescriptorProtos.FieldOptions.BuildersetJstype(DescriptorProtos.FieldOptions.JSType value)The jstype option determines the JavaScript type used for values of the field.DescriptorProtos.FieldOptions.BuildersetLazy(boolean value)Should this field be parsed lazily? Lazy applies only to message-type fields.DescriptorProtos.FieldOptions.BuildersetPacked(boolean value)The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire.DescriptorProtos.FieldOptions.BuildersetRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)Sets an element of a repeated field to the given value.DescriptorProtos.FieldOptions.BuildersetUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.BuildersetUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)The parser stores options it doesn't recognize here.DescriptorProtos.FieldOptions.BuildersetUnknownFields(UnknownFieldSet unknownFields)Set theUnknownFieldSetfor this message.DescriptorProtos.FieldOptions.BuildersetWeak(boolean value)For Google-internal migration only.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.ExtendableBuilder
addExtension, addExtension, clearExtension, clearExtension, extensionsAreInitialized, getAllFields, getExtension, getExtension, getExtension, getExtension, getExtension, getExtension, getExtensionCount, getExtensionCount, getExtensionCount, getField, getFieldBuilder, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, hasExtension, hasExtension, hasExtension, hasField, mergeExtensionFields, newBuilderForField, setExtension, setExtension, setExtension, setExtension
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getOneofFieldDescriptor, getParentForChildren, getUnknownFields, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder
getExtension, getExtension, getExtension, getExtension, getExtension, getExtension, getExtensionCount, getExtensionCount, getExtensionCount, hasExtension, hasExtension, hasExtension
-
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
getDescriptor
public static final Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Description copied from class:GeneratedMessageV3.BuilderGet the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.- Specified by:
internalGetFieldAccessorTablein classGeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
-
clear
public DescriptorProtos.FieldOptions.Builder clear()
Description copied from class:GeneratedMessageV3.BuilderCalled by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.- Specified by:
clearin interfaceMessage.Builder- Specified by:
clearin interfaceMessageLite.Builder- Overrides:
clearin classGeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
-
getDescriptorForType
public Descriptors.Descriptor getDescriptorForType()
Description copied from interface:Message.BuilderGet the message's type's descriptor. SeeMessageOrBuilder.getDescriptorForType().- Specified by:
getDescriptorForTypein interfaceMessage.Builder- Specified by:
getDescriptorForTypein interfaceMessageOrBuilder- Overrides:
getDescriptorForTypein classGeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
-
getDefaultInstanceForType
public DescriptorProtos.FieldOptions getDefaultInstanceForType()
Description copied from interface:MessageLiteOrBuilderGet an instance of the type with no fields set. Because no fields are set, all getters for singular fields will return default values and repeated fields will appear empty. This may or may not be a singleton. This differs from thegetDefaultInstance()method of generated message classes in that this method is an abstract method of theMessageLiteinterface whereasgetDefaultInstance()is a static method of a specific class. They return the same thing.- Specified by:
getDefaultInstanceForTypein interfaceGeneratedMessageV3.ExtendableMessageOrBuilder<DescriptorProtos.FieldOptions>- Specified by:
getDefaultInstanceForTypein interfaceMessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceMessageOrBuilder
-
build
public DescriptorProtos.FieldOptions build()
Description copied from interface:MessageLite.BuilderConstructs the message based on the state of the Builder. Subsequent changes to the Builder will not affect the returned message.- Specified by:
buildin interfaceMessage.Builder- Specified by:
buildin interfaceMessageLite.Builder
-
buildPartial
public DescriptorProtos.FieldOptions buildPartial()
Description copied from interface:MessageLite.BuilderLikeMessageLite.Builder.build(), but does not throw an exception if the message is missing required fields. Instead, a partial message is returned. Subsequent changes to the Builder will not affect the returned message.- Specified by:
buildPartialin interfaceMessage.Builder- Specified by:
buildPartialin interfaceMessageLite.Builder
-
clone
public DescriptorProtos.FieldOptions.Builder clone()
Description copied from interface:MessageLite.BuilderClones the Builder.- Specified by:
clonein interfaceMessage.Builder- Specified by:
clonein interfaceMessageLite.Builder- Overrides:
clonein classGeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>- See Also:
Object.clone()
-
setField
public DescriptorProtos.FieldOptions.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
Description copied from interface:Message.BuilderSets a field to the given value. The value must be of the correct type for this field, i.e. the same type thatMessageOrBuilder.getField(Descriptors.FieldDescriptor)would return.- Specified by:
setFieldin interfaceMessage.Builder- Overrides:
setFieldin classGeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
-
clearField
public DescriptorProtos.FieldOptions.Builder clearField(Descriptors.FieldDescriptor field)
Description copied from interface:Message.BuilderClears the field. This is exactly equivalent to calling the generated "clear" accessor method corresponding to the field.- Specified by:
clearFieldin interfaceMessage.Builder- Overrides:
clearFieldin classGeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
-
clearOneof
public DescriptorProtos.FieldOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Description copied from class:AbstractMessage.BuilderTODO(jieluo): Clear it when all subclasses have implemented this method.- Specified by:
clearOneofin interfaceMessage.Builder- Overrides:
clearOneofin classGeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
-
setRepeatedField
public DescriptorProtos.FieldOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
Description copied from interface:Message.BuilderSets an element of a repeated field to the given value. The value must be of the correct type for this field, i.e. the same type thatMessageOrBuilder.getRepeatedField(Descriptors.FieldDescriptor,int)would return.- Specified by:
setRepeatedFieldin interfaceMessage.Builder- Overrides:
setRepeatedFieldin classGeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
-
addRepeatedField
public DescriptorProtos.FieldOptions.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
Description copied from interface:Message.BuilderLikesetRepeatedField, but appends the value as a new element.- Specified by:
addRepeatedFieldin interfaceMessage.Builder- Overrides:
addRepeatedFieldin classGeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
-
setExtension
public <Type> DescriptorProtos.FieldOptions.Builder setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,Type> extension, Type value)
Description copied from class:GeneratedMessageV3.ExtendableBuilderSet the value of an extension.
-
setExtension
public <Type> DescriptorProtos.FieldOptions.Builder setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,java.util.List<Type>> extension, int index, Type value)
Description copied from class:GeneratedMessageV3.ExtendableBuilderSet the value of one element of a repeated extension.
-
addExtension
public <Type> DescriptorProtos.FieldOptions.Builder addExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,java.util.List<Type>> extension, Type value)
Description copied from class:GeneratedMessageV3.ExtendableBuilderAppend a value to a repeated extension.
-
clearExtension
public <Type> DescriptorProtos.FieldOptions.Builder clearExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,?> extension)
Description copied from class:GeneratedMessageV3.ExtendableBuilderClear an extension.
-
mergeFrom
public DescriptorProtos.FieldOptions.Builder mergeFrom(Message other)
Description copied from interface:Message.BuilderMergeotherinto the message being built.othermust have the exact same type asthis(i.e.getDescriptorForType() == other.getDescriptorForType()).Merging occurs as follows. For each field:
* For singular primitive fields, if the field is set inother, thenother's value overwrites the value in this message.
* For singular message fields, if the field is set inother, it is merged into the corresponding sub-message of this message using the same merging rules.
* For repeated fields, the elements inotherare concatenated with the elements in this message.
* For oneof groups, if the other message has one of the fields set, the group of this message is cleared and replaced by the field of the other message, so that the oneof constraint is preserved.This is equivalent to the
Message::MergeFrommethod in C++.- Specified by:
mergeFromin interfaceMessage.Builder- Overrides:
mergeFromin classAbstractMessage.Builder<DescriptorProtos.FieldOptions.Builder>
-
mergeFrom
public DescriptorProtos.FieldOptions.Builder mergeFrom(DescriptorProtos.FieldOptions other)
-
isInitialized
public final boolean isInitialized()
Description copied from interface:MessageLiteOrBuilderReturns true if all required fields in the message and all embedded messages are set, false otherwise.- Specified by:
isInitializedin interfaceMessageLiteOrBuilder- Overrides:
isInitializedin classGeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
-
mergeFrom
public DescriptorProtos.FieldOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
Description copied from interface:MessageLite.BuilderLikeMessageLite.Builder.mergeFrom(CodedInputStream), but also parses extensions. The extensions that you want to be able to parse must be registered inextensionRegistry. Extensions not in the registry will be treated as unknown fields.- Specified by:
mergeFromin interfaceMessage.Builder- Specified by:
mergeFromin interfaceMessageLite.Builder- Overrides:
mergeFromin classAbstractMessage.Builder<DescriptorProtos.FieldOptions.Builder>- Throws:
java.io.IOException
-
hasCtype
public boolean hasCtype()
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!
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];- Specified by:
hasCtypein interfaceDescriptorProtos.FieldOptionsOrBuilder- Returns:
- Whether the ctype field is set.
-
getCtype
public DescriptorProtos.FieldOptions.CType getCtype()
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!
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];- Specified by:
getCtypein interfaceDescriptorProtos.FieldOptionsOrBuilder- Returns:
- The ctype.
-
setCtype
public DescriptorProtos.FieldOptions.Builder setCtype(DescriptorProtos.FieldOptions.CType value)
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!
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];- Parameters:
value- The ctype to set.- Returns:
- This builder for chaining.
-
clearCtype
public DescriptorProtos.FieldOptions.Builder clearCtype()
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!
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.
optional bool packed = 2;- Specified by:
hasPackedin 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.
optional bool packed = 2;- Specified by:
getPackedin 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.
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.
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:
hasJstypein 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:
getJstypein 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 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 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.
optional bool lazy = 5 [default = false];- Specified by:
hasLazyin 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 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.
optional bool lazy = 5 [default = false];- Specified by:
getLazyin 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 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.
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 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.
optional bool lazy = 5 [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:
hasDeprecatedin 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:
getDeprecatedin 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:
hasWeakin 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:
getWeakin 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.
-
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:
getUninterpretedOptionListin 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:
getUninterpretedOptionCountin 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:
getUninterpretedOptionin 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;
-
getUninterpretedOptionBuilder
public DescriptorProtos.UninterpretedOption.Builder getUninterpretedOptionBuilder(int index)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
getUninterpretedOptionOrBuilder
public DescriptorProtos.UninterpretedOptionOrBuilder getUninterpretedOptionOrBuilder(int index)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;- Specified by:
getUninterpretedOptionOrBuilderin interfaceDescriptorProtos.FieldOptionsOrBuilder
-
getUninterpretedOptionOrBuilderList
public java.util.List<? extends DescriptorProtos.UninterpretedOptionOrBuilder> getUninterpretedOptionOrBuilderList()
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;- Specified by:
getUninterpretedOptionOrBuilderListin interfaceDescriptorProtos.FieldOptionsOrBuilder
-
addUninterpretedOptionBuilder
public DescriptorProtos.UninterpretedOption.Builder addUninterpretedOptionBuilder()
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
addUninterpretedOptionBuilder
public DescriptorProtos.UninterpretedOption.Builder addUninterpretedOptionBuilder(int index)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
getUninterpretedOptionBuilderList
public java.util.List<DescriptorProtos.UninterpretedOption.Builder> getUninterpretedOptionBuilderList()
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
setUnknownFields
public final DescriptorProtos.FieldOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Description copied from interface:Message.BuilderSet theUnknownFieldSetfor this message.- Specified by:
setUnknownFieldsin interfaceMessage.Builder- Overrides:
setUnknownFieldsin classGeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
-
mergeUnknownFields
public final DescriptorProtos.FieldOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Description copied from interface:Message.BuilderMerge some unknown fields into theUnknownFieldSetfor this message.- Specified by:
mergeUnknownFieldsin interfaceMessage.Builder- Overrides:
mergeUnknownFieldsin classGeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
-
-