proto library Client - Class Declaration (v5.36.2)

Reference documentation and code samples for the proto library Client class Declaration.

Generated from protobuf message google.protobuf.ExtensionRangeOptions.Declaration

Namespace

Google \ Protobuf \ Internal \ ExtensionRangeOptions

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ number int

The extension number declared within the extension range.

↳ full_name string

The fully-qualified name of the extension field. There must be a leading dot in front of the full name.

↳ type string

The fully-qualified type name of the extension field. Unlike Metadata.type, Declaration.type must have a leading dot for messages and enums.

↳ reserved bool

If true, indicates that the number is reserved in the extension range, and any extension field with the number will fail to compile. Set this when a declared extension field is deleted.

↳ repeated bool

If true, indicates that the extension must be defined as repeated. Otherwise the extension must be defined as optional.

getNumber

The extension number declared within the extension range.

Returns
Type Description
int

hasNumber

clearNumber

setNumber

The extension number declared within the extension range.

Parameter
Name Description
var int
Returns
Type Description
$this

getFullName

The fully-qualified name of the extension field. There must be a leading dot in front of the full name.

Returns
Type Description
string

hasFullName

clearFullName

setFullName

The fully-qualified name of the extension field. There must be a leading dot in front of the full name.

Parameter
Name Description
var string
Returns
Type Description
$this

getType

The fully-qualified type name of the extension field. Unlike Metadata.type, Declaration.type must have a leading dot for messages and enums.

Returns
Type Description
string

hasType

clearType

setType

The fully-qualified type name of the extension field. Unlike Metadata.type, Declaration.type must have a leading dot for messages and enums.

Parameter
Name Description
var string
Returns
Type Description
$this

getReserved

If true, indicates that the number is reserved in the extension range, and any extension field with the number will fail to compile. Set this when a declared extension field is deleted.

Returns
Type Description
bool

hasReserved

clearReserved

setReserved

If true, indicates that the number is reserved in the extension range, and any extension field with the number will fail to compile. Set this when a declared extension field is deleted.

Parameter
Name Description
var bool
Returns
Type Description
$this

getRepeated

If true, indicates that the extension must be defined as repeated.

Otherwise the extension must be defined as optional.

Returns
Type Description
bool

hasRepeated

clearRepeated

setRepeated

If true, indicates that the extension must be defined as repeated.

Otherwise the extension must be defined as optional.

Parameter
Name Description
var bool
Returns
Type Description
$this