class Field extends Message

A single field of a message type.

Protobuf type Google\Protobuf\Field

Methods

__construct()

No description

int
getKind()

The field type.

setKind(int $var)

The field type.

int
getCardinality()

The field cardinality.

setCardinality(int $var)

The field cardinality.

int
getNumber()

The field number.

setNumber(int $var)

The field number.

string
getName()

The field name.

setName(string $var)

The field name.

string
getTypeUrl()

The field type URL, without the scheme, for message or enumeration types. Example: "type.googleapis.com/google.protobuf.Timestamp".

setTypeUrl(string $var)

The field type URL, without the scheme, for message or enumeration types. Example: "type.googleapis.com/google.protobuf.Timestamp".

int
getOneofIndex()

The index of the field type in Type.oneofs, for message or enumeration types. The first type has index 1; zero means the type is not in the list.

setOneofIndex(int $var)

The index of the field type in Type.oneofs, for message or enumeration types. The first type has index 1; zero means the type is not in the list.

bool
getPacked()

Whether to use alternative packed wire representation.

setPacked(bool $var)

Whether to use alternative packed wire representation.

RepeatedField
getOptions()

The protocol buffer options.

setOptions(array|RepeatedField $var)

The protocol buffer options.

string
getJsonName()

The field JSON name.

setJsonName(string $var)

The field JSON name.

string
getDefaultValue()

The string value of the default value of this field. Proto2 syntax only.

setDefaultValue(string $var)

The string value of the default value of this field. Proto2 syntax only.

Details

at line 81
__construct()

at line 92
int getKind()

The field type.

Generated from protobuf field .google.protobuf.Field.Kind kind = 1;

Return Value

int

at line 103
setKind(int $var)

The field type.

Generated from protobuf field .google.protobuf.Field.Kind kind = 1;

Parameters

int $var

at line 115
int getCardinality()

The field cardinality.

Generated from protobuf field .google.protobuf.Field.Cardinality cardinality = 2;

Return Value

int

at line 126
setCardinality(int $var)

The field cardinality.

Generated from protobuf field .google.protobuf.Field.Cardinality cardinality = 2;

Parameters

int $var

at line 138
int getNumber()

The field number.

Generated from protobuf field int32 number = 3;

Return Value

int

at line 149
setNumber(int $var)

The field number.

Generated from protobuf field int32 number = 3;

Parameters

int $var

at line 161
string getName()

The field name.

Generated from protobuf field string name = 4;

Return Value

string

at line 172
setName(string $var)

The field name.

Generated from protobuf field string name = 4;

Parameters

string $var

at line 185
string getTypeUrl()

The field type URL, without the scheme, for message or enumeration types. Example: "type.googleapis.com/google.protobuf.Timestamp".

Generated from protobuf field string type_url = 6;

Return Value

string

at line 197
setTypeUrl(string $var)

The field type URL, without the scheme, for message or enumeration types. Example: "type.googleapis.com/google.protobuf.Timestamp".

Generated from protobuf field string type_url = 6;

Parameters

string $var

at line 210
int getOneofIndex()

The index of the field type in Type.oneofs, for message or enumeration types. The first type has index 1; zero means the type is not in the list.

Generated from protobuf field int32 oneof_index = 7;

Return Value

int

at line 222
setOneofIndex(int $var)

The index of the field type in Type.oneofs, for message or enumeration types. The first type has index 1; zero means the type is not in the list.

Generated from protobuf field int32 oneof_index = 7;

Parameters

int $var

at line 234
bool getPacked()

Whether to use alternative packed wire representation.

Generated from protobuf field bool packed = 8;

Return Value

bool

at line 245
setPacked(bool $var)

Whether to use alternative packed wire representation.

Generated from protobuf field bool packed = 8;

Parameters

bool $var

at line 257
RepeatedField getOptions()

The protocol buffer options.

Generated from protobuf field repeated .google.protobuf.Option options = 9;

Return Value

RepeatedField

at line 268
setOptions(array|RepeatedField $var)

The protocol buffer options.

Generated from protobuf field repeated .google.protobuf.Option options = 9;

Parameters

array|RepeatedField $var

at line 280
string getJsonName()

The field JSON name.

Generated from protobuf field string json_name = 10;

Return Value

string

at line 291
setJsonName(string $var)

The field JSON name.

Generated from protobuf field string json_name = 10;

Parameters

string $var

at line 303
string getDefaultValue()

The string value of the default value of this field. Proto2 syntax only.

Generated from protobuf field string default_value = 11;

Return Value

string

at line 314
setDefaultValue(string $var)

The string value of the default value of this field. Proto2 syntax only.

Generated from protobuf field string default_value = 11;

Parameters

string $var