Class DescriptorProtos.FileOptions.Builder (3.19.4)

public static final class DescriptorProtos.FileOptions.Builder extends GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FileOptions,DescriptorProtos.FileOptions.Builder> implements DescriptorProtos.FileOptionsOrBuilder

Protobuf type google.protobuf.FileOptions

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptors.Descriptor

Methods

<Type>addExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FileOptions,List<Type>> extension, Type value)

public DescriptorProtos.FileOptions.Builder <Type>addExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FileOptions,List<Type>> extension, Type value)

Append a value to a repeated extension.

Parameters
NameDescription
extensionGeneratedExtension<FileOptions,List<Type>>
valueType
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides

<Type>clearExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FileOptions,?> extension)

public DescriptorProtos.FileOptions.Builder <Type>clearExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FileOptions,?> extension)

Clear an extension.

Parameter
NameDescription
extensionGeneratedExtension<FileOptions,?>
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides

<Type>setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FileOptions,Type> extension, Type value)

public DescriptorProtos.FileOptions.Builder <Type>setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FileOptions,Type> extension, Type value)

Set the value of an extension.

Parameters
NameDescription
extensionGeneratedExtension<FileOptions,Type>
valueType
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides

<Type>setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FileOptions,List<Type>> extension, int index, Type value)

public DescriptorProtos.FileOptions.Builder <Type>setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FileOptions,List<Type>> extension, int index, Type value)

Set the value of one element of a repeated extension.

Parameters
NameDescription
extensionGeneratedExtension<FileOptions,List<Type>>
indexint
valueType
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides

addAllUninterpretedOption(Iterable<? extends DescriptorProtos.UninterpretedOption> values)

public DescriptorProtos.FileOptions.Builder addAllUninterpretedOption(Iterable<? extends DescriptorProtos.UninterpretedOption> values)

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
valuesIterable<? extends com.google.protobuf.DescriptorProtos.UninterpretedOption>
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DescriptorProtos.FileOptions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
valueObject
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides

addUninterpretedOption(DescriptorProtos.UninterpretedOption value)

public DescriptorProtos.FileOptions.Builder addUninterpretedOption(DescriptorProtos.UninterpretedOption value)

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
valueDescriptorProtos.UninterpretedOption
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

addUninterpretedOption(DescriptorProtos.UninterpretedOption.Builder builderForValue)

public DescriptorProtos.FileOptions.Builder addUninterpretedOption(DescriptorProtos.UninterpretedOption.Builder builderForValue)

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
builderForValueDescriptorProtos.UninterpretedOption.Builder
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)

public DescriptorProtos.FileOptions.Builder addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameters
NameDescription
indexint
valueDescriptorProtos.UninterpretedOption
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)

public DescriptorProtos.FileOptions.Builder addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameters
NameDescription
indexint
builderForValueDescriptorProtos.UninterpretedOption.Builder
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

addUninterpretedOptionBuilder()

public DescriptorProtos.UninterpretedOption.Builder addUninterpretedOptionBuilder()

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

addUninterpretedOptionBuilder(int index)

public DescriptorProtos.UninterpretedOption.Builder addUninterpretedOptionBuilder(int index)

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

build()

public DescriptorProtos.FileOptions build()
Returns
TypeDescription
DescriptorProtos.FileOptions

buildPartial()

public DescriptorProtos.FileOptions buildPartial()
Returns
TypeDescription
DescriptorProtos.FileOptions

clear()

public DescriptorProtos.FileOptions.Builder clear()

Called by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides

clearCcEnableArenas()

public DescriptorProtos.FileOptions.Builder clearCcEnableArenas()

Enables the use of arenas for the proto messages in this file. This applies only to generated classes for C++.

optional bool cc_enable_arenas = 31 [default = true];

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearCcGenericServices()

public DescriptorProtos.FileOptions.Builder clearCcGenericServices()

Should generic services be generated in each language? "Generic" services are not specific to any particular RPC system. They are generated by the main code generators in each language (without additional plugins). Generic services were the only kind of service generation supported by early versions of google.protobuf. Generic services are now considered deprecated in favor of using plugins that generate code specific to your particular RPC system. Therefore, these default to false. Old code which depends on generic services should explicitly set them to true.

optional bool cc_generic_services = 16 [default = false];

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearCsharpNamespace()

public DescriptorProtos.FileOptions.Builder clearCsharpNamespace()

Namespace for generated classes; defaults to the package.

optional string csharp_namespace = 37;

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearDeprecated()

public DescriptorProtos.FileOptions.Builder clearDeprecated()

Is this file deprecated? Depending on the target platform, this can emit Deprecated annotations for everything in the file, or it will be completely ignored; in the very least, this is a formalization for deprecating files.

optional bool deprecated = 23 [default = false];

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public DescriptorProtos.FileOptions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldDescriptors.FieldDescriptor
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides

clearGoPackage()

public DescriptorProtos.FileOptions.Builder clearGoPackage()

Sets the Go package where structs generated from this .proto will be placed. If omitted, the Go package will be derived from the following:

  • The basename of the package import path, if provided.
  • Otherwise, the package statement in the .proto file, if present.
  • Otherwise, the basename of the .proto file, without extension.

