public static final class Field.Builder extends GeneratedMessageLite.Builder<Field,Field.Builder> implements FieldOrBuilder
A single field of a message type.Protobuf type
google.protobuf.Field
instance, isBuilt
Modifier and Type | Method and Description |
---|---|
Field.Builder |
addAllOptions(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.
|
Field.Builder |
clearCardinality()
The field cardinality.
|
Field.Builder |
clearDefaultValue()
The string value of the default value of this 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 |
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.Cardinality |
getCardinality()
The field cardinality.
|
int |
getCardinalityValue()
The field cardinality.
|
String |
getDefaultValue()
The string value of the default value of this field.
|
ByteString |
getDefaultValueBytes()
The string value of the default value of this field.
|
String |
getJsonName()
The field JSON name.
|
ByteString |
getJsonNameBytes()
The field JSON name.
|
Field.Kind |
getKind()
The field type.
|
int |
getKindValue()
The field type.
|
String |
getName()
The field name.
|
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.
|
int |
getOptionsCount()
The protocol buffer options.
|
List<Option> |
getOptionsList()
The protocol buffer options.
|
boolean |
getPacked()
Whether to use alternative packed wire representation.
|
String |
getTypeUrl()
The field type URL, without the scheme, for message or enumeration
types.
|
ByteString |
getTypeUrlBytes()
The field type URL, without the scheme, for message or enumeration
types.
|
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(String value)
The string value of the default value of this field.
|
Field.Builder |
setDefaultValueBytes(ByteString value)
The string value of the default value of this field.
|
Field.Builder |
setJsonName(String value)
The field JSON name.
|
Field.Builder |
setJsonNameBytes(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(String value)
The field name.
|
Field.Builder |
setNameBytes(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 |
setTypeUrl(String value)
The field type URL, without the scheme, for message or enumeration
types.
|
Field.Builder |
setTypeUrlBytes(ByteString value)
The field type URL, without the scheme, for message or enumeration
types.
|
build, buildPartial, clear, clone, copyOnWrite, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom
addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDefaultInstanceForType, isInitialized
public int getKindValue()
The field type.
optional .google.protobuf.Field.Kind kind = 1;
getKindValue
in interface FieldOrBuilder
public Field.Builder setKindValue(int value)
The field type.
optional .google.protobuf.Field.Kind kind = 1;
public Field.Kind getKind()
The field type.
optional .google.protobuf.Field.Kind kind = 1;
getKind
in interface FieldOrBuilder
public Field.Builder setKind(Field.Kind value)
The field type.
optional .google.protobuf.Field.Kind kind = 1;
public Field.Builder clearKind()
The field type.
optional .google.protobuf.Field.Kind kind = 1;
public int getCardinalityValue()
The field cardinality.
optional .google.protobuf.Field.Cardinality cardinality = 2;
getCardinalityValue
in interface FieldOrBuilder
public Field.Builder setCardinalityValue(int value)
The field cardinality.
optional .google.protobuf.Field.Cardinality cardinality = 2;
public Field.Cardinality getCardinality()
The field cardinality.
optional .google.protobuf.Field.Cardinality cardinality = 2;
getCardinality
in interface FieldOrBuilder
public Field.Builder setCardinality(Field.Cardinality value)
The field cardinality.
optional .google.protobuf.Field.Cardinality cardinality = 2;
public Field.Builder clearCardinality()
The field cardinality.
optional .google.protobuf.Field.Cardinality cardinality = 2;
public int getNumber()
The field number.
optional int32 number = 3;
getNumber
in interface FieldOrBuilder
public Field.Builder setNumber(int value)
The field number.
optional int32 number = 3;
public Field.Builder clearNumber()
The field number.
optional int32 number = 3;
public String getName()
The field name.
optional string name = 4;
getName
in interface FieldOrBuilder
public ByteString getNameBytes()
The field name.
optional string name = 4;
getNameBytes
in interface FieldOrBuilder
public Field.Builder setName(String value)
The field name.
optional string name = 4;
public Field.Builder clearName()
The field name.
optional string name = 4;
public Field.Builder setNameBytes(ByteString value)
The field name.
optional string name = 4;
public String getTypeUrl()
The field type URL, without the scheme, for message or enumeration types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
optional string type_url = 6;
getTypeUrl
in interface FieldOrBuilder
public ByteString getTypeUrlBytes()
The field type URL, without the scheme, for message or enumeration types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
optional string type_url = 6;
getTypeUrlBytes
in interface FieldOrBuilder
public Field.Builder setTypeUrl(String value)
The field type URL, without the scheme, for message or enumeration types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
optional 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"`.
optional string type_url = 6;
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"`.
optional 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.
optional int32 oneof_index = 7;
getOneofIndex
in interface FieldOrBuilder
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.
optional 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.
optional int32 oneof_index = 7;
public boolean getPacked()
Whether to use alternative packed wire representation.
optional bool packed = 8;
getPacked
in interface FieldOrBuilder
public Field.Builder setPacked(boolean value)
Whether to use alternative packed wire representation.
optional bool packed = 8;
public Field.Builder clearPacked()
Whether to use alternative packed wire representation.
optional bool packed = 8;
public List<Option> getOptionsList()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
getOptionsList
in interface FieldOrBuilder
public int getOptionsCount()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
getOptionsCount
in interface FieldOrBuilder
public Option getOptions(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
getOptions
in interface FieldOrBuilder
public 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(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 String getJsonName()
The field JSON name.
optional string json_name = 10;
getJsonName
in interface FieldOrBuilder
public ByteString getJsonNameBytes()
The field JSON name.
optional string json_name = 10;
getJsonNameBytes
in interface FieldOrBuilder
public Field.Builder setJsonName(String value)
The field JSON name.
optional string json_name = 10;
public Field.Builder clearJsonName()
The field JSON name.
optional string json_name = 10;
public Field.Builder setJsonNameBytes(ByteString value)
The field JSON name.
optional string json_name = 10;
public String getDefaultValue()
The string value of the default value of this field. Proto2 syntax only.
optional string default_value = 11;
getDefaultValue
in interface FieldOrBuilder
public ByteString getDefaultValueBytes()
The string value of the default value of this field. Proto2 syntax only.
optional string default_value = 11;
getDefaultValueBytes
in interface FieldOrBuilder
public Field.Builder setDefaultValue(String value)
The string value of the default value of this field. Proto2 syntax only.
optional string default_value = 11;
public Field.Builder clearDefaultValue()
The string value of the default value of this field. Proto2 syntax only.
optional string default_value = 11;
public Field.Builder setDefaultValueBytes(ByteString value)
The string value of the default value of this field. Proto2 syntax only.
optional string default_value = 11;
Copyright © 2008–2016 Google. All rights reserved.