<PackageReference Include="Google.Protobuf" Version="3.35.0" />

Google.Protobuf.Reflection.FieldOptions

public static class Types

Container for nested types declared in the FieldOptions message type.

public const int CtypeFieldNumber = 1

Field number for the "ctype" field.

public const int DebugRedactFieldNumber = 16

Field number for the "debug_redact" field.

public const int DeprecatedFieldNumber = 3

Field number for the "deprecated" field.

public const int EditionDefaultsFieldNumber = 20

Field number for the "edition_defaults" field.

public const int FeaturesFieldNumber = 21

Field number for the "features" field.

public const int FeatureSupportFieldNumber = 22

Field number for the "feature_support" field.

public const int JstypeFieldNumber = 6

Field number for the "jstype" field.

public const int LazyFieldNumber = 5

Field number for the "lazy" field.

public const int PackedFieldNumber = 2

Field number for the "packed" field.

public const int RetentionFieldNumber = 17

Field number for the "retention" field.

public const int TargetsFieldNumber = 19

Field number for the "targets" field.

public const int UninterpretedOptionFieldNumber = 999

Field number for the "uninterpreted_option" field.

public const int UnverifiedLazyFieldNumber = 15

Field number for the "unverified_lazy" field.

public const int WeakFieldNumber = 10

Field number for the "weak" field.

public static MessageDescriptor Descriptor { get; }

public static MessageParser<FieldOptions> Parser { get; }

public CType Ctype { get; set; }

NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. The ctype option instructs the C++ code generator to use a different representation of the field than it normally would. See the specific options below. This option is only implemented to support use of [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of type "bytes" in the open source release. TODO: make ctype actually deprecated.

public bool DebugRedact { get; set; }

Indicate that the field value should not be printed out when using debug formats, e.g. when the field contains sensitive credentials.

public bool Deprecated { get; set; }

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

public FeatureSet Features { get; set; }

Any features defined in the specific edition. WARNING: This field should only be used by protobuf plugins or special cases like the proto compiler. Other uses are discouraged and developers should rely on the protoreflect APIs for their client language.

public FeatureSupport FeatureSupport { get; set; }

public bool HasCtype { get; }

Gets whether the "ctype" field is set

public bool HasDebugRedact { get; }

Gets whether the "debug_redact" field is set

public bool HasDeprecated { get; }

Gets whether the "deprecated" field is set

public bool HasJstype { get; }

Gets whether the "jstype" field is set

public bool HasLazy { get; }

Gets whether the "lazy" field is set

public bool HasPacked { get; }

Gets whether the "packed" field is set

public bool HasRetention { get; }

Gets whether the "retention" field is set

public bool HasUnverifiedLazy { get; }

Gets whether the "unverified_lazy" field is set

public bool HasWeak { get; }

Gets whether the "weak" field is set

public JSType Jstype { get; set; }

public bool Lazy { get; set; }

Should this field be parsed lazily? Lazy applies only to message-type fields. It means that when the outer message is initially parsed, the inner message's contents will not be parsed but instead stored in encoded form. The inner message will actually be parsed when it is first accessed. This is only a hint. Implementations are free to choose whether to use eager or lazy parsing regardless of the value of this option. However, setting this option true suggests that the protocol author believes that using lazy parsing on this field is worth the additional bookkeeping overhead typically needed to implement it. This option does not affect the public interface of any generated code; all method signatures remain the same. Furthermore, thread-safety of the interface is not affected by this option; const methods remain safe to call from multiple threads concurrently, while non-const methods continue to require exclusive access. Note that lazy message fields are still eagerly verified to check ill-formed wireformat or missing required fields. Calling IsInitialized() on the outer message would fail if the inner message has missing required fields. Failed verification would result in parsing failure (except when uninitialized messages are acceptable).

public bool Packed { get; set; }

The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire. Rather than repeatedly writing the tag and type for each element, the entire array is encoded as a single length-delimited blob. In proto3, only explicit setting it to false will avoid using packed encoding. This option is prohibited in Editions, but the `repeated_field_encoding` feature can be used to control the behavior.

public OptionRetention Retention { get; set; }

The parser stores options it doesn't recognize here. See above.

public bool UnverifiedLazy { get; set; }

unverified_lazy does no correctness checks on the byte stream. This should only be used where lazy with verification is prohibitive for performance reasons.

public bool Weak { get; set; }

DEPRECATED. DO NOT USE! For Google-internal migration only. Do not use.

public FieldOptions()

public FieldOptions(FieldOptions other)

public int CalculateSize()

public void ClearCtype()

Clears the value of the "ctype" field

public void ClearDebugRedact()

Clears the value of the "debug_redact" field

public void ClearDeprecated()

Clears the value of the "deprecated" field

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

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

public void ClearJstype()

Clears the value of the "jstype" field

public void ClearLazy()

Clears the value of the "lazy" field

public void ClearPacked()

Clears the value of the "packed" field

public void ClearRetention()

Clears the value of the "retention" field

public void ClearUnverifiedLazy()

Clears the value of the "unverified_lazy" field

public void ClearWeak()

Clears the value of the "weak" field

public bool Equals(FieldOptions other)

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

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

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

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

public void MergeFrom(FieldOptions other)

public void MergeFrom(CodedInputStream input)

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

public void WriteTo(CodedOutputStream output)