optional string go_package = 11;

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearJavaGenerateEqualsAndHash()

public DescriptorProtos.FileOptions.Builder clearJavaGenerateEqualsAndHash()

This option does nothing.

optional bool java_generate_equals_and_hash = 20 [deprecated = true];

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearJavaGenericServices()

public DescriptorProtos.FileOptions.Builder clearJavaGenericServices()

optional bool java_generic_services = 17 [default = false];

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearJavaMultipleFiles()

public DescriptorProtos.FileOptions.Builder clearJavaMultipleFiles()

If enabled, then the Java code generator will generate a separate .java file for each top-level message, enum, and service defined in the .proto file. Thus, these types will not be nested inside the wrapper class named by java_outer_classname. However, the wrapper class will still be generated to contain the file's getDescriptor() method as well as any top-level extensions defined in the file.

optional bool java_multiple_files = 10 [default = false];

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearJavaOuterClassname()

public DescriptorProtos.FileOptions.Builder clearJavaOuterClassname()

Controls the name of the wrapper Java class generated for the .proto file. That class will always contain the .proto file's getDescriptor() method as well as any top-level extensions defined in the .proto file. If java_multiple_files is disabled, then all the other classes from the .proto file will be nested inside the single wrapper outer class.

optional string java_outer_classname = 8;

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearJavaPackage()

public DescriptorProtos.FileOptions.Builder clearJavaPackage()

Sets the Java package where classes generated from this .proto will be placed. By default, the proto package is used, but this is often inappropriate because proto packages do not normally start with backwards domain names.

optional string java_package = 1;

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearJavaStringCheckUtf8()

public DescriptorProtos.FileOptions.Builder clearJavaStringCheckUtf8()

If set true, then the Java2 code generator will generate code that throws an exception whenever an attempt is made to assign a non-UTF-8 byte sequence to a string field. Message reflection will do the same. However, an extension field still accepts non-UTF-8 byte sequences. This option has no effect on when used with the lite runtime.

optional bool java_string_check_utf8 = 27 [default = false];

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearObjcClassPrefix()

public DescriptorProtos.FileOptions.Builder clearObjcClassPrefix()

Sets the objective c class prefix which is prepended to all objective c generated classes from this .proto. There is no default.

optional string objc_class_prefix = 36;

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public DescriptorProtos.FileOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)

TODO(jieluo): Clear it when all subclasses have implemented this method.

Parameter
NameDescription
oneofDescriptors.OneofDescriptor
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides

clearOptimizeFor()

public DescriptorProtos.FileOptions.Builder clearOptimizeFor()

optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearPhpClassPrefix()

public DescriptorProtos.FileOptions.Builder clearPhpClassPrefix()

Sets the php class prefix which is prepended to all php generated classes from this .proto. Default is empty.

optional string php_class_prefix = 40;

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearPhpGenericServices()

public DescriptorProtos.FileOptions.Builder clearPhpGenericServices()

optional bool php_generic_services = 42 [default = false];

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearPhpMetadataNamespace()

public DescriptorProtos.FileOptions.Builder clearPhpMetadataNamespace()

Use this option to change the namespace of php generated metadata classes. Default is empty. When this option is empty, the proto file name will be used for determining the namespace.

optional string php_metadata_namespace = 44;

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearPhpNamespace()

public DescriptorProtos.FileOptions.Builder clearPhpNamespace()

Use this option to change the namespace of php generated classes. Default is empty. When this option is empty, the package name will be used for determining the namespace.

optional string php_namespace = 41;

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearPyGenericServices()

public DescriptorProtos.FileOptions.Builder clearPyGenericServices()

optional bool py_generic_services = 18 [default = false];

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearRubyPackage()

public DescriptorProtos.FileOptions.Builder clearRubyPackage()

Use this option to change the package of ruby generated classes. Default is empty. When this option is not set, the package name will be used for determining the ruby package.

optional string ruby_package = 45;

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearSwiftPrefix()

public DescriptorProtos.FileOptions.Builder clearSwiftPrefix()

By default Swift generators will take the proto package and CamelCase it replacing '.' with underscore and use that to prefix the types/symbols defined. When this options is provided, they will use this value instead to prefix the types/symbols defined.

optional string swift_prefix = 39;

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

clearUninterpretedOption()

public DescriptorProtos.FileOptions.Builder clearUninterpretedOption()

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

clone()

public DescriptorProtos.FileOptions.Builder clone()

Clones the Builder.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides

getCcEnableArenas()

public boolean getCcEnableArenas()

Enables the use of arenas for the proto messages in this file. This applies only to generated classes for C++.

optional bool cc_enable_arenas = 31 [default = true];

Returns
TypeDescription
boolean

The ccEnableArenas.

getCcGenericServices()

public boolean getCcGenericServices()

Should generic services be generated in each language? "Generic" services are not specific to any particular RPC system. They are generated by the main code generators in each language (without additional plugins). Generic services were the only kind of service generation supported by early versions of google.protobuf. Generic services are now considered deprecated in favor of using plugins that generate code specific to your particular RPC system. Therefore, these default to false. Old code which depends on generic services should explicitly set them to true.

