Package com.google.protobuf
Interface FieldOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
Field,Field.Builder
public interface FieldOrBuilder extends com.google.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Field.CardinalitygetCardinality()The field cardinality.intgetCardinalityValue()The field cardinality.java.lang.StringgetDefaultValue()The string value of the default value of this field.com.google.protobuf.ByteStringgetDefaultValueBytes()The string value of the default value of this field.java.lang.StringgetJsonName()The field JSON name.com.google.protobuf.ByteStringgetJsonNameBytes()The field JSON name.Field.KindgetKind()The field type.intgetKindValue()The field type.java.lang.StringgetName()The field name.com.google.protobuf.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.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.com.google.protobuf.ByteStringgetTypeUrlBytes()The field type URL, without the scheme, for message or enumeration types.-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
getKindValue
int getKindValue()
The field type.
.google.protobuf.Field.Kind kind = 1;- Returns:
- The enum numeric value on the wire for kind.
-
getKind
Field.Kind getKind()
The field type.
.google.protobuf.Field.Kind kind = 1;- Returns:
- The kind.
-
getCardinalityValue
int getCardinalityValue()
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;- Returns:
- The enum numeric value on the wire for cardinality.
-
getCardinality
Field.Cardinality getCardinality()
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;- Returns:
- The cardinality.
-
getNumber
int getNumber()
The field number.
int32 number = 3;- Returns:
- The number.
-
getName
java.lang.String getName()
The field name.
string name = 4;- Returns:
- The name.
-
getNameBytes
com.google.protobuf.ByteString getNameBytes()
The field name.
string name = 4;- Returns:
- The bytes for name.
-
getTypeUrl
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;- Returns:
- The typeUrl.
-
getTypeUrlBytes
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;- Returns:
- The bytes for typeUrl.
-
getOneofIndex
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;- Returns:
- The oneofIndex.
-
getPacked
boolean getPacked()
Whether to use alternative packed wire representation.
bool packed = 8;- Returns:
- The packed.
-
getOptionsList
java.util.List<Option> getOptionsList()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
getOptions
Option getOptions(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
getOptionsCount
int getOptionsCount()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
getOptionsOrBuilderList
java.util.List<? extends OptionOrBuilder> getOptionsOrBuilderList()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
getOptionsOrBuilder
OptionOrBuilder getOptionsOrBuilder(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
-
getJsonName
java.lang.String getJsonName()
The field JSON name.
string json_name = 10;- Returns:
- The jsonName.
-
getJsonNameBytes
com.google.protobuf.ByteString getJsonNameBytes()
The field JSON name.
string json_name = 10;- Returns:
- The bytes for jsonName.
-
getDefaultValue
java.lang.String getDefaultValue()
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;- Returns:
- The defaultValue.
-
getDefaultValueBytes
com.google.protobuf.ByteString getDefaultValueBytes()
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;- Returns:
- The bytes for defaultValue.
-
-