public static final class Field.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Field.Builder> implements FieldOrBuilder
A single field of a message type.Protobuf type
google.protobuf.Field| Modifier and Type | Method and Description |
|---|---|
Field.Builder |
addAllOptions(java.lang.Iterable<? extends Option> values)
The protocol buffer options.
|
Field.Builder |
addOptions(int index,
Option.Builder builderForValue)
The protocol buffer options.
|
Field.Builder |
addOptions(int index,
Option value)
The protocol buffer options.
|
Field.Builder |
addOptions(Option.Builder builderForValue)
The protocol buffer options.
|
Field.Builder |
addOptions(Option value)
The protocol buffer options.
|
Option.Builder |
addOptionsBuilder()
The protocol buffer options.
|
Option.Builder |
addOptionsBuilder(int index)
The protocol buffer options.
|
Field.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) |
Field |
build() |
Field |
buildPartial() |
Field.Builder |
clear() |
Field.Builder |
clearCardinality()
The field cardinality.
|
Field.Builder |
clearDefaultValue()
The string value of the default value of this field.
|
Field.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Field.Builder |
clearJsonName()
The field JSON name.
|
Field.Builder |
clearKind()
The field type.
|
Field.Builder |
clearName()
The field name.
|
Field.Builder |
clearNumber()
The field number.
|
Field.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Field.Builder |
clearOneofIndex()
The index of the field type in `Type.oneofs`, for message or enumeration
types.
|
Field.Builder |
clearOptions()
The protocol buffer options.
|
Field.Builder |
clearPacked()
Whether to use alternative packed wire representation.
|
Field.Builder |
clearTypeUrl()
The field type URL, without the scheme, for message or enumeration
types.
|
Field.Builder |
clone() |
Field.Cardinality |
getCardinality()
The field cardinality.
|
int |
getCardinalityValue()
The field cardinality.
|
Field |
getDefaultInstanceForType() |
java.lang.String |
getDefaultValue()
The string value of the default value of this field.
|
com.google.protobuf.ByteString |
getDefaultValueBytes()
The string value of the default value of this field.
|
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
java.lang.String |
getJsonName()
The field JSON name.
|
com.google.protobuf.ByteString |
getJsonNameBytes()
The field JSON name.
|
Field.Kind |
getKind()
The field type.
|
int |
getKindValue()
The field type.
|
java.lang.String |
getName()
The field name.
|
com.google.protobuf.ByteString |
getNameBytes()
The field name.
|
int |
getNumber()
The field number.
|
int |
getOneofIndex()
The index of the field type in `Type.oneofs`, for message or enumeration
types.
|
Option |
getOptions(int index)
The protocol buffer options.
|
Option.Builder |
getOptionsBuilder(int index)
The protocol buffer options.
|
java.util.List<Option.Builder> |
getOptionsBuilderList()
The protocol buffer options.
|
int |
getOptionsCount()
The protocol buffer options.
|
java.util.List<Option> |
getOptionsList()
The protocol buffer options.
|
OptionOrBuilder |
getOptionsOrBuilder(int index)
The protocol buffer options.
|
java.util.List<? extends OptionOrBuilder> |
getOptionsOrBuilderList()
The protocol buffer options.
|
boolean |
getPacked()
Whether to use alternative packed wire representation.
|
java.lang.String |
getTypeUrl()
The field type URL, without the scheme, for message or enumeration
types.
|
com.google.protobuf.ByteString |
getTypeUrlBytes()
The field type URL, without the scheme, for message or enumeration
types.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Field.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Field.Builder |
mergeFrom(Field other) |
Field.Builder |
mergeFrom(com.google.protobuf.Message other) |
Field.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Field.Builder |
removeOptions(int index)
The protocol buffer options.
|
Field.Builder |
setCardinality(Field.Cardinality value)
The field cardinality.
|
Field.Builder |
setCardinalityValue(int value)
The field cardinality.
|
Field.Builder |
setDefaultValue(java.lang.String value)
The string value of the default value of this field.
|
Field.Builder |
setDefaultValueBytes(com.google.protobuf.ByteString value)
The string value of the default value of this field.
|
Field.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) |
Field.Builder |
setJsonName(java.lang.String value)
The field JSON name.
|
Field.Builder |
setJsonNameBytes(com.google.protobuf.ByteString value)
The field JSON name.
|
Field.Builder |
setKind(Field.Kind value)
The field type.
|
Field.Builder |
setKindValue(int value)
The field type.
|
Field.Builder |
setName(java.lang.String value)
The field name.
|
Field.Builder |
setNameBytes(com.google.protobuf.ByteString value)
The field name.
|
Field.Builder |
setNumber(int value)
The field number.
|
Field.Builder |
setOneofIndex(int value)
The index of the field type in `Type.oneofs`, for message or enumeration
types.
|
Field.Builder |
setOptions(int index,
Option.Builder builderForValue)
The protocol buffer options.
|
Field.Builder |
setOptions(int index,
Option value)
The protocol buffer options.
|
Field.Builder |
setPacked(boolean value)
Whether to use alternative packed wire representation.
|
Field.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) |
Field.Builder |
setTypeUrl(java.lang.String value)
The field type URL, without the scheme, for message or enumeration
types.
|
Field.Builder |
setTypeUrlBytes(com.google.protobuf.ByteString value)
The field type URL, without the scheme, for message or enumeration
types.
|
Field.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Field.Builder>public Field.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Field.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Field.Builder>public Field getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Field build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Field buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Field.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Field.Builder>public Field.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<Field.Builder>public Field.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Field.Builder>public Field.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Field.Builder>public Field.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Field.Builder>public Field.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Field.Builder>public Field.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Field.Builder>public Field.Builder mergeFrom(Field other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Field.Builder>public Field.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Field.Builder>java.io.IOExceptionpublic int getKindValue()
The field type.
.google.protobuf.Field.Kind kind = 1;getKindValue in interface FieldOrBuilderpublic Field.Builder setKindValue(int value)
The field type.
.google.protobuf.Field.Kind kind = 1;public Field.Kind getKind()
The field type.
.google.protobuf.Field.Kind kind = 1;getKind in interface FieldOrBuilderpublic Field.Builder setKind(Field.Kind value)
The field type.
.google.protobuf.Field.Kind kind = 1;public Field.Builder clearKind()
The field type.
.google.protobuf.Field.Kind kind = 1;public int getCardinalityValue()
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;getCardinalityValue in interface FieldOrBuilderpublic Field.Builder setCardinalityValue(int value)
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;public Field.Cardinality getCardinality()
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;getCardinality in interface FieldOrBuilderpublic Field.Builder setCardinality(Field.Cardinality value)
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;public Field.Builder clearCardinality()
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;public int getNumber()
The field number.
int32 number = 3;getNumber in interface FieldOrBuilderpublic Field.Builder setNumber(int value)
The field number.
int32 number = 3;public Field.Builder clearNumber()
The field number.
int32 number = 3;public java.lang.String getName()
The field name.
string name = 4;getName in interface FieldOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
The field name.
string name = 4;getNameBytes in interface FieldOrBuilderpublic Field.Builder setName(java.lang.String value)
The field name.
string name = 4;public Field.Builder clearName()
The field name.
string name = 4;public Field.Builder setNameBytes(com.google.protobuf.ByteString value)
The field name.
string name = 4;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;getTypeUrl in interface FieldOrBuilderpublic com.google.protobuf.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;getTypeUrlBytes in interface FieldOrBuilderpublic 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;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;public Field.Builder setTypeUrlBytes(com.google.protobuf.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;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;getOneofIndex in interface FieldOrBuilderpublic 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;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;public boolean getPacked()
Whether to use alternative packed wire representation.
bool packed = 8;getPacked in interface FieldOrBuilderpublic Field.Builder setPacked(boolean value)
Whether to use alternative packed wire representation.
bool packed = 8;public Field.Builder clearPacked()
Whether to use alternative packed wire representation.
bool packed = 8;public java.util.List<Option> getOptionsList()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;getOptionsList in interface FieldOrBuilderpublic int getOptionsCount()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;getOptionsCount in interface FieldOrBuilderpublic Option getOptions(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;getOptions in interface FieldOrBuilderpublic Field.Builder setOptions(int index, Option value)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;public Field.Builder setOptions(int index, Option.Builder builderForValue)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;public Field.Builder addOptions(Option value)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;public Field.Builder addOptions(int index, Option value)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;public Field.Builder addOptions(Option.Builder builderForValue)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;public Field.Builder addOptions(int index, Option.Builder builderForValue)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;public Field.Builder addAllOptions(java.lang.Iterable<? extends Option> values)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;public Field.Builder clearOptions()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;public Field.Builder removeOptions(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;public Option.Builder getOptionsBuilder(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;public OptionOrBuilder getOptionsOrBuilder(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;getOptionsOrBuilder in interface FieldOrBuilderpublic java.util.List<? extends OptionOrBuilder> getOptionsOrBuilderList()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;getOptionsOrBuilderList in interface FieldOrBuilderpublic Option.Builder addOptionsBuilder()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;public Option.Builder addOptionsBuilder(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;public java.util.List<Option.Builder> getOptionsBuilderList()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;public java.lang.String getJsonName()
The field JSON name.
string json_name = 10;getJsonName in interface FieldOrBuilderpublic com.google.protobuf.ByteString getJsonNameBytes()
The field JSON name.
string json_name = 10;getJsonNameBytes in interface FieldOrBuilderpublic Field.Builder setJsonName(java.lang.String value)
The field JSON name.
string json_name = 10;public Field.Builder clearJsonName()
The field JSON name.
string json_name = 10;public Field.Builder setJsonNameBytes(com.google.protobuf.ByteString value)
The field JSON name.
string json_name = 10;public java.lang.String getDefaultValue()
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;getDefaultValue in interface FieldOrBuilderpublic com.google.protobuf.ByteString getDefaultValueBytes()
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;getDefaultValueBytes in interface FieldOrBuilderpublic Field.Builder setDefaultValue(java.lang.String value)
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;public Field.Builder clearDefaultValue()
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;public Field.Builder setDefaultValueBytes(com.google.protobuf.ByteString value)
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;public final Field.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Field.Builder>public final Field.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Field.Builder>