optional bool cc_generic_services = 16 [default = false];

Returns
TypeDescription
boolean

The ccGenericServices.

getCsharpNamespace()

public String getCsharpNamespace()

Namespace for generated classes; defaults to the package.

optional string csharp_namespace = 37;

Returns
TypeDescription
String

The csharpNamespace.

getCsharpNamespaceBytes()

public ByteString getCsharpNamespaceBytes()

Namespace for generated classes; defaults to the package.

optional string csharp_namespace = 37;

Returns
TypeDescription
ByteString

The bytes for csharpNamespace.

getDefaultInstanceForType()

public DescriptorProtos.FileOptions getDefaultInstanceForType()

Get an instance of the type with no fields set. Because no fields are set, all getters for singular fields will return default values and repeated fields will appear empty. This may or may not be a singleton. This differs from the getDefaultInstance() method of generated message classes in that this method is an abstract method of the MessageLite interface whereas getDefaultInstance() is a static method of a specific class. They return the same thing.

Returns
TypeDescription
DescriptorProtos.FileOptions

getDeprecated()

public boolean getDeprecated()

Is this file deprecated? Depending on the target platform, this can emit Deprecated annotations for everything in the file, or it will be completely ignored; in the very least, this is a formalization for deprecating files.

optional bool deprecated = 23 [default = false];

Returns
TypeDescription
boolean

The deprecated.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()

Get the message's type's descriptor. This differs from the getDescriptor() method of generated message classes in that this method is an abstract method of the Message interface whereas getDescriptor() is a static method of a specific class. They return the same thing.

Returns
TypeDescription
Descriptors.Descriptor
Overrides

getGoPackage()

public String getGoPackage()

Sets the Go package where structs generated from this .proto will be placed. If omitted, the Go package will be derived from the following:

  • The basename of the package import path, if provided.
  • Otherwise, the package statement in the .proto file, if present.
  • Otherwise, the basename of the .proto file, without extension.

optional string go_package = 11;

Returns
TypeDescription
String

The goPackage.

getGoPackageBytes()

public ByteString getGoPackageBytes()

Sets the Go package where structs generated from this .proto will be placed. If omitted, the Go package will be derived from the following:

  • The basename of the package import path, if provided.
  • Otherwise, the package statement in the .proto file, if present.
  • Otherwise, the basename of the .proto file, without extension.

optional string go_package = 11;

Returns
TypeDescription
ByteString

The bytes for goPackage.

getJavaGenerateEqualsAndHash()

public boolean getJavaGenerateEqualsAndHash()

This option does nothing.

optional bool java_generate_equals_and_hash = 20 [deprecated = true];

Returns
TypeDescription
boolean

The javaGenerateEqualsAndHash.

getJavaGenericServices()

public boolean getJavaGenericServices()

optional bool java_generic_services = 17 [default = false];

Returns
TypeDescription
boolean

The javaGenericServices.

getJavaMultipleFiles()

public boolean getJavaMultipleFiles()

If enabled, then the Java code generator will generate a separate .java file for each top-level message, enum, and service defined in the .proto file. Thus, these types will not be nested inside the wrapper class named by java_outer_classname. However, the wrapper class will still be generated to contain the file's getDescriptor() method as well as any top-level extensions defined in the file.

optional bool java_multiple_files = 10 [default = false];

Returns
TypeDescription
boolean

The javaMultipleFiles.

getJavaOuterClassname()

public String getJavaOuterClassname()

Controls the name of the wrapper Java class generated for the .proto file. That class will always contain the .proto file's getDescriptor() method as well as any top-level extensions defined in the .proto file. If java_multiple_files is disabled, then all the other classes from the .proto file will be nested inside the single wrapper outer class.

optional string java_outer_classname = 8;

Returns
TypeDescription
String

The javaOuterClassname.

getJavaOuterClassnameBytes()

public ByteString getJavaOuterClassnameBytes()

Controls the name of the wrapper Java class generated for the .proto file. That class will always contain the .proto file's getDescriptor() method as well as any top-level extensions defined in the .proto file. If java_multiple_files is disabled, then all the other classes from the .proto file will be nested inside the single wrapper outer class.

optional string java_outer_classname = 8;

Returns
TypeDescription
ByteString

The bytes for javaOuterClassname.

getJavaPackage()

public String getJavaPackage()

Sets the Java package where classes generated from this .proto will be placed. By default, the proto package is used, but this is often inappropriate because proto packages do not normally start with backwards domain names.

optional string java_package = 1;

Returns
TypeDescription
String

The javaPackage.

getJavaPackageBytes()

public ByteString getJavaPackageBytes()

Sets the Java package where classes generated from this .proto will be placed. By default, the proto package is used, but this is often inappropriate because proto packages do not normally start with backwards domain names.

optional string java_package = 1;

Returns
TypeDescription
ByteString

The bytes for javaPackage.

getJavaStringCheckUtf8()

public boolean getJavaStringCheckUtf8()

If set true, then the Java2 code generator will generate code that throws an exception whenever an attempt is made to assign a non-UTF-8 byte sequence to a string field. Message reflection will do the same. However, an extension field still accepts non-UTF-8 byte sequences. This option has no effect on when used with the lite runtime.

