class Option extends Message

A protocol buffer option, which can be attached to a message, field, enumeration, etc.

Protobuf type Google\Protobuf\Option

Methods

__construct()

No description

string
getName()

The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, "map_entry".

setName(string $var)

The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, "map_entry".

Any
getValue()

The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.

setValue(Any $var)

The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.

Details

at line 38
__construct()

at line 52
string getName()

The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, "map_entry".

For custom options, it should be the fully-qualified name. For example, "google.api.http".

Generated from protobuf field string name = 1;

Return Value

string

at line 66
setName(string $var)

The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, "map_entry".

For custom options, it should be the fully-qualified name. For example, "google.api.http".

Generated from protobuf field string name = 1;

Parameters

string $var

at line 81
Any getValue()

The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.

Generated from protobuf field .google.protobuf.Any value = 2;

Return Value

Any

at line 95
setValue(Any $var)

The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.

Generated from protobuf field .google.protobuf.Any value = 2;

Parameters

Any $var