Reference documentation and code samples for the proto library Client class Type.
A protocol buffer message type.
New usages of this message as an alternative to DescriptorProto 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.Type
Namespace
Google \ ProtobufMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
The fully qualified message name. |
↳ fields |
array<Field>
The list of fields. |
↳ oneofs |
string[]
The list of types appearing in |
↳ options |
array<Option>
The 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
The fully qualified message name.
| Returns | |
|---|---|
| Type | Description |
string |
|
setName
The fully qualified message name.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getFields
The list of fields.
| Returns | |
|---|---|
| Type | Description |
RepeatedField<Field> |
|
setFields
The list of fields.
| Parameter | |
|---|---|
| Name | Description |
var |
array<Field>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getOneofs
The list of types appearing in oneof definitions in this type.
| Returns | |
|---|---|
| Type | Description |
RepeatedField<string> |
|
setOneofs
The list of types appearing in oneof definitions in this type.
| Parameter | |
|---|---|
| Name | Description |
var |
string[]
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getOptions
The protocol buffer options.
| Returns | |
|---|---|
| Type | Description |
RepeatedField<Option> |
|
setOptions
The 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 |
|