class Literal extends Message

Represents a primitive literal.

This is similar to 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.v1beta1.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.v1beta1.Literal

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.

string
getConstantKind()

No description

Details

at line 49
__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.

}

at line 60
int getNullValue()

null value.

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

Return Value

int

at line 72
$this setNullValue(int $var)

null value.

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

Parameters

int $var

Return Value

$this

at line 86
bool getBoolValue()

boolean value.

Generated from protobuf field bool bool_value = 2;

Return Value

bool

at line 98
$this setBoolValue(bool $var)

boolean value.

Generated from protobuf field bool bool_value = 2;

Parameters

bool $var

Return Value

$this

at line 112
int|string getInt64Value()

int64 value.

Generated from protobuf field int64 int64_value = 3;

Return Value

int|string

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

int64 value.

Generated from protobuf field int64 int64_value = 3;

Parameters

int|string $var

Return Value

$this

at line 138
int|string getUint64Value()

uint64 value.

Generated from protobuf field uint64 uint64_value = 4;

Return Value

int|string

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

uint64 value.

Generated from protobuf field uint64 uint64_value = 4;

Parameters

int|string $var

Return Value

$this

at line 164
float getDoubleValue()

double value.

Generated from protobuf field double double_value = 5;

Return Value

float

at line 176
$this setDoubleValue(float $var)

double value.

Generated from protobuf field double double_value = 5;

Parameters

float $var

Return Value

$this

at line 190
string getStringValue()

string value.

Generated from protobuf field string string_value = 6;

Return Value

string

at line 202
$this setStringValue(string $var)

string value.

Generated from protobuf field string string_value = 6;

Parameters

string $var

Return Value

$this

at line 216
string getBytesValue()

bytes value.

Generated from protobuf field bytes bytes_value = 7;

Return Value

string

at line 228
$this setBytesValue(string $var)

bytes value.

Generated from protobuf field bytes bytes_value = 7;

Parameters

string $var

Return Value

$this

at line 239
string getConstantKind()

Return Value

string