optional bool java_string_check_utf8 = 27 [default = false];

Returns
TypeDescription
boolean

The javaStringCheckUtf8.

getObjcClassPrefix()

public String getObjcClassPrefix()

Sets the objective c class prefix which is prepended to all objective c generated classes from this .proto. There is no default.

optional string objc_class_prefix = 36;

Returns
TypeDescription
String

The objcClassPrefix.

getObjcClassPrefixBytes()

public ByteString getObjcClassPrefixBytes()

Sets the objective c class prefix which is prepended to all objective c generated classes from this .proto. There is no default.

optional string objc_class_prefix = 36;

Returns
TypeDescription
ByteString

The bytes for objcClassPrefix.

getOptimizeFor()

public DescriptorProtos.FileOptions.OptimizeMode getOptimizeFor()

optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];

Returns
TypeDescription
DescriptorProtos.FileOptions.OptimizeMode

The optimizeFor.

getPhpClassPrefix()

public String getPhpClassPrefix()

Sets the php class prefix which is prepended to all php generated classes from this .proto. Default is empty.

optional string php_class_prefix = 40;

Returns
TypeDescription
String

The phpClassPrefix.

getPhpClassPrefixBytes()

public ByteString getPhpClassPrefixBytes()

Sets the php class prefix which is prepended to all php generated classes from this .proto. Default is empty.

optional string php_class_prefix = 40;

Returns
TypeDescription
ByteString

The bytes for phpClassPrefix.

getPhpGenericServices()

public boolean getPhpGenericServices()

optional bool php_generic_services = 42 [default = false];

Returns
TypeDescription
boolean

The phpGenericServices.

getPhpMetadataNamespace()

public String getPhpMetadataNamespace()

Use this option to change the namespace of php generated metadata classes. Default is empty. When this option is empty, the proto file name will be used for determining the namespace.

optional string php_metadata_namespace = 44;

Returns
TypeDescription
String

The phpMetadataNamespace.

getPhpMetadataNamespaceBytes()

public ByteString getPhpMetadataNamespaceBytes()

Use this option to change the namespace of php generated metadata classes. Default is empty. When this option is empty, the proto file name will be used for determining the namespace.

optional string php_metadata_namespace = 44;

Returns
TypeDescription
ByteString

The bytes for phpMetadataNamespace.

getPhpNamespace()

public String getPhpNamespace()

Use this option to change the namespace of php generated classes. Default is empty. When this option is empty, the package name will be used for determining the namespace.

optional string php_namespace = 41;

Returns
TypeDescription
String

The phpNamespace.

getPhpNamespaceBytes()

public ByteString getPhpNamespaceBytes()

Use this option to change the namespace of php generated classes. Default is empty. When this option is empty, the package name will be used for determining the namespace.

optional string php_namespace = 41;

Returns
TypeDescription
ByteString

The bytes for phpNamespace.

getPyGenericServices()

public boolean getPyGenericServices()

optional bool py_generic_services = 18 [default = false];

Returns
TypeDescription
boolean

The pyGenericServices.

getRubyPackage()

public String getRubyPackage()

Use this option to change the package of ruby generated classes. Default is empty. When this option is not set, the package name will be used for determining the ruby package.

optional string ruby_package = 45;

Returns
TypeDescription
String

The rubyPackage.

getRubyPackageBytes()

public ByteString getRubyPackageBytes()

Use this option to change the package of ruby generated classes. Default is empty. When this option is not set, the package name will be used for determining the ruby package.

optional string ruby_package = 45;

Returns
TypeDescription
ByteString

The bytes for rubyPackage.

getSwiftPrefix()

public String getSwiftPrefix()

By default Swift generators will take the proto package and CamelCase it replacing '.' with underscore and use that to prefix the types/symbols defined. When this options is provided, they will use this value instead to prefix the types/symbols defined.

optional string swift_prefix = 39;

Returns
TypeDescription
String

The swiftPrefix.

getSwiftPrefixBytes()

public ByteString getSwiftPrefixBytes()

By default Swift generators will take the proto package and CamelCase it replacing '.' with underscore and use that to prefix the types/symbols defined. When this options is provided, they will use this value instead to prefix the types/symbols defined.

optional string swift_prefix = 39;

Returns
TypeDescription
ByteString

The bytes for swiftPrefix.

getUninterpretedOption(int index)

public DescriptorProtos.UninterpretedOption getUninterpretedOption(int index)

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOption

getUninterpretedOptionBuilder(int index)

public DescriptorProtos.UninterpretedOption.Builder getUninterpretedOptionBuilder(int index)

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

getUninterpretedOptionBuilderList()

public List<DescriptorProtos.UninterpretedOption.Builder> getUninterpretedOptionBuilderList()

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
TypeDescription
List<Builder>

getUninterpretedOptionCount()

public int getUninterpretedOptionCount()

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
TypeDescription
int

getUninterpretedOptionList()

public List<DescriptorProtos.UninterpretedOption> getUninterpretedOptionList()

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
TypeDescription
List<UninterpretedOption>

getUninterpretedOptionOrBuilder(int index)

