Package com.google.protobuf
Class Field.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Field.Builder>
-
- com.google.protobuf.Field.Builder
-
- All Implemented Interfaces:
FieldOrBuilder,Message.Builder,MessageLite.Builder,MessageLiteOrBuilder,MessageOrBuilder,java.lang.Cloneable
- Enclosing class:
- Field
public static final class Field.Builder extends GeneratedMessageV3.Builder<Field.Builder> implements FieldOrBuilder
A single field of a message type.
Protobuf typegoogle.protobuf.Field
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Field.BuilderaddAllOptions(java.lang.Iterable<? extends Option> values)The protocol buffer options.Field.BuilderaddOptions(int index, Option value)The protocol buffer options.Field.BuilderaddOptions(int index, Option.Builder builderForValue)The protocol buffer options.Field.BuilderaddOptions(Option value)The protocol buffer options.Field.BuilderaddOptions(Option.Builder builderForValue)The protocol buffer options.Option.BuilderaddOptionsBuilder()The protocol buffer options.Option.BuilderaddOptionsBuilder(int index)The protocol buffer options.Field.BuilderaddRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)LikesetRepeatedField, but appends the value as a new element.Fieldbuild()Constructs the message based on the state of the Builder.FieldbuildPartial()LikeMessageLite.Builder.build(), but does not throw an exception if the message is missing required fields.Field.Builderclear()Called by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.Field.BuilderclearCardinality()The field cardinality.Field.BuilderclearDefaultValue()The string value of the default value of this field.Field.BuilderclearField(Descriptors.FieldDescriptor field)Clears the field.Field.BuilderclearJsonName()The field JSON name.Field.BuilderclearKind()The field type.Field.BuilderclearName()The field name.Field.BuilderclearNumber()The field number.Field.BuilderclearOneof(Descriptors.OneofDescriptor oneof)TODO(jieluo): Clear it when all subclasses have implemented this method.Field.BuilderclearOneofIndex()The index of the field type in `Type.oneofs`, for message or enumeration types.Field.BuilderclearOptions()The protocol buffer options.Field.BuilderclearPacked()Whether to use alternative packed wire representation.Field.BuilderclearTypeUrl()The field type URL, without the scheme, for message or enumeration types.Field.Builderclone()Clones the Builder.Field.CardinalitygetCardinality()The field cardinality.intgetCardinalityValue()The field cardinality.FieldgetDefaultInstanceForType()Get an instance of the type with no fields set.java.lang.StringgetDefaultValue()The string value of the default value of this field.ByteStringgetDefaultValueBytes()The string value of the default value of this field.static Descriptors.DescriptorgetDescriptor()Descriptors.DescriptorgetDescriptorForType()Get the message's type's descriptor.java.lang.StringgetJsonName()The field JSON name.ByteStringgetJsonNameBytes()The field JSON name.Field.KindgetKind()The field type.intgetKindValue()The field type.java.lang.StringgetName()The field name.ByteStringgetNameBytes()The field name.intgetNumber()The field number.intgetOneofIndex()The index of the field type in `Type.oneofs`, for message or enumeration types.OptiongetOptions(int index)The protocol buffer options.Option.BuildergetOptionsBuilder(int index)The protocol buffer options.java.util.List<Option.Builder>getOptionsBuilderList()The protocol buffer options.intgetOptionsCount()The protocol buffer options.java.util.List<Option>getOptionsList()The protocol buffer options.OptionOrBuildergetOptionsOrBuilder(int index)The protocol buffer options.java.util.List<? extends OptionOrBuilder>getOptionsOrBuilderList()The protocol buffer options.booleangetPacked()Whether to use alternative packed wire representation.java.lang.StringgetTypeUrl()The field type URL, without the scheme, for message or enumeration types.ByteStringgetTypeUrlBytes()The field type URL, without the scheme, for message or enumeration types.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.Field.BuildermergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)LikeMessageLite.Builder.mergeFrom(CodedInputStream), but also parses extensions.Field.BuildermergeFrom(Field other)Field.BuildermergeFrom(Message other)Mergeotherinto the message being built.Field.BuildermergeUnknownFields(UnknownFieldSet unknownFields)Merge some unknown fields into theUnknownFieldSetfor this message.Field.BuilderremoveOptions(int index)The protocol buffer options.Field.BuildersetCardinality(Field.Cardinality value)The field cardinality.Field.BuildersetCardinalityValue(int value)The field cardinality.Field.BuildersetDefaultValue(java.lang.String value)The string value of the default value of this field.Field.BuildersetDefaultValueBytes(ByteString value)The string value of the default value of this field.Field.BuildersetField(Descriptors.FieldDescriptor field, java.lang.Object value)Sets a field to the given value.Field.BuildersetJsonName(java.lang.String value)The field JSON name.Field.BuildersetJsonNameBytes(ByteString value)The field JSON name.Field.BuildersetKind(Field.Kind value)The field type.Field.BuildersetKindValue(int value)The field type.Field.BuildersetName(java.lang.String value)The field name.Field.BuildersetNameBytes(ByteString value)The field name.Field.BuildersetNumber(int value)The field number.Field.BuildersetOneofIndex(int value)The index of the field type in `Type.oneofs`, for message or enumeration types.Field.BuildersetOptions(int index, Option value)The protocol buffer options.Field.BuildersetOptions(int index, Option.Builder builderForValue)The protocol buffer options.Field.BuildersetPacked(boolean value)Whether to use alternative packed wire representation.Field.BuildersetRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)Sets an element of a repeated field to the given value.Field.BuildersetTypeUrl(java.lang.String value)The field type URL, without the scheme, for message or enumeration types.Field.BuildersetTypeUrlBytes(ByteString value)The field type URL, without the scheme, for message or enumeration types.Field.BuildersetUnknownFields(UnknownFieldSet unknownFields)Set theUnknownFieldSetfor this message.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, 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.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<Field.Builder>
-
clear
public Field.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.Builder<Field.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<Field.Builder>
-
getDefaultInstanceForType
public Field 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 interfaceMessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceMessageOrBuilder
-
build
public Field 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 Field 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 Field.Builder clone()
Description copied from interface:MessageLite.BuilderClones the Builder.- Specified by:
clonein interfaceMessage.Builder- Specified by:
clonein interfaceMessageLite.Builder- Overrides:
clonein classGeneratedMessageV3.Builder<Field.Builder>- See Also:
Object.clone()
-
setField
public Field.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.Builder<Field.Builder>
-
clearField
public Field.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.Builder<Field.Builder>
-
clearOneof
public Field.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<Field.Builder>
-
setRepeatedField
public Field.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.Builder<Field.Builder>
-
addRepeatedField
public Field.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.Builder<Field.Builder>
-
mergeFrom
public Field.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<Field.Builder>
-
mergeFrom
public Field.Builder mergeFrom(Field 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.Builder<Field.Builder>
-
mergeFrom
public Field.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<Field.Builder>- Throws:
java.io.IOException
-
getKindValue
public int getKindValue()
The field type.
.google.protobuf.Field.Kind kind = 1;- Specified by:
getKindValuein interfaceFieldOrBuilder- Returns:
- The enum numeric value on the wire for kind.
-
setKindValue
public Field.Builder setKindValue(int value)
The field type.
.google.protobuf.Field.Kind kind = 1;- Parameters:
value- The enum numeric value on the wire for kind to set.- Returns:
- This builder for chaining.
-
getKind
public Field.Kind getKind()
The field type.
.google.protobuf.Field.Kind kind = 1;- Specified by:
getKindin interfaceFieldOrBuilder- Returns:
- The kind.
-
setKind
public Field.Builder setKind(Field.Kind value)
The field type.
.google.protobuf.Field.Kind kind = 1;- Parameters:
value- The kind to set.- Returns:
- This builder for chaining.
-
clearKind
public Field.Builder clearKind()
The field type.
.google.protobuf.Field.Kind kind = 1;- Returns:
- This builder for chaining.
-
getCardinalityValue
public int getCardinalityValue()
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;- Specified by:
getCardinalityValuein interfaceFieldOrBuilder- Returns:
- The enum numeric value on the wire for cardinality.
-
setCardinalityValue
public Field.Builder setCardinalityValue(int value)
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;- Parameters:
value- The enum numeric value on the wire for cardinality to set.- Returns:
- This builder for chaining.
-
getCardinality
public Field.Cardinality getCardinality()
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;- Specified by:
getCardinalityin interfaceFieldOrBuilder- Returns:
- The cardinality.
-
setCardinality
public Field.Builder setCardinality(Field.Cardinality value)
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;- Parameters:
value- The cardinality to set.- Returns:
- This builder for chaining.
-
clearCardinality
public Field.Builder clearCardinality()
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;- Returns:
- This builder for chaining.
-
getNumber
public int getNumber()
The field number.
int32 number = 3;- Specified by:
getNumberin interfaceFieldOrBuilder- Returns:
- The number.
-
setNumber
public Field.Builder setNumber(int value)
The field number.
int32 number = 3;- Parameters:
value- The number to set.- Returns:
- This builder for chaining.
-
clearNumber
public Field.Builder clearNumber()
The field number.
int32 number = 3;- Returns:
- This builder for chaining.
-
getName
public java.lang.String getName()
The field name.
string name = 4;- Specified by:
getNamein interfaceFieldOrBuilder- Returns:
- The name.
-
getNameBytes
public ByteString getNameBytes()
The field name.
string name = 4;- Specified by:
getNameBytesin interfaceFieldOrBuilder- Returns:
- The bytes for name.
-
setName
public Field.Builder setName(java.lang.String value)
The field name.
string name = 4;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
public Field.Builder clearName()
The field name.
string name = 4;- Returns:
- This builder for chaining.
-
setNameBytes
public Field.Builder setNameBytes(ByteString value)
The field name.
string name = 4;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getTypeUrl
public java.lang.String getTypeUrl()
The field type URL, without the scheme, for message or enumeration types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
string type_url = 6;- Specified by:
getTypeUrlin interfaceFieldOrBuilder- Returns:
- The typeUrl.
-
getTypeUrlBytes
public ByteString getTypeUrlBytes()
The field type URL, without the scheme, for message or enumeration types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
string type_url = 6;- Specified by:
getTypeUrlBytesin interfaceFieldOrBuilder- Returns:
- The bytes for typeUrl.
-
setTypeUrl
public Field.Builder setTypeUrl(java.lang.String value)
The field type URL, without the scheme, for message or enumeration types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
string type_url = 6;- Parameters:
value- The typeUrl to set.- Returns:
- This builder for chaining.
-
clearTypeUrl
public Field.Builder clearTypeUrl()
The field type URL, without the scheme, for message or enumeration types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
string type_url = 6;- Returns:
- This builder for chaining.
-
setTypeUrlBytes
public Field.Builder setTypeUrlBytes(ByteString value)
The field type URL, without the scheme, for message or enumeration types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
string type_url = 6;- Parameters:
value- The bytes for typeUrl to set.- Returns:
- This builder for chaining.
-
getOneofIndex
public int getOneofIndex()
The index of the field type in `Type.oneofs`, for message or enumeration types. The first type has index 1; zero means the type is not in the list.
int32 oneof_index = 7;- Specified by:
getOneofIndexin interfaceFieldOrBuilder- Returns:
- The oneofIndex.
-
setOneofIndex
public Field.Builder setOneofIndex(int value)
The index of the field type in `Type.oneofs`, for message or enumeration types. The first type has index 1; zero means the type is not in the list.
int32 oneof_index = 7;- Parameters:
value- The oneofIndex to set.- Returns:
- This builder for chaining.
-
clearOneofIndex
public Field.Builder clearOneofIndex()
The index of the field type in `Type.oneofs`, for message or enumeration types. The first type has index 1; zero means the type is not in the list.
int32 oneof_index = 7;- Returns:
- This builder for chaining.
-
getPacked
public boolean getPacked()
Whether to use alternative packed wire representation.
bool packed = 8;- Specified by:
getPackedin interfaceFieldOrBuilder- Returns:
- The packed.
-
setPacked
public Field.Builder setPacked(boolean value)
Whether to use alternative packed wire representation.
bool packed = 8;- Parameters:
value- The packed to set.- Returns:
- This builder for chaining.
-
clearPacked
public Field.Builder clearPacked()
Whether to use alternative packed wire representation.
bool packed = 8;- Returns:
- This builder for chaining.
-
getOptionsList
public java.util.List<Option> getOptionsList()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;- Specified by:
getOptionsListin interfaceFieldOrBuilder
-
getOptionsCount
public int getOptionsCount()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;- Specified by:
getOptionsCountin interfaceFieldOrBuilder
-
getOptions
public Option getOptions(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;- Specified by:
getOptionsin interfaceFieldOrBuilder
-
setOptions
public Field.Builder setOptions(int index, Option value)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
setOptions
public Field.Builder setOptions(int index, Option.Builder builderForValue)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
addOptions
public Field.Builder addOptions(Option value)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
addOptions
public Field.Builder addOptions(int index, Option value)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
addOptions
public Field.Builder addOptions(Option.Builder builderForValue)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
addOptions
public Field.Builder addOptions(int index, Option.Builder builderForValue)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
addAllOptions
public Field.Builder addAllOptions(java.lang.Iterable<? extends Option> values)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
clearOptions
public Field.Builder clearOptions()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
removeOptions
public Field.Builder removeOptions(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
getOptionsBuilder
public Option.Builder getOptionsBuilder(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
getOptionsOrBuilder
public OptionOrBuilder getOptionsOrBuilder(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;- Specified by:
getOptionsOrBuilderin interfaceFieldOrBuilder
-
getOptionsOrBuilderList
public java.util.List<? extends OptionOrBuilder> getOptionsOrBuilderList()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;- Specified by:
getOptionsOrBuilderListin interfaceFieldOrBuilder
-
addOptionsBuilder
public Option.Builder addOptionsBuilder()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
addOptionsBuilder
public Option.Builder addOptionsBuilder(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
getOptionsBuilderList
public java.util.List<Option.Builder> getOptionsBuilderList()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
getJsonName
public java.lang.String getJsonName()
The field JSON name.
string json_name = 10;- Specified by:
getJsonNamein interfaceFieldOrBuilder- Returns:
- The jsonName.
-
getJsonNameBytes
public ByteString getJsonNameBytes()
The field JSON name.
string json_name = 10;- Specified by:
getJsonNameBytesin interfaceFieldOrBuilder- Returns:
- The bytes for jsonName.
-
setJsonName
public Field.Builder setJsonName(java.lang.String value)
The field JSON name.
string json_name = 10;- Parameters:
value- The jsonName to set.- Returns:
- This builder for chaining.
-
clearJsonName
public Field.Builder clearJsonName()
The field JSON name.
string json_name = 10;- Returns:
- This builder for chaining.
-
setJsonNameBytes
public Field.Builder setJsonNameBytes(ByteString value)
The field JSON name.
string json_name = 10;- Parameters:
value- The bytes for jsonName to set.- Returns:
- This builder for chaining.
-
getDefaultValue
public java.lang.String getDefaultValue()
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;- Specified by:
getDefaultValuein interfaceFieldOrBuilder- Returns:
- The defaultValue.
-
getDefaultValueBytes
public ByteString getDefaultValueBytes()
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;- Specified by:
getDefaultValueBytesin interfaceFieldOrBuilder- Returns:
- The bytes for defaultValue.
-
setDefaultValue
public Field.Builder setDefaultValue(java.lang.String value)
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;- Parameters:
value- The defaultValue to set.- Returns:
- This builder for chaining.
-
clearDefaultValue
public Field.Builder clearDefaultValue()
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;- Returns:
- This builder for chaining.
-
setDefaultValueBytes
public Field.Builder setDefaultValueBytes(ByteString value)
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;- Parameters:
value- The bytes for defaultValue to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final Field.Builder setUnknownFields(UnknownFieldSet unknownFields)
Description copied from interface:Message.BuilderSet theUnknownFieldSetfor this message.- Specified by:
setUnknownFieldsin interfaceMessage.Builder- Overrides:
setUnknownFieldsin classGeneratedMessageV3.Builder<Field.Builder>
-
mergeUnknownFields
public final Field.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<Field.Builder>
-
-