proto library Client - Class EnumOptions (v5.36.2)

Reference documentation and code samples for the proto library Client class EnumOptions.

Generated from protobuf message google.protobuf.EnumOptions

Namespace

Google \ Protobuf \ Internal

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ allow_alias bool

Set this option to true to allow mapping different tag names to the same value.

↳ deprecated bool

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

↳ deprecated_legacy_json_field_conflicts bool

Enable the legacy handling of JSON field name conflicts. This lowercases and strips underscored from the fields before comparison in proto3 only. The new behavior takes json_name into account and applies to proto2 as well. TODO Remove this legacy behavior once downstream teams have had time to migrate.

↳ features FeatureSet

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.

↳ uninterpreted_option array<UninterpretedOption>

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

getAllowAlias

Set this option to true to allow mapping different tag names to the same value.

Returns
Type Description
bool

hasAllowAlias

clearAllowAlias

setAllowAlias

Set this option to true to allow mapping different tag names to the same value.

Parameter
Name Description
var bool
Returns
Type Description
$this

getDeprecated

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

Returns
Type Description
bool

hasDeprecated

clearDeprecated

setDeprecated

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

Parameter
Name Description
var bool
Returns
Type Description
$this

getDeprecatedLegacyJsonFieldConflicts

Enable the legacy handling of JSON field name conflicts. This lowercases and strips underscored from the fields before comparison in proto3 only.

The new behavior takes json_name into account and applies to proto2 as well. TODO Remove this legacy behavior once downstream teams have had time to migrate.

Returns
Type Description
bool

hasDeprecatedLegacyJsonFieldConflicts

clearDeprecatedLegacyJsonFieldConflicts

setDeprecatedLegacyJsonFieldConflicts

Enable the legacy handling of JSON field name conflicts. This lowercases and strips underscored from the fields before comparison in proto3 only.

The new behavior takes json_name into account and applies to proto2 as well. TODO Remove this legacy behavior once downstream teams have had time to migrate.

Parameter
Name Description
var bool
Returns
Type Description
$this

getFeatures

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.

Returns
Type Description
FeatureSet|null

hasFeatures

clearFeatures

setFeatures

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.

Parameter
Name Description
var FeatureSet
Returns
Type Description
$this

getUninterpretedOption

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

Returns
Type Description
Google\Protobuf\RepeatedField<UninterpretedOption>

setUninterpretedOption

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

Parameter
Name Description
var array<UninterpretedOption>
Returns
Type Description
$this