Class Type.Builder (3.19.4)

public static final class Type.Builder extends GeneratedMessageLite.Builder<Type,Type.Builder> implements TypeOrBuilder

A protocol buffer message type.

Protobuf type google.protobuf.Type

Implements

TypeOrBuilder

Methods

addAllFields(Iterable<? extends Field> values)

public Type.Builder addAllFields(Iterable<? extends Field> values)

The list of fields.

repeated .google.protobuf.Field fields = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.protobuf.Field>
Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The oneofs to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.protobuf.Option>
Returns
TypeDescription
Type.Builder

addFields(Field value)

public Type.Builder addFields(Field value)

The list of fields.

repeated .google.protobuf.Field fields = 2;

Parameter
NameDescription
valueField
Returns
TypeDescription
Type.Builder

addFields(Field.Builder builderForValue)

public Type.Builder addFields(Field.Builder builderForValue)

The list of fields.

repeated .google.protobuf.Field fields = 2;

Parameter
NameDescription
builderForValueField.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueField
Returns
TypeDescription
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
NameDescription
indexint
builderForValueField.Builder
Returns
TypeDescription
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
NameDescription
valueString

The oneofs to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the oneofs to add.

Returns
TypeDescription
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
NameDescription
valueOption
Returns
TypeDescription
Type.Builder

addOptions(Option.Builder builderForValue)

public Type.Builder addOptions(Option.Builder builderForValue)

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Parameter
NameDescription
builderForValueOption.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueOption
Returns
TypeDescription
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
NameDescription
indexint
builderForValueOption.Builder
Returns
TypeDescription
Type.Builder

clearFields()

public Type.Builder clearFields()

The list of fields.

repeated .google.protobuf.Field fields = 2;

Returns
TypeDescription
Type.Builder

clearName()

public Type.Builder clearName()

The fully qualified message name.

string name = 1;

Returns
TypeDescription
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
TypeDescription
Type.Builder

This builder for chaining.

clearOptions()

public Type.Builder clearOptions()

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Returns
TypeDescription
Type.Builder

clearSourceContext()

public Type.Builder clearSourceContext()

The source context.

.google.protobuf.SourceContext source_context = 5;

Returns
TypeDescription
Type.Builder

clearSyntax()

public Type.Builder clearSyntax()

The source syntax.

.google.protobuf.Syntax syntax = 6;

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Field

getFieldsCount()

public int getFieldsCount()

The list of fields.

repeated .google.protobuf.Field fields = 2;

Returns
TypeDescription
int

getFieldsList()

public List<Field> getFieldsList()

The list of fields.

repeated .google.protobuf.Field fields = 2;

Returns
TypeDescription
List<Field>

getName()

public String getName()

The fully qualified message name.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The fully qualified message name.

string name = 1;

Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Option

getOptionsCount()

public int getOptionsCount()

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Returns
TypeDescription
int

getOptionsList()

public List<Option> getOptionsList()

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Returns
TypeDescription
List<Option>

getSourceContext()

public SourceContext getSourceContext()

The source context.

.google.protobuf.SourceContext source_context = 5;

Returns
TypeDescription
SourceContext

getSyntax()

public Syntax getSyntax()

The source syntax.

.google.protobuf.Syntax syntax = 6;

Returns
TypeDescription
Syntax

The syntax.

getSyntaxValue()

public int getSyntaxValue()

The source syntax.

.google.protobuf.Syntax syntax = 6;

Returns
TypeDescription
int

The enum numeric value on the wire for syntax.

hasSourceContext()

public boolean hasSourceContext()

The source context.

.google.protobuf.SourceContext source_context = 5;

Returns
TypeDescription
boolean

mergeSourceContext(SourceContext value)

public Type.Builder mergeSourceContext(SourceContext value)

The source context.

.google.protobuf.SourceContext source_context = 5;

Parameter
NameDescription
valueSourceContext
Returns
TypeDescription
Type.Builder

removeFields(int index)

public Type.Builder removeFields(int index)

The list of fields.

repeated .google.protobuf.Field fields = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
Type.Builder

removeOptions(int index)

public Type.Builder removeOptions(int index)

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
valueField
Returns
TypeDescription
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
NameDescription
indexint
builderForValueField.Builder
Returns
TypeDescription
Type.Builder

setName(String value)

public Type.Builder setName(String value)

The fully qualified message name.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Type.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Type.Builder setNameBytes(ByteString value)

The fully qualified message name.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The oneofs to set.

Returns
TypeDescription
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
NameDescription
indexint
valueOption
Returns
TypeDescription
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
NameDescription
indexint
builderForValueOption.Builder
Returns
TypeDescription
Type.Builder

setSourceContext(SourceContext value)

public Type.Builder setSourceContext(SourceContext value)

The source context.

.google.protobuf.SourceContext source_context = 5;

Parameter
NameDescription
valueSourceContext
Returns
TypeDescription
Type.Builder

setSourceContext(SourceContext.Builder builderForValue)

public Type.Builder setSourceContext(SourceContext.Builder builderForValue)

The source context.

.google.protobuf.SourceContext source_context = 5;

Parameter
NameDescription
builderForValueSourceContext.Builder
Returns
TypeDescription
Type.Builder

setSyntax(Syntax value)

public Type.Builder setSyntax(Syntax value)

The source syntax.

.google.protobuf.Syntax syntax = 6;

Parameter
NameDescription
valueSyntax

The enum numeric value on the wire for syntax to set.

Returns
TypeDescription
Type.Builder

This builder for chaining.

setSyntaxValue(int value)

public Type.Builder setSyntaxValue(int value)

The source syntax.

.google.protobuf.Syntax syntax = 6;

Parameter
NameDescription
valueint

The syntax to set.

Returns
TypeDescription
Type.Builder

This builder for chaining.