public DescriptorProtos.UninterpretedOptionOrBuilder getUninterpretedOptionOrBuilder(int index)

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOptionOrBuilder

getUninterpretedOptionOrBuilderList()

public List<? extends DescriptorProtos.UninterpretedOptionOrBuilder> getUninterpretedOptionOrBuilderList()

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
TypeDescription
List<? extends com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder>

hasCcEnableArenas()

public boolean hasCcEnableArenas()

Enables the use of arenas for the proto messages in this file. This applies only to generated classes for C++.

optional bool cc_enable_arenas = 31 [default = true];

Returns
TypeDescription
boolean

Whether the ccEnableArenas field is set.

hasCcGenericServices()

public boolean hasCcGenericServices()

Should generic services be generated in each language? "Generic" services are not specific to any particular RPC system. They are generated by the main code generators in each language (without additional plugins). Generic services were the only kind of service generation supported by early versions of google.protobuf. Generic services are now considered deprecated in favor of using plugins that generate code specific to your particular RPC system. Therefore, these default to false. Old code which depends on generic services should explicitly set them to true.

optional bool cc_generic_services = 16 [default = false];

Returns
TypeDescription
boolean

Whether the ccGenericServices field is set.

hasCsharpNamespace()

public boolean hasCsharpNamespace()

Namespace for generated classes; defaults to the package.

optional string csharp_namespace = 37;

Returns
TypeDescription
boolean

Whether the csharpNamespace field is set.

hasDeprecated()

public boolean hasDeprecated()

Is this file deprecated? Depending on the target platform, this can emit Deprecated annotations for everything in the file, or it will be completely ignored; in the very least, this is a formalization for deprecating files.

optional bool deprecated = 23 [default = false];

Returns
TypeDescription
boolean

Whether the deprecated field is set.

hasGoPackage()

public boolean hasGoPackage()

Sets the Go package where structs generated from this .proto will be placed. If omitted, the Go package will be derived from the following:

  • The basename of the package import path, if provided.
  • Otherwise, the package statement in the .proto file, if present.
  • Otherwise, the basename of the .proto file, without extension.

optional string go_package = 11;

Returns
TypeDescription
boolean

Whether the goPackage field is set.

hasJavaGenerateEqualsAndHash()

public boolean hasJavaGenerateEqualsAndHash()

This option does nothing.

optional bool java_generate_equals_and_hash = 20 [deprecated = true];

Returns
TypeDescription
boolean

Whether the javaGenerateEqualsAndHash field is set.

hasJavaGenericServices()

public boolean hasJavaGenericServices()

optional bool java_generic_services = 17 [default = false];

Returns
TypeDescription
boolean

Whether the javaGenericServices field is set.

hasJavaMultipleFiles()

public boolean hasJavaMultipleFiles()

If enabled, then the Java code generator will generate a separate .java file for each top-level message, enum, and service defined in the .proto file. Thus, these types will not be nested inside the wrapper class named by java_outer_classname. However, the wrapper class will still be generated to contain the file's getDescriptor() method as well as any top-level extensions defined in the file.

optional bool java_multiple_files = 10 [default = false];

Returns
TypeDescription
boolean

Whether the javaMultipleFiles field is set.

hasJavaOuterClassname()

public boolean hasJavaOuterClassname()

Controls the name of the wrapper Java class generated for the .proto file. That class will always contain the .proto file's getDescriptor() method as well as any top-level extensions defined in the .proto file. If java_multiple_files is disabled, then all the other classes from the .proto file will be nested inside the single wrapper outer class.

optional string java_outer_classname = 8;

Returns
TypeDescription
boolean

Whether the javaOuterClassname field is set.

hasJavaPackage()

public boolean hasJavaPackage()

Sets the Java package where classes generated from this .proto will be placed. By default, the proto package is used, but this is often inappropriate because proto packages do not normally start with backwards domain names.

optional string java_package = 1;

Returns
TypeDescription
boolean

Whether the javaPackage field is set.

hasJavaStringCheckUtf8()

public boolean hasJavaStringCheckUtf8()

If set true, then the Java2 code generator will generate code that throws an exception whenever an attempt is made to assign a non-UTF-8 byte sequence to a string field. Message reflection will do the same. However, an extension field still accepts non-UTF-8 byte sequences. This option has no effect on when used with the lite runtime.

optional bool java_string_check_utf8 = 27 [default = false];

Returns
TypeDescription
boolean

Whether the javaStringCheckUtf8 field is set.

hasObjcClassPrefix()

public boolean hasObjcClassPrefix()

Sets the objective c class prefix which is prepended to all objective c generated classes from this .proto. There is no default.

optional string objc_class_prefix = 36;

Returns
TypeDescription
boolean

Whether the objcClassPrefix field is set.

hasOptimizeFor()

public boolean hasOptimizeFor()

optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];

Returns
TypeDescription
boolean

Whether the optimizeFor field is set.

hasPhpClassPrefix()

public boolean hasPhpClassPrefix()

Sets the php class prefix which is prepended to all php generated classes from this .proto. Default is empty.

optional string php_class_prefix = 40;

Returns
TypeDescription
boolean

Whether the phpClassPrefix field is set.

hasPhpGenericServices()

