Reference documentation and code samples for the proto library Client class Enum.
Enum type definition.
New usages of this message as an alternative to EnumDescriptorProto are strongly discouraged. This message does not reliability preserve all information necessary to model the schema and preserve semantics. Instead make use of FileDescriptorSet which preserves the necessary information.
Generated from protobuf message google.protobuf.Enum
Namespace
Google \ ProtobufMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Enum type name. |
↳ enumvalue |
array<EnumValue>
Enum value definitions. |
↳ options |
array<Option>
Protocol buffer options. |
↳ source_context |
SourceContext
The source context. |
↳ syntax |
int
The source syntax. |
↳ edition |
string
The source edition string, only valid when syntax is SYNTAX_EDITIONS. |
getName
Enum type name.
| Returns | |
|---|---|
| Type | Description |
string |
|
setName
Enum type name.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEnumvalue
Enum value definitions.
| Returns | |
|---|---|
| Type | Description |
RepeatedField<EnumValue> |
|
setEnumvalue
Enum value definitions.
| Parameter | |
|---|---|
| Name | Description |
var |
array<EnumValue>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getOptions
Protocol buffer options.
| Returns | |
|---|---|
| Type | Description |
RepeatedField<Option> |
|
setOptions
Protocol buffer options.
| Parameter | |
|---|---|
| Name | Description |
var |
array<Option>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSourceContext
The source context.
| Returns | |
|---|---|
| Type | Description |
SourceContext|null |
|
hasSourceContext
clearSourceContext
setSourceContext
The source context.
| Parameter | |
|---|---|
| Name | Description |
var |
SourceContext
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSyntax
The source syntax.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type Syntax. one of the values in {@see \Google\Protobuf\Syntax} |
setSyntax
The source syntax.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getEdition
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
| Returns | |
|---|---|
| Type | Description |
string |
|
setEdition
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|