# Class FileOptions (3.27.1)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [3.27.1 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions)
- [3.23.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/3.23.0/Google.Protobuf.Reflection.FileOptions)
- [3.15.8](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/3.15.8/Google.Protobuf.Reflection.FileOptions)

    public sealed class FileOptions : IExtendableMessage<FileOptions>, IMessage<FileOptions>, IEquatable<FileOptions>, IDeepCloneable<FileOptions>, IBufferMessage, IMessage

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> FileOptions

## Implements

[IExtendableMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IExtendableMessage-1)[FileOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1)[FileOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[FileOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1)[FileOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage)

## Inherited Members

[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals)

## Namespace

[Google.Protobuf.Reflection](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection)

## Assembly

Google.Protobuf.dll

## Constructors

### FileOptions()

    public FileOptions()

### FileOptions(FileOptions)

    public FileOptions(FileOptions other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions` |

## Fields

### CcEnableArenasFieldNumber

    public const int CcEnableArenasFieldNumber = 31

Field number for the "cc_enable_arenas" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### CcGenericServicesFieldNumber

    public const int CcGenericServicesFieldNumber = 16

Field number for the "cc_generic_services" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### CsharpNamespaceFieldNumber

    public const int CsharpNamespaceFieldNumber = 37

Field number for the "csharp_namespace" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### DeprecatedFieldNumber

    public const int DeprecatedFieldNumber = 23

Field number for the "deprecated" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### FeaturesFieldNumber

    public const int FeaturesFieldNumber = 50

Field number for the "features" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### GoPackageFieldNumber

    public const int GoPackageFieldNumber = 11

Field number for the "go_package" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### JavaGenerateEqualsAndHashFieldNumber

    public const int JavaGenerateEqualsAndHashFieldNumber = 20

Field number for the "java_generate_equals_and_hash" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### JavaGenericServicesFieldNumber

    public const int JavaGenericServicesFieldNumber = 17

Field number for the "java_generic_services" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### JavaMultipleFilesFieldNumber

    public const int JavaMultipleFilesFieldNumber = 10

Field number for the "java_multiple_files" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### JavaOuterClassnameFieldNumber

    public const int JavaOuterClassnameFieldNumber = 8

Field number for the "java_outer_classname" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### JavaPackageFieldNumber

    public const int JavaPackageFieldNumber = 1

Field number for the "java_package" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### JavaStringCheckUtf8FieldNumber

    public const int JavaStringCheckUtf8FieldNumber = 27

Field number for the "java_string_check_utf8" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### ObjcClassPrefixFieldNumber

    public const int ObjcClassPrefixFieldNumber = 36

Field number for the "objc_class_prefix" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### OptimizeForFieldNumber

    public const int OptimizeForFieldNumber = 9

Field number for the "optimize_for" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### PhpClassPrefixFieldNumber

    public const int PhpClassPrefixFieldNumber = 40

Field number for the "php_class_prefix" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### PhpMetadataNamespaceFieldNumber

    public const int PhpMetadataNamespaceFieldNumber = 44

Field number for the "php_metadata_namespace" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### PhpNamespaceFieldNumber

    public const int PhpNamespaceFieldNumber = 41

Field number for the "php_namespace" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### PyGenericServicesFieldNumber

    public const int PyGenericServicesFieldNumber = 18

Field number for the "py_generic_services" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### RubyPackageFieldNumber

    public const int RubyPackageFieldNumber = 45

Field number for the "ruby_package" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### SwiftPrefixFieldNumber

    public const int SwiftPrefixFieldNumber = 39

Field number for the "swift_prefix" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### UninterpretedOptionFieldNumber

    public const int UninterpretedOptionFieldNumber = 999

Field number for the "uninterpreted_option" field.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

## Properties

### CcEnableArenas

    public bool CcEnableArenas { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### CcGenericServices

    public bool CcGenericServices { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### CsharpNamespace

    public string CsharpNamespace { get; set; }

Namespace for generated classes; defaults to the package.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Deprecated

    public bool Deprecated { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Descriptor

    public static MessageDescriptor Descriptor { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MessageDescriptor` |   |

### Features

    public FeatureSet Features { get; set; }

Any features defined in the specific edition.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FeatureSet` |   |

### GoPackage

    public string GoPackage { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### HasCcEnableArenas

    public bool HasCcEnableArenas { get; }

Gets whether the "cc_enable_arenas" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasCcGenericServices

    public bool HasCcGenericServices { get; }

Gets whether the "cc_generic_services" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasCsharpNamespace

    public bool HasCsharpNamespace { get; }

Gets whether the "csharp_namespace" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasDeprecated

    public bool HasDeprecated { get; }

Gets whether the "deprecated" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasGoPackage

    public bool HasGoPackage { get; }

Gets whether the "go_package" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasJavaGenerateEqualsAndHash

    [Obsolete]
    public bool HasJavaGenerateEqualsAndHash { get; }

Gets whether the "java_generate_equals_and_hash" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasJavaGenericServices

    public bool HasJavaGenericServices { get; }

Gets whether the "java_generic_services" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasJavaMultipleFiles

    public bool HasJavaMultipleFiles { get; }

Gets whether the "java_multiple_files" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasJavaOuterClassname

    public bool HasJavaOuterClassname { get; }

Gets whether the "java_outer_classname" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasJavaPackage

    public bool HasJavaPackage { get; }

Gets whether the "java_package" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasJavaStringCheckUtf8

    public bool HasJavaStringCheckUtf8 { get; }

Gets whether the "java_string_check_utf8" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasObjcClassPrefix

    public bool HasObjcClassPrefix { get; }

Gets whether the "objc_class_prefix" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasOptimizeFor

    public bool HasOptimizeFor { get; }

Gets whether the "optimize_for" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasPhpClassPrefix

    public bool HasPhpClassPrefix { get; }

Gets whether the "php_class_prefix" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasPhpMetadataNamespace

    public bool HasPhpMetadataNamespace { get; }

Gets whether the "php_metadata_namespace" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasPhpNamespace

    public bool HasPhpNamespace { get; }

Gets whether the "php_namespace" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasPyGenericServices

    public bool HasPyGenericServices { get; }

Gets whether the "py_generic_services" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasRubyPackage

    public bool HasRubyPackage { get; }

Gets whether the "ruby_package" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasSwiftPrefix

    public bool HasSwiftPrefix { get; }

Gets whether the "swift_prefix" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### JavaGenerateEqualsAndHash

    [Obsolete]
    public bool JavaGenerateEqualsAndHash { get; set; }

This option does nothing.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### JavaGenericServices

    public bool JavaGenericServices { get; set; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### JavaMultipleFiles

    public bool JavaMultipleFiles { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### JavaOuterClassname

    public string JavaOuterClassname { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### JavaPackage

    public string JavaPackage { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### JavaStringCheckUtf8

    public bool JavaStringCheckUtf8 { get; set; }

A proto2 file can set this to true to opt in to UTF-8 checking for Java,
which will throw an exception if invalid UTF-8 is parsed from the wire or
assigned to a string field.

TODO: clarify exactly what kinds of field types this option
applies to, and update these docs accordingly.

Proto3 files already perform these checks. Setting the option explicitly to
false has no effect: it cannot be used to opt proto3 files out of UTF-8
checks.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### ObjcClassPrefix

    public string ObjcClassPrefix { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### OptimizeFor

    public FileOptions.Types.OptimizeMode OptimizeFor { get; set; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptionshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode` |   |

### Parser

    public static MessageParser<FileOptions> Parser { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageParser-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions` |   |

### PhpClassPrefix

    public string PhpClassPrefix { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### PhpMetadataNamespace

    public string PhpMetadataNamespace { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### PhpNamespace

    public string PhpNamespace { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### PyGenericServices

    public bool PyGenericServices { get; set; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### RubyPackage

    public string RubyPackage { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### SwiftPrefix

    public string SwiftPrefix { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### UninterpretedOption

    public RepeatedField<UninterpretedOption> UninterpretedOption { get; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.UninterpretedOption` |   |

## Methods

### CalculateSize()

    public int CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` | The number of bytes required to write this message to a coded output stream. |

### ClearCcEnableArenas()

    public void ClearCcEnableArenas()

Clears the value of the "cc_enable_arenas" field

### ClearCcGenericServices()

    public void ClearCcGenericServices()

Clears the value of the "cc_generic_services" field

### ClearCsharpNamespace()

    public void ClearCsharpNamespace()

Clears the value of the "csharp_namespace" field

### ClearDeprecated()

    public void ClearDeprecated()

Clears the value of the "deprecated" field

### ClearExtension\<TValue\>(Extension\<FileOptions, TValue\>)

    public void ClearExtension<TValue>(Extension<FileOptions, TValue> extension)

Clears the value of the specified extension

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `extension` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Extension-2https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions` |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `TValue` |   |

### ClearExtension\<TValue\>(RepeatedExtension\<FileOptions, TValue\>)

    public void ClearExtension<TValue>(RepeatedExtension<FileOptions, TValue> extension)

Clears the value of the specified repeated extension

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `extension` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.RepeatedExtension-2https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions` |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `TValue` |   |

### ClearGoPackage()

    public void ClearGoPackage()

Clears the value of the "go_package" field

### ClearJavaGenerateEqualsAndHash()

    [Obsolete]
    public void ClearJavaGenerateEqualsAndHash()

Clears the value of the "java_generate_equals_and_hash" field

### ClearJavaGenericServices()

    public void ClearJavaGenericServices()

Clears the value of the "java_generic_services" field

### ClearJavaMultipleFiles()

    public void ClearJavaMultipleFiles()

Clears the value of the "java_multiple_files" field

### ClearJavaOuterClassname()

    public void ClearJavaOuterClassname()

Clears the value of the "java_outer_classname" field

### ClearJavaPackage()

    public void ClearJavaPackage()

Clears the value of the "java_package" field

### ClearJavaStringCheckUtf8()

    public void ClearJavaStringCheckUtf8()

Clears the value of the "java_string_check_utf8" field

### ClearObjcClassPrefix()

    public void ClearObjcClassPrefix()

Clears the value of the "objc_class_prefix" field

### ClearOptimizeFor()

    public void ClearOptimizeFor()

Clears the value of the "optimize_for" field

### ClearPhpClassPrefix()

    public void ClearPhpClassPrefix()

Clears the value of the "php_class_prefix" field

### ClearPhpMetadataNamespace()

    public void ClearPhpMetadataNamespace()

Clears the value of the "php_metadata_namespace" field

### ClearPhpNamespace()

    public void ClearPhpNamespace()

Clears the value of the "php_namespace" field

### ClearPyGenericServices()

    public void ClearPyGenericServices()

Clears the value of the "py_generic_services" field

### ClearRubyPackage()

    public void ClearRubyPackage()

Clears the value of the "ruby_package" field

### ClearSwiftPrefix()

    public void ClearSwiftPrefix()

Clears the value of the "swift_prefix" field

### Clone()

    public FileOptions Clone()

Creates a deep clone of this object.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions` | A deep clone of this object. |

### Equals(FileOptions)

    public bool Equals(FileOptions other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Equals(object)

    public override bool Equals(object other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://learn.microsoft.com/dotnet/api/system.object` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

**Overrides** [object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))

### GetExtension\<TValue\>(Extension\<FileOptions, TValue\>)

    public TValue GetExtension<TValue>(Extension<FileOptions, TValue> extension)

Gets the value of the specified extension

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `extension` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Extension-2https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TValue` |   |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `TValue` |   |

### GetExtension\<TValue\>(RepeatedExtension\<FileOptions, TValue\>)

    public RepeatedField<TValue> GetExtension<TValue>(RepeatedExtension<FileOptions, TValue> extension)

Gets the value of the specified repeated extension or null if the extension isn't registered in this set.
For a version of this method that never returns null, use [GetOrInitializeExtension\<TValue\>(RepeatedExtension\<T, TValue\>)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IExtendableMessage-1#Google_Protobuf_IExtendableMessage_1_GetOrInitializeExtension__1_Google_Protobuf_RepeatedExtension__0___0__)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `extension` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.RepeatedExtension-2https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1` |   |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `TValue` |   |

### GetHashCode()

    public override int GetHashCode()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

**Overrides** [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)

### GetOrInitializeExtension\<TValue\>(RepeatedExtension\<FileOptions, TValue\>)

    public RepeatedField<TValue> GetOrInitializeExtension<TValue>(RepeatedExtension<FileOptions, TValue> extension)

Gets the value of the specified repeated extension, registering it if it hasn't already been registered.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `extension` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.RepeatedExtension-2https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1` |   |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `TValue` |   |

### HasExtension\<TValue\>(Extension\<FileOptions, TValue\>)

    public bool HasExtension<TValue>(Extension<FileOptions, TValue> extension)

Gets whether the value of the specified extension is set

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `extension` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Extension-2https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `TValue` |   |

### MergeFrom(CodedInputStream)

    public void MergeFrom(CodedInputStream input)

Merges the data from the specified coded input stream with the current message.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.CodedInputStream` |

**Remarks** See the user guide for precise merge semantics.

### MergeFrom(FileOptions)

    public void MergeFrom(FileOptions other)

Merges the given message into this one.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions` |

**Remarks** See the user guide for precise merge semantics.

### SetExtension\<TValue\>(Extension\<FileOptions, TValue\>, TValue)

    public void SetExtension<TValue>(Extension<FileOptions, TValue> extension, TValue value)

Sets the value of the specified extension

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `extension` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Extension-2https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FileOptions` |
| `value` | `TValue` |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `TValue` |   |

### ToString()

    public override string ToString()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

**Overrides** [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

### WriteTo(CodedOutputStream)

    public void WriteTo(CodedOutputStream output)

Writes the data to the given coded output stream.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `output` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.CodedOutputStream` Coded output stream to write the data to. Must not be null. |

## Extension Methods

[MessageExtensions.IsInitialized(IMessage)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_IsInitialized_Google_Protobuf_IMessage_) [MessageExtensions.MergeDelimitedFrom(IMessage, Stream)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeDelimitedFrom_Google_Protobuf_IMessage_System_IO_Stream_) [MessageExtensions.MergeFrom(IMessage, ByteString)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_Google_Protobuf_ByteString_) [MessageExtensions.MergeFrom(IMessage, ReadOnlySequence\<byte\>)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_Buffers_ReadOnlySequence_System_Byte__) [MessageExtensions.MergeFrom(IMessage, byte\[\])](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_Byte___) [MessageExtensions.MergeFrom(IMessage, byte\[\], int, int)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_Byte___System_Int32_System_Int32_) [MessageExtensions.MergeFrom(IMessage, Stream)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_IO_Stream_) [MessageExtensions.MergeFrom(IMessage, ReadOnlySpan\<byte\>)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_ReadOnlySpan_System_Byte__) [MessageExtensions.ToByteArray(IMessage)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_ToByteArray_Google_Protobuf_IMessage_) [MessageExtensions.ToByteString(IMessage)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_ToByteString_Google_Protobuf_IMessage_) [MessageExtensions.WriteDelimitedTo(IMessage, Stream)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteDelimitedTo_Google_Protobuf_IMessage_System_IO_Stream_) [MessageExtensions.WriteTo(IMessage, IBufferWriter\<byte\>)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteTo_Google_Protobuf_IMessage_System_Buffers_IBufferWriter_System_Byte__) [MessageExtensions.WriteTo(IMessage, Stream)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteTo_Google_Protobuf_IMessage_System_IO_Stream_) [MessageExtensions.WriteTo(IMessage, Span\<byte\>)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteTo_Google_Protobuf_IMessage_System_Span_System_Byte__)