class Constant extends Message

Represents a primitive literal.

Named 'Constant' here for backwards compatibility. This is similar as the primitives supported in the well-known type google.protobuf.Value, but richer so it can represent CEL's full range of primitives. Lists and structs are not included as constants as these aggregate types may contain [Expr][google.api.expr.v1alpha1.Expr] elements which require evaluation and are thus not constant. Examples of literals include: "hello", b'bytes', 1u, 4.2, -2, true, null.

Generated from protobuf message google.api.expr.v1alpha1.Constant

Properties

protected $constant_kind

Methods

__construct(array $data = NULL)

Constructor.

int
getNullValue()

null value.

$this
setNullValue(int $var)

null value.

bool
getBoolValue()

boolean value.

$this
setBoolValue(bool $var)

boolean value.

int|string
getInt64Value()

int64 value.

$this
setInt64Value(int|string $var)

int64 value.

int|string
getUint64Value()

uint64 value.

$this
setUint64Value(int|string $var)

uint64 value.

float
getDoubleValue()

double value.

$this
setDoubleValue(float $var)

double value.

string
getStringValue()

string value.

$this
setStringValue(string $var)

string value.

string
getBytesValue()

bytes value.

$this
setBytesValue(string $var)

bytes value.

Duration
getDurationValue()

protobuf.Duration value.

$this
setDurationValue(Duration $var)

protobuf.Duration value.

Timestamp
getTimestampValue()

protobuf.Timestamp value.

$this
setTimestampValue(Timestamp $var)

protobuf.Timestamp value.

string
getConstantKind()

No description

Details

at line 56
__construct(array $data = NULL)

Constructor.

Parameters

array $data { Optional. Data for populating the Message object.

@type int $null_value
      null value.
@type bool $bool_value
      boolean value.
@type int|string $int64_value
      int64 value.
@type int|string $uint64_value
      uint64 value.
@type float $double_value
      double value.
@type string $string_value
      string value.
@type string $bytes_value
      bytes value.
@type \Google\Protobuf\Duration $duration_value
      protobuf.Duration value.
      Deprecated: duration is no longer considered a builtin cel type.
@type \Google\Protobuf\Timestamp $timestamp_value
      protobuf.Timestamp value.
      Deprecated: timestamp is no longer considered a builtin cel type.

}

at line 67
int getNullValue()

null value.

Generated from protobuf field .google.protobuf.NullValue null_value = 1;

Return Value

int

at line 79
$this setNullValue(int $var)

null value.

Generated from protobuf field .google.protobuf.NullValue null_value = 1;

Parameters

int $var

Return Value

$this

at line 93
bool getBoolValue()

boolean value.

Generated from protobuf field bool bool_value = 2;

Return Value

bool

at line 105
$this setBoolValue(bool $var)

boolean value.

Generated from protobuf field bool bool_value = 2;

Parameters

bool $var

Return Value

$this

at line 119
int|string getInt64Value()

int64 value.

Generated from protobuf field int64 int64_value = 3;

Return Value

int|string

at line 131
$this setInt64Value(int|string $var)

int64 value.

Generated from protobuf field int64 int64_value = 3;

Parameters

int|string $var

Return Value

$this

at line 145
int|string getUint64Value()

uint64 value.

Generated from protobuf field uint64 uint64_value = 4;

Return Value

int|string

at line 157
$this setUint64Value(int|string $var)

uint64 value.

Generated from protobuf field uint64 uint64_value = 4;

Parameters

int|string $var

Return Value

$this

at line 171
float getDoubleValue()

double value.

Generated from protobuf field double double_value = 5;

Return Value

float

at line 183
$this setDoubleValue(float $var)

double value.

Generated from protobuf field double double_value = 5;

Parameters

float $var

Return Value

$this

at line 197
string getStringValue()

string value.

Generated from protobuf field string string_value = 6;

Return Value

string

at line 209
$this setStringValue(string $var)

string value.

Generated from protobuf field string string_value = 6;

Parameters

string $var

Return Value

$this

at line 223
string getBytesValue()

bytes value.

Generated from protobuf field bytes bytes_value = 7;

Return Value

string

at line 235
$this setBytesValue(string $var)

bytes value.

Generated from protobuf field bytes bytes_value = 7;

Parameters

string $var

Return Value

$this

at line 250
Duration getDurationValue()

protobuf.Duration value.

Deprecated: duration is no longer considered a builtin cel type.

Generated from protobuf field .google.protobuf.Duration duration_value = 8 [deprecated = true];

Return Value

Duration

at line 263
$this setDurationValue(Duration $var)

protobuf.Duration value.

Deprecated: duration is no longer considered a builtin cel type.

Generated from protobuf field .google.protobuf.Duration duration_value = 8 [deprecated = true];

Parameters

Duration $var

Return Value

$this

at line 278
Timestamp getTimestampValue()

protobuf.Timestamp value.

Deprecated: timestamp is no longer considered a builtin cel type.

Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];

Return Value

Timestamp

at line 291
$this setTimestampValue(Timestamp $var)

protobuf.Timestamp value.

Deprecated: timestamp is no longer considered a builtin cel type.

Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 9 [deprecated = true];

Parameters

Timestamp $var

Return Value

$this

at line 302
string getConstantKind()

Return Value

string