public boolean hasPhpGenericServices()

optional bool php_generic_services = 42 [default = false];

Returns
TypeDescription
boolean

Whether the phpGenericServices field is set.

hasPhpMetadataNamespace()

public boolean hasPhpMetadataNamespace()

Use this option to change the namespace of php generated metadata classes. Default is empty. When this option is empty, the proto file name will be used for determining the namespace.

optional string php_metadata_namespace = 44;

Returns
TypeDescription
boolean

Whether the phpMetadataNamespace field is set.

hasPhpNamespace()

public boolean hasPhpNamespace()

Use this option to change the namespace of php generated classes. Default is empty. When this option is empty, the package name will be used for determining the namespace.

optional string php_namespace = 41;

Returns
TypeDescription
boolean

Whether the phpNamespace field is set.

hasPyGenericServices()

public boolean hasPyGenericServices()

optional bool py_generic_services = 18 [default = false];

Returns
TypeDescription
boolean

Whether the pyGenericServices field is set.

hasRubyPackage()

public boolean hasRubyPackage()

Use this option to change the package of ruby generated classes. Default is empty. When this option is not set, the package name will be used for determining the ruby package.

optional string ruby_package = 45;

Returns
TypeDescription
boolean

Whether the rubyPackage field is set.

hasSwiftPrefix()

public boolean hasSwiftPrefix()

By default Swift generators will take the proto package and CamelCase it replacing '.' with underscore and use that to prefix the types/symbols defined. When this options is provided, they will use this value instead to prefix the types/symbols defined.

optional string swift_prefix = 39;

Returns
TypeDescription
boolean

Whether the swiftPrefix field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()

Get the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.

Returns
TypeDescription
GeneratedMessageV3.FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()

Returns true if all required fields in the message and all embedded messages are set, false otherwise.

See also: MessageOrBuilder#getInitializationErrorString()

Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DescriptorProtos.FileOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

Like Builder#mergeFrom(CodedInputStream), but also parses extensions. The extensions that you want to be able to parse must be registered in extensionRegistry. Extensions not in the registry will be treated as unknown fields.

Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(DescriptorProtos.FileOptions other)

public DescriptorProtos.FileOptions.Builder mergeFrom(DescriptorProtos.FileOptions other)
Parameter
NameDescription
otherDescriptorProtos.FileOptions
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

mergeFrom(Message other)

public DescriptorProtos.FileOptions.Builder mergeFrom(Message other)

Merge other into the message being built. other must have the exact same type as this (i.e. getDescriptorForType() == other.getDescriptorForType()).

Merging occurs as follows. For each field:

  • For singular primitive fields, if the field is set in other, then other's value overwrites the value in this message.
  • For singular message fields, if the field is set in other, it is merged into the corresponding sub-message of this message using the same merging rules.
  • For repeated fields, the elements in other are concatenated with the elements in this message.
  • For oneof groups, if the other message has one of the fields set, the group of this message is cleared and replaced by the field of the other message, so that the oneof constraint is preserved.

    This is equivalent to the Message::MergeFrom method in C++.

Parameter
NameDescription
otherMessage
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DescriptorProtos.FileOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)

Merge some unknown fields into the UnknownFieldSet for this message.

Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides

removeUninterpretedOption(int index)

public DescriptorProtos.FileOptions.Builder removeUninterpretedOption(int index)

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

setCcEnableArenas(boolean value)

public DescriptorProtos.FileOptions.Builder setCcEnableArenas(boolean value)

Enables the use of arenas for the proto messages in this file. This applies only to generated classes for C++.

optional bool cc_enable_arenas = 31 [default = true];

Parameter
NameDescription
valueboolean

The ccEnableArenas to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setCcGenericServices(boolean value)

public DescriptorProtos.FileOptions.Builder setCcGenericServices(boolean value)

Should generic services be generated in each language? "Generic" services are not specific to any particular RPC system. They are generated by the main code generators in each language (without additional plugins). Generic services were the only kind of service generation supported by early versions of google.protobuf. Generic services are now considered deprecated in favor of using plugins that generate code specific to your particular RPC system. Therefore, these default to false. Old code which depends on generic services should explicitly set them to true.

optional bool cc_generic_services = 16 [default = false];

Parameter
NameDescription
valueboolean

The ccGenericServices to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setCsharpNamespace(String value)

public DescriptorProtos.FileOptions.Builder setCsharpNamespace(String value)

Namespace for generated classes; defaults to the package.

optional string csharp_namespace = 37;

Parameter
NameDescription
valueString

The csharpNamespace to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setCsharpNamespaceBytes(ByteString value)

public DescriptorProtos.FileOptions.Builder setCsharpNamespaceBytes(ByteString value)

Namespace for generated classes; defaults to the package.

optional string csharp_namespace = 37;

Parameter
NameDescription
valueByteString

The bytes for csharpNamespace to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setDeprecated(boolean value)

public DescriptorProtos.FileOptions.Builder setDeprecated(boolean value)

Is this file deprecated? Depending on the target platform, this can emit Deprecated annotations for everything in the file, or it will be completely ignored; in the very least, this is a formalization for deprecating files.

optional bool deprecated = 23 [default = false];

