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
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > GeneratedMessageLite.Builder > Field.BuilderImplements
FieldOrBuilderMethods
addAllOptions(Iterable<? extends Option> values)
public
Field
.
Builder
addAllOptions
(
Iterable
< ?
extends
Option
>
values
)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
addOptions(Option value)
public
Field
.
Builder
addOptions
(
Option
value
)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
addOptions(Option.Builder builderForValue)
public
Field
.
Builder
addOptions
(
Option
.
Builder
builderForValue
)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
addOptions(int index, Option value)
public
Field
.
Builder
addOptions
(
int
index
,
Option
value
)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
addOptions(int index, Option.Builder builderForValue)
public
Field
.
Builder
addOptions
(
int
index
,
Option
.
Builder
builderForValue
)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
clearCardinality()
public
Field
.
Builder
clearCardinality
()
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;
clearDefaultValue()
public
Field
.
Builder
clearDefaultValue
()
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;
clearJsonName()
public
Field
.
Builder
clearJsonName
()
The field JSON name.
string json_name = 10;
clearKind()
public
Field
.
Builder
clearKind
()
The field type.
.google.protobuf.Field.Kind kind = 1;
clearName()
public
Field
.
Builder
clearName
()
The field name.
string name = 4;
clearNumber()
public
Field
.
Builder
clearNumber
()
The field number.
int32 number = 3;
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;
clearOptions()
public
Field
.
Builder
clearOptions
()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
clearPacked()
public
Field
.
Builder
clearPacked
()
Whether to use alternative packed wire representation.
bool packed = 8;
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;
getCardinality()
public
Field
.
Cardinality
getCardinality
()
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;
getCardinalityValue()
public
int
getCardinalityValue
()
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;
getDefaultValue()
public
String
getDefaultValue
()
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;
getDefaultValueBytes()
public
ByteString
getDefaultValueBytes
()
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;
getJsonName()
public
String
getJsonName
()
The field JSON name.
string json_name = 10;
getJsonNameBytes()
public
ByteString
getJsonNameBytes
()
The field JSON name.
string json_name = 10;
getKind()
public
Field
.
Kind
getKind
()
The field type.
.google.protobuf.Field.Kind kind = 1;
getKindValue()
public
int
getKindValue
()
The field type.
.google.protobuf.Field.Kind kind = 1;
getName()
public
String
getName
()
The field name.
string name = 4;
getNameBytes()
public
ByteString
getNameBytes
()
The field name.
string name = 4;
getNumber()
public
int
getNumber
()
The field number.
int32 number = 3;
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;
getOptions(int index)
public
Option
getOptions
(
int
index
)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
getOptionsCount()
public
int
getOptionsCount
()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
getOptionsList()
public
List<Option>
getOptionsList
()
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
getPacked()
public
boolean
getPacked
()
Whether to use alternative packed wire representation.
bool packed = 8;
getTypeUrl()
public
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;
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;
removeOptions(int index)
public
Field
.
Builder
removeOptions
(
int
index
)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
setCardinality(Field.Cardinality value)
public
Field
.
Builder
setCardinality
(
Field
.
Cardinality
value
)
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;
value
setCardinalityValue(int value)
public
Field
.
Builder
setCardinalityValue
(
int
value
)
The field cardinality.
.google.protobuf.Field.Cardinality cardinality = 2;
setDefaultValue(String value)
public
Field
.
Builder
setDefaultValue
(
String
value
)
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;
setDefaultValueBytes(ByteString value)
public
Field
.
Builder
setDefaultValueBytes
(
ByteString
value
)
The string value of the default value of this field. Proto2 syntax only.
string default_value = 11;
setJsonName(String value)
public
Field
.
Builder
setJsonName
(
String
value
)
The field JSON name.
string json_name = 10;
setJsonNameBytes(ByteString value)
public
Field
.
Builder
setJsonNameBytes
(
ByteString
value
)
The field JSON name.
string json_name = 10;
setKind(Field.Kind value)
public
Field
.
Builder
setKind
(
Field
.
Kind
value
)
The field type.
.google.protobuf.Field.Kind kind = 1;
setKindValue(int value)
public
Field
.
Builder
setKindValue
(
int
value
)
The field type.
.google.protobuf.Field.Kind kind = 1;
setName(String value)
public
Field
.
Builder
setName
(
String
value
)
The field name.
string name = 4;
setNameBytes(ByteString value)
public
Field
.
Builder
setNameBytes
(
ByteString
value
)
The field name.
string name = 4;
setNumber(int value)
public
Field
.
Builder
setNumber
(
int
value
)
The field number.
int32 number = 3;
setOneofIndex(int value)
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;
setOptions(int index, Option value)
public
Field
.
Builder
setOptions
(
int
index
,
Option
value
)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
setOptions(int index, Option.Builder builderForValue)
public
Field
.
Builder
setOptions
(
int
index
,
Option
.
Builder
builderForValue
)
The protocol buffer options.
repeated .google.protobuf.Option options = 9;
setPacked(boolean value)
public
Field
.
Builder
setPacked
(
boolean
value
)
Whether to use alternative packed wire representation.
bool packed = 8;
setTypeUrl(String value)
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"
.
string type_url = 6;
setTypeUrlBytes(ByteString value)
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;