public static final class Type.Builder extends GeneratedMessageLite.Builder<Type,Type.Builder> implements TypeOrBuilderA protocol buffer message type.
Protobuf type google.protobuf.Type
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > GeneratedMessageLite.Builder > Type.BuilderImplements
TypeOrBuilderMethods
addAllFields(Iterable<? extends Field> values)
public Type.Builder addAllFields(Iterable<? extends Field> values)The list of fields.
repeated .google.protobuf.Field fields = 2;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.protobuf.Field> |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
addAllOneofs(Iterable<String> values)
public Type.Builder addAllOneofs(Iterable<String> values) The list of types appearing in oneof definitions in this type.
repeated string oneofs = 3;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The oneofs to add. |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
This builder for chaining. |
addAllOptions(Iterable<? extends Option> values)
public Type.Builder addAllOptions(Iterable<? extends Option> values)The protocol buffer options.
repeated .google.protobuf.Option options = 4;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.protobuf.Option> |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
addFields(Field value)
public Type.Builder addFields(Field value)The list of fields.
repeated .google.protobuf.Field fields = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
Field |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
addFields(Field.Builder builderForValue)
public Type.Builder addFields(Field.Builder builderForValue)The list of fields.
repeated .google.protobuf.Field fields = 2;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Field.Builder |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
addFields(int index, Field value)
public Type.Builder addFields(int index, Field value)The list of fields.
repeated .google.protobuf.Field fields = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Field |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
addFields(int index, Field.Builder builderForValue)
public Type.Builder addFields(int index, Field.Builder builderForValue)The list of fields.
repeated .google.protobuf.Field fields = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Field.Builder |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
addOneofs(String value)
public Type.Builder addOneofs(String value) The list of types appearing in oneof definitions in this type.
repeated string oneofs = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe oneofs to add. |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
This builder for chaining. |
addOneofsBytes(ByteString value)
public Type.Builder addOneofsBytes(ByteString value) The list of types appearing in oneof definitions in this type.
repeated string oneofs = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes of the oneofs to add. |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
This builder for chaining. |
addOptions(Option value)
public Type.Builder addOptions(Option value)The protocol buffer options.
repeated .google.protobuf.Option options = 4;
| Parameter | |
|---|---|
| Name | Description |
value |
Option |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
addOptions(Option.Builder builderForValue)
public Type.Builder addOptions(Option.Builder builderForValue)The protocol buffer options.
repeated .google.protobuf.Option options = 4;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Option.Builder |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
addOptions(int index, Option value)
public Type.Builder addOptions(int index, Option value)The protocol buffer options.
repeated .google.protobuf.Option options = 4;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Option |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
addOptions(int index, Option.Builder builderForValue)
public Type.Builder addOptions(int index, Option.Builder builderForValue)The protocol buffer options.
repeated .google.protobuf.Option options = 4;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Option.Builder |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
clearFields()
public Type.Builder clearFields()The list of fields.
repeated .google.protobuf.Field fields = 2;
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
clearName()
public Type.Builder clearName()The fully qualified message name.
string name = 1;
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
This builder for chaining. |
clearOneofs()
public Type.Builder clearOneofs() The list of types appearing in oneof definitions in this type.
repeated string oneofs = 3;
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
This builder for chaining. |
clearOptions()
public Type.Builder clearOptions()The protocol buffer options.
repeated .google.protobuf.Option options = 4;
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
clearSourceContext()
public Type.Builder clearSourceContext()The source context.
.google.protobuf.SourceContext source_context = 5;
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
clearSyntax()
public Type.Builder clearSyntax()The source syntax.
.google.protobuf.Syntax syntax = 6;
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
This builder for chaining. |
getFields(int index)
public Field getFields(int index)The list of fields.
repeated .google.protobuf.Field fields = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Field |
|
getFieldsCount()
public int getFieldsCount()The list of fields.
repeated .google.protobuf.Field fields = 2;
| Returns | |
|---|---|
| Type | Description |
int |
|
getFieldsList()
public List<Field> getFieldsList()The list of fields.
repeated .google.protobuf.Field fields = 2;
| Returns | |
|---|---|
| Type | Description |
List<Field> |
|
getName()
public String getName()The fully qualified message name.
string name = 1;
| Returns | |
|---|---|
| Type | Description |
String |
The name. |
getNameBytes()
public ByteString getNameBytes()The fully qualified message name.
string name = 1;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for name. |
getOneofs(int index)
public String getOneofs(int index) The list of types appearing in oneof definitions in this type.
repeated string oneofs = 3;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The oneofs at the given index. |
getOneofsBytes(int index)
public ByteString getOneofsBytes(int index) The list of types appearing in oneof definitions in this type.
repeated string oneofs = 3;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the oneofs at the given index. |
getOneofsCount()
public int getOneofsCount() The list of types appearing in oneof definitions in this type.
repeated string oneofs = 3;
| Returns | |
|---|---|
| Type | Description |
int |
The count of oneofs. |
getOneofsList()
public List<String> getOneofsList() The list of types appearing in oneof definitions in this type.
repeated string oneofs = 3;
| Returns | |
|---|---|
| Type | Description |
List<String> |
A list containing the oneofs. |
getOptions(int index)
public Option getOptions(int index)The protocol buffer options.
repeated .google.protobuf.Option options = 4;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Option |
|
getOptionsCount()
public int getOptionsCount()The protocol buffer options.
repeated .google.protobuf.Option options = 4;
| Returns | |
|---|---|
| Type | Description |
int |
|
getOptionsList()
public List<Option> getOptionsList()The protocol buffer options.
repeated .google.protobuf.Option options = 4;
| Returns | |
|---|---|
| Type | Description |
List<Option> |
|
getSourceContext()
public SourceContext getSourceContext()The source context.
.google.protobuf.SourceContext source_context = 5;
| Returns | |
|---|---|
| Type | Description |
SourceContext |
|
getSyntax()
public Syntax getSyntax()The source syntax.
.google.protobuf.Syntax syntax = 6;
| Returns | |
|---|---|
| Type | Description |
Syntax |
The syntax. |
getSyntaxValue()
public int getSyntaxValue()The source syntax.
.google.protobuf.Syntax syntax = 6;
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for syntax. |
hasSourceContext()
public boolean hasSourceContext()The source context.
.google.protobuf.SourceContext source_context = 5;
| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeSourceContext(SourceContext value)
public Type.Builder mergeSourceContext(SourceContext value)The source context.
.google.protobuf.SourceContext source_context = 5;
| Parameter | |
|---|---|
| Name | Description |
value |
SourceContext |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
removeFields(int index)
public Type.Builder removeFields(int index)The list of fields.
repeated .google.protobuf.Field fields = 2;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
removeOptions(int index)
public Type.Builder removeOptions(int index)The protocol buffer options.
repeated .google.protobuf.Option options = 4;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
setFields(int index, Field value)
public Type.Builder setFields(int index, Field value)The list of fields.
repeated .google.protobuf.Field fields = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Field |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
setFields(int index, Field.Builder builderForValue)
public Type.Builder setFields(int index, Field.Builder builderForValue)The list of fields.
repeated .google.protobuf.Field fields = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Field.Builder |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
setName(String value)
public Type.Builder setName(String value)The fully qualified message name.
string name = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe name to set. |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
This builder for chaining. |
setNameBytes(ByteString value)
public Type.Builder setNameBytes(ByteString value)The fully qualified message name.
string name = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for name to set. |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
This builder for chaining. |
setOneofs(int index, String value)
public Type.Builder setOneofs(int index, String value) The list of types appearing in oneof definitions in this type.
repeated string oneofs = 3;
| Parameters | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
StringThe oneofs to set. |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
This builder for chaining. |
setOptions(int index, Option value)
public Type.Builder setOptions(int index, Option value)The protocol buffer options.
repeated .google.protobuf.Option options = 4;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Option |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
setOptions(int index, Option.Builder builderForValue)
public Type.Builder setOptions(int index, Option.Builder builderForValue)The protocol buffer options.
repeated .google.protobuf.Option options = 4;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Option.Builder |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
setSourceContext(SourceContext value)
public Type.Builder setSourceContext(SourceContext value)The source context.
.google.protobuf.SourceContext source_context = 5;
| Parameter | |
|---|---|
| Name | Description |
value |
SourceContext |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
setSourceContext(SourceContext.Builder builderForValue)
public Type.Builder setSourceContext(SourceContext.Builder builderForValue)The source context.
.google.protobuf.SourceContext source_context = 5;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
SourceContext.Builder |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
|
setSyntax(Syntax value)
public Type.Builder setSyntax(Syntax value)The source syntax.
.google.protobuf.Syntax syntax = 6;
| Parameter | |
|---|---|
| Name | Description |
value |
SyntaxThe enum numeric value on the wire for syntax to set. |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
This builder for chaining. |
setSyntaxValue(int value)
public Type.Builder setSyntaxValue(int value)The source syntax.
.google.protobuf.Syntax syntax = 6;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe syntax to set. |
| Returns | |
|---|---|
| Type | Description |
Type.Builder |
This builder for chaining. |