Constant
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
Constructor.
null value.
null value.
boolean value.
boolean value.
int64 value.
int64 value.
uint64 value.
uint64 value.
double value.
double value.
string value.
string value.
bytes value.
bytes value.
protobuf.Duration value.
protobuf.Duration value.
protobuf.Timestamp value.
protobuf.Timestamp value.
No description
Details
at line 56
__construct(array $data = NULL)
Constructor.
at line 67
int
getNullValue()
null value.
Generated from protobuf field .google.protobuf.NullValue null_value = 1;
at line 79
$this
setNullValue(int $var)
null value.
Generated from protobuf field .google.protobuf.NullValue null_value = 1;
at line 93
bool
getBoolValue()
boolean value.
Generated from protobuf field bool bool_value = 2;
at line 105
$this
setBoolValue(bool $var)
boolean value.
Generated from protobuf field bool bool_value = 2;
at line 119
int|string
getInt64Value()
int64 value.
Generated from protobuf field int64 int64_value = 3;
at line 131
$this
setInt64Value(int|string $var)
int64 value.
Generated from protobuf field int64 int64_value = 3;
at line 145
int|string
getUint64Value()
uint64 value.
Generated from protobuf field uint64 uint64_value = 4;
at line 157
$this
setUint64Value(int|string $var)
uint64 value.
Generated from protobuf field uint64 uint64_value = 4;
at line 171
float
getDoubleValue()
double value.
Generated from protobuf field double double_value = 5;
at line 183
$this
setDoubleValue(float $var)
double value.
Generated from protobuf field double double_value = 5;
at line 197
string
getStringValue()
string value.
Generated from protobuf field string string_value = 6;
at line 209
$this
setStringValue(string $var)
string value.
Generated from protobuf field string string_value = 6;
at line 223
string
getBytesValue()
bytes value.
Generated from protobuf field bytes bytes_value = 7;
at line 235
$this
setBytesValue(string $var)
bytes value.
Generated from protobuf field bytes bytes_value = 7;
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];
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];
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];
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];