Package com.google.protobuf
Class Type.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<Type,Type.Builder>
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 type
google.protobuf.Type
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite.Builder
AbstractMessageLite.Builder.LimitedInputStream
-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance
-
Constructor Summary
Constructors -
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 types appearing in `oneof` definitions in this type.addOneofsBytes
(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 source edition string, only valid when syntax is SYNTAX_EDITIONS.The list of fields.The fully qualified message name.The list of types appearing in `oneof` definitions in this type.The protocol buffer options.The source context.The source syntax.The source edition string, only valid when syntax is SYNTAX_EDITIONS.The source edition string, only valid when syntax is SYNTAX_EDITIONS.getFields
(int index) The list of fields.int
The list of fields.The list of fields.getName()
The fully qualified message name.The fully qualified message name.getOneofs
(int index) The list of types appearing in `oneof` definitions in this type.getOneofsBytes
(int index) The list of types appearing in `oneof` definitions in this type.int
The list of types appearing in `oneof` definitions in this type.The list of types appearing in `oneof` definitions in this type.getOptions
(int index) The protocol buffer options.int
The protocol buffer options.The protocol buffer options.The source context.The source syntax.int
The source syntax.boolean
The source context.mergeSourceContext
(SourceContext value) The source context.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
(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
(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.setSourceContext
(SourceContext value) The source context.setSourceContext
(SourceContext.Builder builderForValue) The source context.The source syntax.setSyntaxValue
(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
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
getName
The fully qualified message name.
string name = 1;
- Specified by:
getName
in interfaceTypeOrBuilder
- Returns:
- The name.
-
getNameBytes
The fully qualified message name.
string name = 1;
- Specified by:
getNameBytes
in 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:
getFieldsList
in interfaceTypeOrBuilder
-
getFieldsCount
public int getFieldsCount()The list of fields.
repeated .google.protobuf.Field fields = 2;
- Specified by:
getFieldsCount
in interfaceTypeOrBuilder
-
getFields
The list of fields.
repeated .google.protobuf.Field fields = 2;
- Specified by:
getFields
in 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;
-
getOneofsList
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;
- Specified by:
getOneofsList
in 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:
getOneofsCount
in interfaceTypeOrBuilder
- Returns:
- The count of oneofs.
-
getOneofs
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;
- Specified by:
getOneofs
in interfaceTypeOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The oneofs at the given index.
-
getOneofsBytes
The list of types appearing in `oneof` definitions in this type.
repeated string oneofs = 3;
- Specified by:
getOneofsBytes
in 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:
getOptionsList
in interfaceTypeOrBuilder
-
getOptionsCount
public int getOptionsCount()The protocol buffer options.
repeated .google.protobuf.Option options = 4;
- Specified by:
getOptionsCount
in interfaceTypeOrBuilder
-
getOptions
The protocol buffer options.
repeated .google.protobuf.Option options = 4;
- Specified by:
getOptions
in 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;
-
hasSourceContext
public boolean hasSourceContext()The source context.
.google.protobuf.SourceContext source_context = 5;
- Specified by:
hasSourceContext
in interfaceTypeOrBuilder
- Returns:
- Whether the sourceContext field is set.
-
getSourceContext
The source context.
.google.protobuf.SourceContext source_context = 5;
- Specified by:
getSourceContext
in 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;
-
getSyntaxValue
public int getSyntaxValue()The source syntax.
.google.protobuf.Syntax syntax = 6;
- Specified by:
getSyntaxValue
in interfaceTypeOrBuilder
- Returns:
- The enum numeric value on the wire for syntax.
-
setSyntaxValue
The source syntax.
.google.protobuf.Syntax syntax = 6;
- Parameters:
value
- The syntax to set.- Returns:
- This builder for chaining.
-
getSyntax
The source syntax.
.google.protobuf.Syntax syntax = 6;
- Specified by:
getSyntax
in interfaceTypeOrBuilder
- Returns:
- The syntax.
-
setSyntax
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
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:
getEdition
in interfaceTypeOrBuilder
- Returns:
- The edition.
-
getEditionBytes
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 7;
- Specified by:
getEditionBytes
in 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.
-