Skip to main content

Class: EnumOptions

Represents an EnumOptions.

Properties​

.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Enum?​

optional .grpc.gateway.protoc_gen_openapiv2.options.openapiv2Enum?: $Properties | null

EnumOptions .grpc.gateway.protoc_gen_openapiv2.options.openapiv2Enum


allowAlias​

allowAlias: boolean

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


deprecated​

deprecated: boolean

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.


deprecatedLegacyJsonFieldConflicts​

deprecatedLegacyJsonFieldConflicts: boolean

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?​

optional features?: $Properties | null

Any features defined in the specific edition.


uninterpretedOption​

uninterpretedOption: $Properties[]

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

Methods​

toJSON()​

toJSON(): object

Converts this EnumOptions to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): EnumOptions & $Shape

Creates a new EnumOptions instance using the specified properties.

Parameters​
properties?​

$Shape

Properties to set

Returns​

EnumOptions & $Shape

EnumOptions instance

Call Signature​

static create(properties?): EnumOptions

Creates a new EnumOptions instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

EnumOptions

EnumOptions instance


decode()​

static decode(reader, length?): EnumOptions & $Shape

Decodes an EnumOptions message from the specified reader or buffer.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

length?​

number

Message length if known beforehand

Returns​

EnumOptions & $Shape

EnumOptions

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): EnumOptions & $Shape

Decodes an EnumOptions message from the specified reader or buffer, length delimited.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

EnumOptions & $Shape

EnumOptions

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified EnumOptions message. Does not implicitly google.protobuf.EnumOptions.verify|verify messages.

Parameters​

message​

$Properties

EnumOptions message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

Encodes the specified EnumOptions message, length delimited. Does not implicitly google.protobuf.EnumOptions.verify|verify messages.

Parameters​

message​

$Properties

EnumOptions message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): EnumOptions

Creates an EnumOptions message from a plain object. Also converts values to their respective internal types.

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

EnumOptions

EnumOptions


toObject()​

static toObject(message, options?): object

Creates a plain object from an EnumOptions message. Also converts values to other types if specified.

Parameters​

message​

EnumOptions

EnumOptions

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object