Package com.google.protobuf
Class Type.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Type.Builder>
com.google.protobuf.Type.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,TypeOrBuilder,Cloneable
- Enclosing class:
- Type
public static final class Type.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<Type.Builder>
implements TypeOrBuilder
A protocol buffer message type.Protobuf type
google.protobuf.Type-
Method Summary
Modifier and TypeMethodDescriptionaddAllFields(Iterable<? extends Field> values) The list of fields.addAllOneofs(Iterable<String> values) The list of types appearing in `oneof` definitions in this type.addAllOptions(Iterable<? extends Option> values) The protocol buffer options.The list of fields.addFields(int index, Field.Builder builderForValue) The list of fields.The list of fields.addFields(Field.Builder builderForValue) The list of fields.The list of fields.addFieldsBuilder(int index) The list of fields.The list of types appearing in `oneof` definitions in this type.addOneofsBytes(com.google.protobuf.ByteString value) The list of types appearing in `oneof` definitions in this type.addOptions(int index, Option value) The protocol buffer options.addOptions(int index, Option.Builder builderForValue) The protocol buffer options.addOptions(Option value) The protocol buffer options.addOptions(Option.Builder builderForValue) The protocol buffer options.The protocol buffer options.addOptionsBuilder(int index) The protocol buffer options.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()The source edition string, only valid when syntax is SYNTAX_EDITIONS.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) The list of fields.The fully qualified message name.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) The list of types appearing in `oneof` definitions in this type.The protocol buffer options.The source context.The source syntax.clone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe source edition string, only valid when syntax is SYNTAX_EDITIONS.com.google.protobuf.ByteStringThe source edition string, only valid when syntax is SYNTAX_EDITIONS.getFields(int index) The list of fields.getFieldsBuilder(int index) The list of fields.The list of fields.intThe list of fields.The list of fields.getFieldsOrBuilder(int index) The list of fields.List<? extends FieldOrBuilder>The list of fields.getName()The fully qualified message name.com.google.protobuf.ByteStringThe fully qualified message name.getOneofs(int index) The list of types appearing in `oneof` definitions in this type.com.google.protobuf.ByteStringgetOneofsBytes(int index) The list of types appearing in `oneof` definitions in this type.intThe list of types appearing in `oneof` definitions in this type.com.google.protobuf.ProtocolStringListThe list of types appearing in `oneof` definitions in this type.getOptions(int index) The protocol buffer options.getOptionsBuilder(int index) The protocol buffer options.The protocol buffer options.intThe protocol buffer options.The protocol buffer options.getOptionsOrBuilder(int index) The protocol buffer options.List<? extends OptionOrBuilder>The protocol buffer options.The source context.The source context.The source context.The source syntax.intThe source syntax.booleanThe source context.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeSourceContext(SourceContext value) The source context.final Type.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) removeFields(int index) The list of fields.removeOptions(int index) The protocol buffer options.setEdition(String value) The source edition string, only valid when syntax is SYNTAX_EDITIONS.setEditionBytes(com.google.protobuf.ByteString value) The source edition string, only valid when syntax is SYNTAX_EDITIONS.The list of fields.setFields(int index, Field.Builder builderForValue) The list of fields.The fully qualified message name.setNameBytes(com.google.protobuf.ByteString value) The fully qualified message name.The list of types appearing in `oneof` definitions in this type.setOptions(int index, Option value) The protocol buffer options.setOptions(int index, Option.Builder builderForValue) The protocol buffer options.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setSourceContext(SourceContext value) The source context.setSourceContext(SourceContext.Builder builderForValue) The source context.The source syntax.setSyntaxValue(int value) The source syntax.final Type.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Type.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<Type.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<Type.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<Type.Builder>
-
setField
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Type.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Type.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Type.Builder>
-
setRepeatedField
public Type.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Type.Builder>
-
addRepeatedField
public Type.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Type.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Type.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<Type.Builder>
-
mergeFrom
public Type.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Type.Builder>- Throws:
IOException
-
getName
The fully qualified message name.
string name = 1;- Specified by:
getNamein interfaceTypeOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()The fully qualified message name.
string name = 1;- Specified by:
getNameBytesin interfaceTypeOrBuilder- Returns:
- The bytes for name.
-
setName
The fully qualified message name.
string name = 1;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
The fully qualified message name.
string name = 1;- Returns:
- This builder for chaining.
-
setNameBytes
The fully qualified message name.
string name = 1;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
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
The list of fields.
repeated .google.protobuf.Field fields = 2;- Specified by:
getFieldsin interfaceTypeOrBuilder
-
setFields
The list of fields.
repeated .google.protobuf.Field fields = 2; -
setFields
The list of fields.
repeated .google.protobuf.Field fields = 2; -
addFields
The list of fields.
repeated .google.protobuf.Field fields = 2; -
addFields
The list of fields.
repeated .google.protobuf.Field fields = 2; -
addFields
The list of fields.
repeated .google.protobuf.Field fields = 2; -
addFields
The list of fields.
repeated .google.protobuf.Field fields = 2; -
addAllFields
The list of fields.
repeated .google.protobuf.Field fields = 2; -
clearFields
The list of fields.
repeated .google.protobuf.Field fields = 2; -
removeFields
The list of fields.
repeated .google.protobuf.Field fields = 2; -
getFieldsBuilder
The list of fields.
repeated .google.protobuf.Field fields = 2; -
getFieldsOrBuilder
The list of fields.
repeated .google.protobuf.Field fields = 2;- Specified by:
getFieldsOrBuilderin interfaceTypeOrBuilder
-
getFieldsOrBuilderList
The list of fields.
repeated .google.protobuf.Field fields = 2;- Specified by:
getFieldsOrBuilderListin interfaceTypeOrBuilder
-
addFieldsBuilder
The list of fields.
repeated .google.protobuf.Field fields = 2; -
addFieldsBuilder
The list of fields.
repeated .google.protobuf.Field fields = 2; -
getFieldsBuilderList
The list of fields.
repeated .google.protobuf.Field fields = 2; -
getOneofsList
public com.google.protobuf.ProtocolStringList 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
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 com.google.protobuf.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
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
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
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
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;- Returns:
- This builder for chaining.
-
addOneofsBytes
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
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
The protocol buffer options.
repeated .google.protobuf.Option options = 4;- Specified by:
getOptionsin interfaceTypeOrBuilder
-
setOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4; -
setOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4; -
addOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4; -
addOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4; -
addOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4; -
addOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4; -
addAllOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4; -
clearOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4; -
removeOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4; -
getOptionsBuilder
The protocol buffer options.
repeated .google.protobuf.Option options = 4; -
getOptionsOrBuilder
The protocol buffer options.
repeated .google.protobuf.Option options = 4;- Specified by:
getOptionsOrBuilderin interfaceTypeOrBuilder
-
getOptionsOrBuilderList
The protocol buffer options.
repeated .google.protobuf.Option options = 4;- Specified by:
getOptionsOrBuilderListin interfaceTypeOrBuilder
-
addOptionsBuilder
The protocol buffer options.
repeated .google.protobuf.Option options = 4; -
addOptionsBuilder
The protocol buffer options.
repeated .google.protobuf.Option options = 4; -
getOptionsBuilderList
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
The source context.
.google.protobuf.SourceContext source_context = 5;- Specified by:
getSourceContextin interfaceTypeOrBuilder- Returns:
- The sourceContext.
-
setSourceContext
The source context.
.google.protobuf.SourceContext source_context = 5; -
setSourceContext
The source context.
.google.protobuf.SourceContext source_context = 5; -
mergeSourceContext
The source context.
.google.protobuf.SourceContext source_context = 5; -
clearSourceContext
The source context.
.google.protobuf.SourceContext source_context = 5; -
getSourceContextBuilder
The source context.
.google.protobuf.SourceContext source_context = 5; -
getSourceContextOrBuilder
The source context.
.google.protobuf.SourceContext source_context = 5;- Specified by:
getSourceContextOrBuilderin interfaceTypeOrBuilder
-
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
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.
-
getSyntax
The source syntax.
.google.protobuf.Syntax syntax = 6;- Specified by:
getSyntaxin interfaceTypeOrBuilder- Returns:
- The syntax.
-
setSyntax
The source syntax.
.google.protobuf.Syntax syntax = 6;- Parameters:
value- The syntax to set.- Returns:
- This builder for chaining.
-
clearSyntax
The source syntax.
.google.protobuf.Syntax syntax = 6;- Returns:
- This builder for chaining.
-
getEdition
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 7;- Specified by:
getEditionin interfaceTypeOrBuilder- Returns:
- The edition.
-
getEditionBytes
public com.google.protobuf.ByteString getEditionBytes()The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 7;- Specified by:
getEditionBytesin interfaceTypeOrBuilder- Returns:
- The bytes for edition.
-
setEdition
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 7;- Parameters:
value- The edition to set.- Returns:
- This builder for chaining.
-
clearEdition
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 7;- Returns:
- This builder for chaining.
-
setEditionBytes
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 7;- Parameters:
value- The bytes for edition to set.- Returns:
- This builder for chaining.
-
setUnknownFields
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Type.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Type.Builder>
-