Package com.google.protobuf
Class Type.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
-
- com.google.protobuf.GeneratedMessageLite.Builder<Type,Type.Builder>
-
- com.google.protobuf.Type.Builder
-
- All Implemented Interfaces:
MessageLite.Builder,MessageLiteOrBuilder,TypeOrBuilder,Cloneable
- Enclosing class:
- Type
public static final class Type.Builder extends GeneratedMessageLite.Builder<Type,Type.Builder> implements TypeOrBuilder
A protocol buffer message type.
Protobuf typegoogle.protobuf.Type
-
-
Field Summary
-
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Type.BuilderaddAllFields(Iterable<? extends Field> values)The list of fields.Type.BuilderaddAllOneofs(Iterable<String> values)The list of types appearing in `oneof` definitions in this type.Type.BuilderaddAllOptions(Iterable<? extends Option> values)The protocol buffer options.Type.BuilderaddFields(int index, Field value)The list of fields.Type.BuilderaddFields(int index, Field.Builder builderForValue)The list of fields.Type.BuilderaddFields(Field value)The list of fields.Type.BuilderaddFields(Field.Builder builderForValue)The list of fields.Type.BuilderaddOneofs(String value)The list of types appearing in `oneof` definitions in this type.Type.BuilderaddOneofsBytes(ByteString value)The list of types appearing in `oneof` definitions in this type.Type.BuilderaddOptions(int index, Option value)The protocol buffer options.Type.BuilderaddOptions(int index, Option.Builder builderForValue)The protocol buffer options.Type.BuilderaddOptions(Option value)The protocol buffer options.Type.BuilderaddOptions(Option.Builder builderForValue)The protocol buffer options.Type.BuilderclearFields()The list of fields.Type.BuilderclearName()The fully qualified message name.Type.BuilderclearOneofs()The list of types appearing in `oneof` definitions in this type.Type.BuilderclearOptions()The protocol buffer options.Type.BuilderclearSourceContext()The source context.Type.BuilderclearSyntax()The source syntax.FieldgetFields(int index)The list of fields.intgetFieldsCount()The list of fields.List<Field>getFieldsList()The list of fields.StringgetName()The fully qualified message name.ByteStringgetNameBytes()The fully qualified message name.StringgetOneofs(int index)The list of types appearing in `oneof` definitions in this type.ByteStringgetOneofsBytes(int index)The list of types appearing in `oneof` definitions in this type.intgetOneofsCount()The list of types appearing in `oneof` definitions in this type.List<String>getOneofsList()The list of types appearing in `oneof` definitions in this type.OptiongetOptions(int index)The protocol buffer options.intgetOptionsCount()The protocol buffer options.List<Option>getOptionsList()The protocol buffer options.SourceContextgetSourceContext()The source context.SyntaxgetSyntax()The source syntax.intgetSyntaxValue()The source syntax.booleanhasSourceContext()The source context.Type.BuildermergeSourceContext(SourceContext value)The source context.Type.BuilderremoveFields(int index)The list of fields.Type.BuilderremoveOptions(int index)The protocol buffer options.Type.BuildersetFields(int index, Field value)The list of fields.Type.BuildersetFields(int index, Field.Builder builderForValue)The list of fields.Type.BuildersetName(String value)The fully qualified message name.Type.BuildersetNameBytes(ByteString value)The fully qualified message name.Type.BuildersetOneofs(int index, String value)The list of types appearing in `oneof` definitions in this type.Type.BuildersetOptions(int index, Option value)The protocol buffer options.Type.BuildersetOptions(int index, Option.Builder builderForValue)The protocol buffer options.Type.BuildersetSourceContext(SourceContext value)The source context.Type.BuildersetSourceContext(SourceContext.Builder builderForValue)The source context.Type.BuildersetSyntax(Syntax value)The source syntax.Type.BuildersetSyntaxValue(int value)The source syntax.-
Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFrom
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
-
-
-
Method Detail
-
getName
public String getName()
The fully qualified message name.
string name = 1;- Specified by:
getNamein interfaceTypeOrBuilder- Returns:
- The name.
-
getNameBytes
public ByteString getNameBytes()
The fully qualified message name.
string name = 1;- Specified by:
getNameBytesin interfaceTypeOrBuilder- Returns:
- The bytes for name.
-
setName
public Type.Builder setName(String value)
The fully qualified message name.
string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
public Type.Builder clearName()
The fully qualified message name.
string name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
public Type.Builder setNameBytes(ByteString value)
The fully qualified message name.
string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getFieldsList
public List<Field> getFieldsList()
The list of fields.
repeated .google.protobuf.Field fields = 2;- Specified by:
getFieldsListin interfaceTypeOrBuilder
-
getFieldsCount
public int getFieldsCount()
The list of fields.
repeated .google.protobuf.Field fields = 2;- Specified by:
getFieldsCountin interfaceTypeOrBuilder
-
getFields
public Field getFields(int index)
The list of fields.
repeated .google.protobuf.Field fields = 2;- Specified by:
getFieldsin interfaceTypeOrBuilder
-
setFields
public Type.Builder setFields(int index, Field value)
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
setFields
public Type.Builder setFields(int index, Field.Builder builderForValue)
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
addFields
public Type.Builder addFields(Field value)
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
addFields
public Type.Builder addFields(int index, Field value)
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
addFields
public Type.Builder addFields(Field.Builder builderForValue)
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
addFields
public Type.Builder addFields(int index, Field.Builder builderForValue)
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
addAllFields
public Type.Builder addAllFields(Iterable<? extends Field> values)
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
clearFields
public Type.Builder clearFields()
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
removeFields
public Type.Builder removeFields(int index)
The list of fields.
repeated .google.protobuf.Field fields = 2;
-
getOneofsList
public List<String> getOneofsList()
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;- Specified by:
getOneofsListin interfaceTypeOrBuilder- Returns:
- A list containing the oneofs.
-
getOneofsCount
public int getOneofsCount()
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;- Specified by:
getOneofsCountin interfaceTypeOrBuilder- Returns:
- The count of oneofs.
-
getOneofs
public String getOneofs(int index)
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;- Specified by:
getOneofsin interfaceTypeOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The oneofs at the given index.
-
getOneofsBytes
public ByteString getOneofsBytes(int index)
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;- Specified by:
getOneofsBytesin interfaceTypeOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the oneofs at the given index.
-
setOneofs
public Type.Builder setOneofs(int index, String value)
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;- Parameters:
index- The index to set the value at.value- The oneofs to set.- Returns:
- This builder for chaining.
-
addOneofs
public Type.Builder addOneofs(String value)
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;- Parameters:
value- The oneofs to add.- Returns:
- This builder for chaining.
-
addAllOneofs
public Type.Builder addAllOneofs(Iterable<String> values)
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;- Parameters:
values- The oneofs to add.- Returns:
- 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:
- This builder for chaining.
-
addOneofsBytes
public Type.Builder addOneofsBytes(ByteString value)
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;- Parameters:
value- The bytes of the oneofs to add.- Returns:
- This builder for chaining.
-
getOptionsList
public List<Option> getOptionsList()
The protocol buffer options.
repeated .google.protobuf.Option options = 4;- Specified by:
getOptionsListin interfaceTypeOrBuilder
-
getOptionsCount
public int getOptionsCount()
The protocol buffer options.
repeated .google.protobuf.Option options = 4;- Specified by:
getOptionsCountin interfaceTypeOrBuilder
-
getOptions
public Option getOptions(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 4;- Specified by:
getOptionsin interfaceTypeOrBuilder
-
setOptions
public Type.Builder setOptions(int index, Option value)
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
setOptions
public Type.Builder setOptions(int index, Option.Builder builderForValue)
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
addOptions
public Type.Builder addOptions(Option value)
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
addOptions
public Type.Builder addOptions(int index, Option value)
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
addOptions
public Type.Builder addOptions(Option.Builder builderForValue)
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
addOptions
public Type.Builder addOptions(int index, Option.Builder builderForValue)
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
addAllOptions
public Type.Builder addAllOptions(Iterable<? extends Option> values)
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
clearOptions
public Type.Builder clearOptions()
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
removeOptions
public Type.Builder removeOptions(int index)
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
-
hasSourceContext
public boolean hasSourceContext()
The source context.
.google.protobuf.SourceContext source_context = 5;- Specified by:
hasSourceContextin interfaceTypeOrBuilder- Returns:
- Whether the sourceContext field is set.
-
getSourceContext
public SourceContext getSourceContext()
The source context.
.google.protobuf.SourceContext source_context = 5;- Specified by:
getSourceContextin interfaceTypeOrBuilder- Returns:
- The sourceContext.
-
setSourceContext
public Type.Builder setSourceContext(SourceContext value)
The source context.
.google.protobuf.SourceContext source_context = 5;
-
setSourceContext
public Type.Builder setSourceContext(SourceContext.Builder builderForValue)
The source context.
.google.protobuf.SourceContext source_context = 5;
-
mergeSourceContext
public Type.Builder mergeSourceContext(SourceContext value)
The source context.
.google.protobuf.SourceContext source_context = 5;
-
clearSourceContext
public Type.Builder clearSourceContext()
The source context.
.google.protobuf.SourceContext source_context = 5;
-
getSyntaxValue
public int getSyntaxValue()
The source syntax.
.google.protobuf.Syntax syntax = 6;- Specified by:
getSyntaxValuein interfaceTypeOrBuilder- Returns:
- The enum numeric value on the wire for syntax.
-
setSyntaxValue
public Type.Builder setSyntaxValue(int value)
The source syntax.
.google.protobuf.Syntax syntax = 6;- Parameters:
value- The syntax to set.- Returns:
- This builder for chaining.
-
getSyntax
public Syntax getSyntax()
The source syntax.
.google.protobuf.Syntax syntax = 6;- Specified by:
getSyntaxin interfaceTypeOrBuilder- Returns:
- The syntax.
-
setSyntax
public Type.Builder setSyntax(Syntax value)
The source syntax.
.google.protobuf.Syntax syntax = 6;- Parameters:
value- The enum numeric value on the wire for syntax to set.- Returns:
- This builder for chaining.
-
clearSyntax
public Type.Builder clearSyntax()
The source syntax.
.google.protobuf.Syntax syntax = 6;- Returns:
- This builder for chaining.
-
-