Parameter
NameDescription
valueboolean

The deprecated to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public DescriptorProtos.FileOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
valueObject
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides

setGoPackage(String value)

public DescriptorProtos.FileOptions.Builder setGoPackage(String value)

Sets the Go package where structs generated from this .proto will be placed. If omitted, the Go package will be derived from the following:

  • The basename of the package import path, if provided.
  • Otherwise, the package statement in the .proto file, if present.
  • Otherwise, the basename of the .proto file, without extension.

optional string go_package = 11;

Parameter
NameDescription
valueString

The goPackage to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setGoPackageBytes(ByteString value)

public DescriptorProtos.FileOptions.Builder setGoPackageBytes(ByteString value)

Sets the Go package where structs generated from this .proto will be placed. If omitted, the Go package will be derived from the following:

  • The basename of the package import path, if provided.
  • Otherwise, the package statement in the .proto file, if present.
  • Otherwise, the basename of the .proto file, without extension.

optional string go_package = 11;

Parameter
NameDescription
valueByteString

The bytes for goPackage to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setJavaGenerateEqualsAndHash(boolean value)

public DescriptorProtos.FileOptions.Builder setJavaGenerateEqualsAndHash(boolean value)

This option does nothing.

optional bool java_generate_equals_and_hash = 20 [deprecated = true];

Parameter
NameDescription
valueboolean

The javaGenerateEqualsAndHash to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setJavaGenericServices(boolean value)

public DescriptorProtos.FileOptions.Builder setJavaGenericServices(boolean value)

optional bool java_generic_services = 17 [default = false];

Parameter
NameDescription
valueboolean

The javaGenericServices to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setJavaMultipleFiles(boolean value)

public DescriptorProtos.FileOptions.Builder setJavaMultipleFiles(boolean value)

If enabled, then the Java code generator will generate a separate .java file for each top-level message, enum, and service defined in the .proto file. Thus, these types will not be nested inside the wrapper class named by java_outer_classname. However, the wrapper class will still be generated to contain the file's getDescriptor() method as well as any top-level extensions defined in the file.

optional bool java_multiple_files = 10 [default = false];

Parameter
NameDescription
valueboolean

The javaMultipleFiles to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setJavaOuterClassname(String value)

public DescriptorProtos.FileOptions.Builder setJavaOuterClassname(String value)

Controls the name of the wrapper Java class generated for the .proto file. That class will always contain the .proto file's getDescriptor() method as well as any top-level extensions defined in the .proto file. If java_multiple_files is disabled, then all the other classes from the .proto file will be nested inside the single wrapper outer class.

optional string java_outer_classname = 8;

Parameter
NameDescription
valueString

The javaOuterClassname to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setJavaOuterClassnameBytes(ByteString value)

public DescriptorProtos.FileOptions.Builder setJavaOuterClassnameBytes(ByteString value)

Controls the name of the wrapper Java class generated for the .proto file. That class will always contain the .proto file's getDescriptor() method as well as any top-level extensions defined in the .proto file. If java_multiple_files is disabled, then all the other classes from the .proto file will be nested inside the single wrapper outer class.

optional string java_outer_classname = 8;

Parameter
NameDescription
valueByteString

The bytes for javaOuterClassname to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setJavaPackage(String value)

public DescriptorProtos.FileOptions.Builder setJavaPackage(String value)

Sets the Java package where classes generated from this .proto will be placed. By default, the proto package is used, but this is often inappropriate because proto packages do not normally start with backwards domain names.

optional string java_package = 1;

Parameter
NameDescription
valueString

The javaPackage to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setJavaPackageBytes(ByteString value)

public DescriptorProtos.FileOptions.Builder setJavaPackageBytes(ByteString value)

Sets the Java package where classes generated from this .proto will be placed. By default, the proto package is used, but this is often inappropriate because proto packages do not normally start with backwards domain names.

optional string java_package = 1;

Parameter
NameDescription
valueByteString

The bytes for javaPackage to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setJavaStringCheckUtf8(boolean value)

public DescriptorProtos.FileOptions.Builder setJavaStringCheckUtf8(boolean value)

If set true, then the Java2 code generator will generate code that throws an exception whenever an attempt is made to assign a non-UTF-8 byte sequence to a string field. Message reflection will do the same. However, an extension field still accepts non-UTF-8 byte sequences. This option has no effect on when used with the lite runtime.

optional bool java_string_check_utf8 = 27 [default = false];

Parameter
NameDescription
valueboolean

The javaStringCheckUtf8 to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setObjcClassPrefix(String value)

public DescriptorProtos.FileOptions.Builder setObjcClassPrefix(String value)

Sets the objective c class prefix which is prepended to all objective c generated classes from this .proto. There is no default.

optional string objc_class_prefix = 36;

Parameter
NameDescription
valueString

The objcClassPrefix to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setObjcClassPrefixBytes(ByteString value)

public DescriptorProtos.FileOptions.Builder setObjcClassPrefixBytes(ByteString value)

Sets the objective c class prefix which is prepended to all objective c generated classes from this .proto. There is no default.

optional string objc_class_prefix = 36;

Parameter
NameDescription
valueByteString

