Constant
extends Message
in package
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
Table of Contents
Properties
- $constant_kind : mixed
Methods
- __construct() : mixed
- Constructor.
- getBoolValue() : bool
- boolean value.
- getBytesValue() : string
- bytes value.
- getConstantKind() : string
- getDoubleValue() : float
- double value.
- getDurationValue() : Duration|null
- protobuf.Duration value.
- getInt64Value() : int|string
- int64 value.
- getNullValue() : int
- null value.
- getStringValue() : string
- string value.
- getTimestampValue() : Timestamp|null
- protobuf.Timestamp value.
- getUint64Value() : int|string
- uint64 value.
- hasBoolValue() : mixed
- hasBytesValue() : mixed
- hasDoubleValue() : mixed
- hasDurationValue() : mixed
- hasInt64Value() : mixed
- hasNullValue() : mixed
- hasStringValue() : mixed
- hasTimestampValue() : mixed
- hasUint64Value() : mixed
- setBoolValue() : $this
- boolean value.
- setBytesValue() : $this
- bytes value.
- setDoubleValue() : $this
- double value.
- setDurationValue() : $this
- protobuf.Duration value.
- setInt64Value() : $this
- int64 value.
- setNullValue() : $this
- null value.
- setStringValue() : $this
- string value.
- setTimestampValue() : $this
- protobuf.Timestamp value.
- setUint64Value() : $this
- uint64 value.
Properties
$constant_kind
protected
mixed
$constant_kind
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $data = NULL ]) : mixed
Parameters
- $data : array<string|int, mixed> = NULL
-
{ 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.}
getBoolValue()
boolean value.
public
getBoolValue() : bool
Generated from protobuf field bool bool_value = 2 [json_name = "boolValue"];
Return values
boolgetBytesValue()
bytes value.
public
getBytesValue() : string
Generated from protobuf field bytes bytes_value = 7 [json_name = "bytesValue"];
Return values
stringgetConstantKind()
public
getConstantKind() : string
Return values
stringgetDoubleValue()
double value.
public
getDoubleValue() : float
Generated from protobuf field double double_value = 5 [json_name = "doubleValue"];
Return values
floatgetDurationValue()
protobuf.Duration value.
public
getDurationValue() : Duration|null
Deprecated: duration is no longer considered a builtin cel type.
Generated from protobuf field .google.protobuf.Duration duration_value = 8 [json_name = "durationValue", deprecated = true];
Tags
Return values
Duration|nullgetInt64Value()
int64 value.
public
getInt64Value() : int|string
Generated from protobuf field int64 int64_value = 3 [json_name = "int64Value"];
Return values
int|stringgetNullValue()
null value.
public
getNullValue() : int
Generated from protobuf field .google.protobuf.NullValue null_value = 1 [json_name = "nullValue"];
Return values
intgetStringValue()
string value.
public
getStringValue() : string
Generated from protobuf field string string_value = 6 [json_name = "stringValue"];
Return values
stringgetTimestampValue()
protobuf.Timestamp value.
public
getTimestampValue() : Timestamp|null
Deprecated: timestamp is no longer considered a builtin cel type.
Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 9 [json_name = "timestampValue", deprecated = true];
Tags
Return values
Timestamp|nullgetUint64Value()
uint64 value.
public
getUint64Value() : int|string
Generated from protobuf field uint64 uint64_value = 4 [json_name = "uint64Value"];
Return values
int|stringhasBoolValue()
public
hasBoolValue() : mixed
hasBytesValue()
public
hasBytesValue() : mixed
hasDoubleValue()
public
hasDoubleValue() : mixed
hasDurationValue()
public
hasDurationValue() : mixed
hasInt64Value()
public
hasInt64Value() : mixed
hasNullValue()
public
hasNullValue() : mixed
hasStringValue()
public
hasStringValue() : mixed
hasTimestampValue()
public
hasTimestampValue() : mixed
hasUint64Value()
public
hasUint64Value() : mixed
setBoolValue()
boolean value.
public
setBoolValue(bool $var) : $this
Generated from protobuf field bool bool_value = 2 [json_name = "boolValue"];
Parameters
- $var : bool
Return values
$thissetBytesValue()
bytes value.
public
setBytesValue(string $var) : $this
Generated from protobuf field bytes bytes_value = 7 [json_name = "bytesValue"];
Parameters
- $var : string
Return values
$thissetDoubleValue()
double value.
public
setDoubleValue(float $var) : $this
Generated from protobuf field double double_value = 5 [json_name = "doubleValue"];
Parameters
- $var : float
Return values
$thissetDurationValue()
protobuf.Duration value.
public
setDurationValue(Duration $var) : $this
Deprecated: duration is no longer considered a builtin cel type.
Generated from protobuf field .google.protobuf.Duration duration_value = 8 [json_name = "durationValue", deprecated = true];
Parameters
- $var : Duration
Tags
Return values
$thissetInt64Value()
int64 value.
public
setInt64Value(int|string $var) : $this
Generated from protobuf field int64 int64_value = 3 [json_name = "int64Value"];
Parameters
- $var : int|string
Return values
$thissetNullValue()
null value.
public
setNullValue(int $var) : $this
Generated from protobuf field .google.protobuf.NullValue null_value = 1 [json_name = "nullValue"];
Parameters
- $var : int
Return values
$thissetStringValue()
string value.
public
setStringValue(string $var) : $this
Generated from protobuf field string string_value = 6 [json_name = "stringValue"];
Parameters
- $var : string
Return values
$thissetTimestampValue()
protobuf.Timestamp value.
public
setTimestampValue(Timestamp $var) : $this
Deprecated: timestamp is no longer considered a builtin cel type.
Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 9 [json_name = "timestampValue", deprecated = true];
Parameters
- $var : Timestamp
Tags
Return values
$thissetUint64Value()
uint64 value.
public
setUint64Value(int|string $var) : $this
Generated from protobuf field uint64 uint64_value = 4 [json_name = "uint64Value"];
Parameters
- $var : int|string