The bytes for objcClassPrefix to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setOptimizeFor(DescriptorProtos.FileOptions.OptimizeMode value)

public DescriptorProtos.FileOptions.Builder setOptimizeFor(DescriptorProtos.FileOptions.OptimizeMode value)

optional .google.protobuf.FileOptions.OptimizeMode optimize_for = 9 [default = SPEED];

Parameter
NameDescription
valueDescriptorProtos.FileOptions.OptimizeMode

The optimizeFor to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setPhpClassPrefix(String value)

public DescriptorProtos.FileOptions.Builder setPhpClassPrefix(String value)

Sets the php class prefix which is prepended to all php generated classes from this .proto. Default is empty.

optional string php_class_prefix = 40;

Parameter
NameDescription
valueString

The phpClassPrefix to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setPhpClassPrefixBytes(ByteString value)

public DescriptorProtos.FileOptions.Builder setPhpClassPrefixBytes(ByteString value)

Sets the php class prefix which is prepended to all php generated classes from this .proto. Default is empty.

optional string php_class_prefix = 40;

Parameter
NameDescription
valueByteString

The bytes for phpClassPrefix to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setPhpGenericServices(boolean value)

public DescriptorProtos.FileOptions.Builder setPhpGenericServices(boolean value)

optional bool php_generic_services = 42 [default = false];

Parameter
NameDescription
valueboolean

The phpGenericServices to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setPhpMetadataNamespace(String value)

public DescriptorProtos.FileOptions.Builder setPhpMetadataNamespace(String value)

Use this option to change the namespace of php generated metadata classes. Default is empty. When this option is empty, the proto file name will be used for determining the namespace.

optional string php_metadata_namespace = 44;

Parameter
NameDescription
valueString

The phpMetadataNamespace to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setPhpMetadataNamespaceBytes(ByteString value)

public DescriptorProtos.FileOptions.Builder setPhpMetadataNamespaceBytes(ByteString value)

Use this option to change the namespace of php generated metadata classes. Default is empty. When this option is empty, the proto file name will be used for determining the namespace.

optional string php_metadata_namespace = 44;

Parameter
NameDescription
valueByteString

The bytes for phpMetadataNamespace to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setPhpNamespace(String value)

public DescriptorProtos.FileOptions.Builder setPhpNamespace(String value)

Use this option to change the namespace of php generated classes. Default is empty. When this option is empty, the package name will be used for determining the namespace.

optional string php_namespace = 41;

Parameter
NameDescription
valueString

The phpNamespace to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setPhpNamespaceBytes(ByteString value)

public DescriptorProtos.FileOptions.Builder setPhpNamespaceBytes(ByteString value)

Use this option to change the namespace of php generated classes. Default is empty. When this option is empty, the package name will be used for determining the namespace.

optional string php_namespace = 41;

Parameter
NameDescription
valueByteString

The bytes for phpNamespace to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setPyGenericServices(boolean value)

public DescriptorProtos.FileOptions.Builder setPyGenericServices(boolean value)

optional bool py_generic_services = 18 [default = false];

Parameter
NameDescription
valueboolean

The pyGenericServices to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public DescriptorProtos.FileOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
indexint
valueObject
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides

setRubyPackage(String value)

public DescriptorProtos.FileOptions.Builder setRubyPackage(String value)

Use this option to change the package of ruby generated classes. Default is empty. When this option is not set, the package name will be used for determining the ruby package.

optional string ruby_package = 45;

Parameter
NameDescription
valueString

The rubyPackage to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setRubyPackageBytes(ByteString value)

public DescriptorProtos.FileOptions.Builder setRubyPackageBytes(ByteString value)

Use this option to change the package of ruby generated classes. Default is empty. When this option is not set, the package name will be used for determining the ruby package.

optional string ruby_package = 45;

Parameter
NameDescription
valueByteString

The bytes for rubyPackage to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setSwiftPrefix(String value)

public DescriptorProtos.FileOptions.Builder setSwiftPrefix(String value)

By default Swift generators will take the proto package and CamelCase it replacing '.' with underscore and use that to prefix the types/symbols defined. When this options is provided, they will use this value instead to prefix the types/symbols defined.

optional string swift_prefix = 39;

Parameter
NameDescription
valueString

The swiftPrefix to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setSwiftPrefixBytes(ByteString value)

public DescriptorProtos.FileOptions.Builder setSwiftPrefixBytes(ByteString value)

By default Swift generators will take the proto package and CamelCase it replacing '.' with underscore and use that to prefix the types/symbols defined. When this options is provided, they will use this value instead to prefix the types/symbols defined.

optional string swift_prefix = 39;

Parameter
NameDescription
valueByteString

The bytes for swiftPrefix to set.

Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

This builder for chaining.

setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)

public DescriptorProtos.FileOptions.Builder setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameters
NameDescription
indexint
valueDescriptorProtos.UninterpretedOption
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)

public DescriptorProtos.FileOptions.Builder setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)

The parser stores options it doesn't recognize here. See the documentation for the "Options" section above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameters
NameDescription
indexint
builderForValueDescriptorProtos.UninterpretedOption.Builder
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final DescriptorProtos.FileOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DescriptorProtos.FileOptions.Builder
Overrides