QueryRequest
in package
implements
ModelInterface, ArrayAccess, JsonSerializable
QueryRequest Class Doc Comment
Tags
Table of Contents
Interfaces
- ModelInterface
- Interface abstracting model access.
- ArrayAccess
- JsonSerializable
Constants
- COMPRESSION_NUMBER_0 : mixed = 0
- COMPRESSION_NUMBER_1 : mixed = 1
- DISCRIMINATOR : mixed = null
- FORMAT_COUNT : mixed = 'count'
- FORMAT_CSV : mixed = 'csv'
- FORMAT_IFC : mixed = 'ifc'
- FORMAT_IFCXML : mixed = 'ifcxml'
- FORMAT_JSON : mixed = 'json'
- FORMAT_QIDS : mixed = 'qids'
- FORMAT_XLSX : mixed = 'xlsx'
Properties
- $attributeMap : array<string, string>
- Array of attributes where the key is the local name, and the value is the original name
- $container : array<string|int, mixed>
- Associative array for storing property values
- $getters : array<string, string>
- Array of attributes to getter functions (for serialization of requests)
- $openAPIFormats : array<string, string|null>
- Array of property to format mappings. Used for (de)serialization
- $openAPIModelName : string
- The original name of the model.
- $openAPINullables : array<string, bool>
- Array of nullable properties. Used for (de)serialization
- $openAPINullablesSetToNull : array<string, bool>
- If a nullable field gets set to null, insert it here
- $openAPITypes : array<string, string>
- Array of property to type mappings. Used for (de)serialization
- $setters : array<string, string>
- Array of attributes to setter functions (for deserialization of responses)
Methods
- __construct() : mixed
- Constructor
- __toString() : string
- Gets the string presentation of the object
- attributeMap() : array<string, string>
- Array of attributes where the key is the local name, and the value is the original name
- getActionUuid() : string|null
- Gets action_uuid
- getActionVersion() : int|null
- Gets action_version
- getAliasKeys() : bool|null
- Gets alias_keys
- getBvl() : string|null
- Gets bvl
- getColors() : array<string, array<string|int, float>>|null
- Gets colors
- getColumns() : bool|null
- Gets columns
- getCompression() : int|null
- Gets compression
- getCompressionAllowableValues() : array<string|int, string>
- Gets allowable values of the enum
- getFilename() : string|null
- Gets filename
- getForceGetQid() : bool|null
- Gets force_get_qid
- getFormat() : string|null
- Gets format
- getFormatAllowableValues() : array<string|int, string>
- Gets allowable values of the enum
- getGroupKeys() : array<string|int, string>|null
- Gets group_keys
- getGroupLevel() : int|null
- Gets group_level
- getGroupPath() : array<string|int, int>|null
- Gets group_path
- getModelName() : string
- The original name of the model.
- getModels() : array<string|int, ModelIdentifier>|null
- Gets models
- getParameters() : array<string, mixed>|null
- Gets parameters
- getQuery() : string|null
- Gets query
- getters() : array<string, string>
- Array of attributes to getter functions (for serialization of requests)
- getVirtualFeatures() : mixed|null
- Gets virtual_features
- isNullable() : bool
- Checks if a property is nullable
- isNullableSetToNull() : bool
- Checks if a nullable property is set to null.
- jsonSerialize() : mixed
- Serializes the object to a value that can be serialized natively by json_encode().
- listInvalidProperties() : array<string|int, string>
- Show all the invalid properties with reasons.
- offsetExists() : bool
- Returns true if offset exists. False otherwise.
- offsetGet() : mixed|null
- Gets offset.
- offsetSet() : void
- Sets value based on offset.
- offsetUnset() : void
- Unsets offset.
- openAPIFormats() : array<string, string|null>
- Array of property to format mappings. Used for (de)serialization
- openAPITypes() : array<string, string>
- Array of property to type mappings. Used for (de)serialization
- setActionUuid() : $this
- Sets action_uuid
- setActionVersion() : $this
- Sets action_version
- setAliasKeys() : $this
- Sets alias_keys
- setBvl() : $this
- Sets bvl
- setColors() : $this
- Sets colors
- setColumns() : $this
- Sets columns
- setCompression() : $this
- Sets compression
- setFilename() : $this
- Sets filename
- setForceGetQid() : $this
- Sets force_get_qid
- setFormat() : $this
- Sets format
- setGroupKeys() : $this
- Sets group_keys
- setGroupLevel() : $this
- Sets group_level
- setGroupPath() : $this
- Sets group_path
- setModels() : $this
- Sets models
- setParameters() : $this
- Sets parameters
- setQuery() : $this
- Sets query
- setters() : array<string, string>
- Array of attributes to setter functions (for deserialization of responses)
- setVirtualFeatures() : $this
- Sets virtual_features
- toHeaderValue() : string
- Gets a header-safe presentation of the object
- valid() : bool
- Validate all the properties in the model return true if all passed
- openAPINullables() : array<string, bool>
- Array of nullable properties
- fillIfExists() : void
- Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this->openAPINullablesSetToNull array
- getOpenAPINullablesSetToNull() : array<string, bool>
- Array of nullable field names deliberately set to null
- setOpenAPINullablesSetToNull() : void
- Setter - Array of nullable field names deliberately set to null
Constants
COMPRESSION_NUMBER_0
public
mixed
COMPRESSION_NUMBER_0
= 0
COMPRESSION_NUMBER_1
public
mixed
COMPRESSION_NUMBER_1
= 1
DISCRIMINATOR
public
mixed
DISCRIMINATOR
= null
FORMAT_COUNT
public
mixed
FORMAT_COUNT
= 'count'
FORMAT_CSV
public
mixed
FORMAT_CSV
= 'csv'
FORMAT_IFC
public
mixed
FORMAT_IFC
= 'ifc'
FORMAT_IFCXML
public
mixed
FORMAT_IFCXML
= 'ifcxml'
FORMAT_JSON
public
mixed
FORMAT_JSON
= 'json'
FORMAT_QIDS
public
mixed
FORMAT_QIDS
= 'qids'
FORMAT_XLSX
public
mixed
FORMAT_XLSX
= 'xlsx'
Properties
$attributeMap
Array of attributes where the key is the local name, and the value is the original name
protected
static array<string, string>
$attributeMap
= ['models' => 'models', 'query' => 'query', 'action_uuid' => 'action_uuid', 'action_version' => 'action_version', 'format' => 'format', 'parameters' => 'parameters', 'virtual_features' => 'virtual_features', 'force_get_qid' => 'force_get_qid', 'columns' => 'columns', 'alias_keys' => 'alias_keys', 'filename' => 'filename', 'colors' => 'colors', 'bvl' => 'bvl', 'compression' => 'compression', 'group_path' => 'groupPath', 'group_keys' => 'groupKeys', 'group_level' => 'groupLevel']
$container
Associative array for storing property values
protected
array<string|int, mixed>
$container
= []
$getters
Array of attributes to getter functions (for serialization of requests)
protected
static array<string, string>
$getters
= ['models' => 'getModels', 'query' => 'getQuery', 'action_uuid' => 'getActionUuid', 'action_version' => 'getActionVersion', 'format' => 'getFormat', 'parameters' => 'getParameters', 'virtual_features' => 'getVirtualFeatures', 'force_get_qid' => 'getForceGetQid', 'columns' => 'getColumns', 'alias_keys' => 'getAliasKeys', 'filename' => 'getFilename', 'colors' => 'getColors', 'bvl' => 'getBvl', 'compression' => 'getCompression', 'group_path' => 'getGroupPath', 'group_keys' => 'getGroupKeys', 'group_level' => 'getGroupLevel']
$openAPIFormats
Array of property to format mappings. Used for (de)serialization
protected
static array<string, string|null>
$openAPIFormats
= ['models' => null, 'query' => null, 'action_uuid' => 'uuid', 'action_version' => null, 'format' => null, 'parameters' => null, 'virtual_features' => null, 'force_get_qid' => null, 'columns' => null, 'alias_keys' => null, 'filename' => null, 'colors' => null, 'bvl' => null, 'compression' => null, 'group_path' => null, 'group_keys' => null, 'group_level' => null]
$openAPIModelName
The original name of the model.
protected
static string
$openAPIModelName
= 'QueryRequest'
$openAPINullables
Array of nullable properties. Used for (de)serialization
protected
static array<string, bool>
$openAPINullables
= ['models' => false, 'query' => false, 'action_uuid' => false, 'action_version' => false, 'format' => false, 'parameters' => false, 'virtual_features' => true, 'force_get_qid' => false, 'columns' => false, 'alias_keys' => false, 'filename' => false, 'colors' => false, 'bvl' => false, 'compression' => false, 'group_path' => true, 'group_keys' => true, 'group_level' => false]
$openAPINullablesSetToNull
If a nullable field gets set to null, insert it here
protected
array<string, bool>
$openAPINullablesSetToNull
= []
$openAPITypes
Array of property to type mappings. Used for (de)serialization
protected
static array<string, string>
$openAPITypes
= ['models' => '\BIMworks\Model\ModelIdentifier[]', 'query' => 'string', 'action_uuid' => 'string', 'action_version' => 'int', 'format' => 'string', 'parameters' => 'array<string,mixed>', 'virtual_features' => 'mixed', 'force_get_qid' => 'bool', 'columns' => 'bool', 'alias_keys' => 'bool', 'filename' => 'string', 'colors' => 'array<string,float[]>', 'bvl' => 'string', 'compression' => 'int', 'group_path' => 'int[]', 'group_keys' => 'string[]', 'group_level' => 'int']
$setters
Array of attributes to setter functions (for deserialization of responses)
protected
static array<string, string>
$setters
= ['models' => 'setModels', 'query' => 'setQuery', 'action_uuid' => 'setActionUuid', 'action_version' => 'setActionVersion', 'format' => 'setFormat', 'parameters' => 'setParameters', 'virtual_features' => 'setVirtualFeatures', 'force_get_qid' => 'setForceGetQid', 'columns' => 'setColumns', 'alias_keys' => 'setAliasKeys', 'filename' => 'setFilename', 'colors' => 'setColors', 'bvl' => 'setBvl', 'compression' => 'setCompression', 'group_path' => 'setGroupPath', 'group_keys' => 'setGroupKeys', 'group_level' => 'setGroupLevel']
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed> $data = null ]) : mixed
Parameters
- $data : array<string|int, mixed> = null
-
Associated array of property values initializing the model
__toString()
Gets the string presentation of the object
public
__toString() : string
Return values
stringattributeMap()
Array of attributes where the key is the local name, and the value is the original name
public
static attributeMap() : array<string, string>
Return values
array<string, string>getActionUuid()
Gets action_uuid
public
getActionUuid() : string|null
Return values
string|nullgetActionVersion()
Gets action_version
public
getActionVersion() : int|null
Return values
int|nullgetAliasKeys()
Gets alias_keys
public
getAliasKeys() : bool|null
Return values
bool|nullgetBvl()
Gets bvl
public
getBvl() : string|null
Return values
string|nullgetColors()
Gets colors
public
getColors() : array<string, array<string|int, float>>|null
Return values
array<string, array<string|int, float>>|nullgetColumns()
Gets columns
public
getColumns() : bool|null
Return values
bool|nullgetCompression()
Gets compression
public
getCompression() : int|null
Return values
int|nullgetCompressionAllowableValues()
Gets allowable values of the enum
public
static getCompressionAllowableValues() : array<string|int, string>
Return values
array<string|int, string>getFilename()
Gets filename
public
getFilename() : string|null
Return values
string|nullgetForceGetQid()
Gets force_get_qid
public
getForceGetQid() : bool|null
Return values
bool|nullgetFormat()
Gets format
public
getFormat() : string|null
Return values
string|nullgetFormatAllowableValues()
Gets allowable values of the enum
public
static getFormatAllowableValues() : array<string|int, string>
Return values
array<string|int, string>getGroupKeys()
Gets group_keys
public
getGroupKeys() : array<string|int, string>|null
Return values
array<string|int, string>|nullgetGroupLevel()
Gets group_level
public
getGroupLevel() : int|null
Return values
int|nullgetGroupPath()
Gets group_path
public
getGroupPath() : array<string|int, int>|null
Return values
array<string|int, int>|nullgetModelName()
The original name of the model.
public
getModelName() : string
Return values
stringgetModels()
Gets models
public
getModels() : array<string|int, ModelIdentifier>|null
Return values
array<string|int, ModelIdentifier>|nullgetParameters()
Gets parameters
public
getParameters() : array<string, mixed>|null
Return values
array<string, mixed>|nullgetQuery()
Gets query
public
getQuery() : string|null
Return values
string|nullgetters()
Array of attributes to getter functions (for serialization of requests)
public
static getters() : array<string, string>
Return values
array<string, string>getVirtualFeatures()
Gets virtual_features
public
getVirtualFeatures() : mixed|null
Return values
mixed|nullisNullable()
Checks if a property is nullable
public
static isNullable(string $property) : bool
Parameters
- $property : string
Return values
boolisNullableSetToNull()
Checks if a nullable property is set to null.
public
isNullableSetToNull(string $property) : bool
Parameters
- $property : string
Return values
booljsonSerialize()
Serializes the object to a value that can be serialized natively by json_encode().
public
jsonSerialize() : mixed
Tags
Attributes
- #[ReturnTypeWillChange]
Return values
mixed —Returns data which can be serialized by json_encode(), which is a value of any type other than a resource.
listInvalidProperties()
Show all the invalid properties with reasons.
public
listInvalidProperties() : array<string|int, string>
Return values
array<string|int, string> —invalid properties with reasons
offsetExists()
Returns true if offset exists. False otherwise.
public
offsetExists(int|string $offset) : bool
Parameters
- $offset : int|string
-
Offset
Return values
booloffsetGet()
Gets offset.
public
offsetGet(int|string $offset) : mixed|null
Parameters
- $offset : int|string
-
Offset
Attributes
- #[ReturnTypeWillChange]
Return values
mixed|nulloffsetSet()
Sets value based on offset.
public
offsetSet(int|string|null $offset, mixed $value) : void
Parameters
- $offset : int|string|null
-
Offset
- $value : mixed
-
Value to be set
offsetUnset()
Unsets offset.
public
offsetUnset(int|string $offset) : void
Parameters
- $offset : int|string
-
Offset
openAPIFormats()
Array of property to format mappings. Used for (de)serialization
public
static openAPIFormats() : array<string, string|null>
Return values
array<string, string|null>openAPITypes()
Array of property to type mappings. Used for (de)serialization
public
static openAPITypes() : array<string, string>
Return values
array<string, string>setActionUuid()
Sets action_uuid
public
setActionUuid(string|null $action_uuid) : $this
Parameters
- $action_uuid : string|null
-
A stored query (BQL) action to run instead of
query
Return values
$thissetActionVersion()
Sets action_version
public
setActionVersion(int|null $action_version) : $this
Parameters
- $action_version : int|null
-
The version of the stored action to run; its current version when absent
Return values
$thissetAliasKeys()
Sets alias_keys
public
setAliasKeys(bool|null $alias_keys) : $this
Parameters
- $alias_keys : bool|null
-
Format json; put values under their
ASaliases, as before 3.0: an aliased attribute, property, quantity, calculated value, relation or model field is written at a root key named after its alias, and an aliased computed column (aggregate, arithmetic, shape, ...) under its alias. By default an alias only names its column (seecolumns) and every value stays where it is without one. For clients written against the old placement; read values throughcolumnsinstead
Return values
$thissetBvl()
Sets bvl
public
setBvl(string|null $bvl) : $this
Parameters
- $bvl : string|null
-
Formats ifc and ifcxml, instead of colors; a BVL text: the export keeps the selected objects it shows (begin it with
SHOW;to keep them all) and writes the colours it gives them
Return values
$thissetColors()
Sets colors
public
setColors(array<string, array<string|int, float>>|null $colors) : $this
Parameters
- $colors : array<string, array<string|int, float>>|null
-
Formats ifc and ifcxml; the objects' colours, written as IfcStyledItems
Return values
$thissetColumns()
Sets columns
public
setColumns(bool|null $columns) : $this
Parameters
- $columns : bool|null
-
Format json; answer an object instead of the bare array of a plain query: the records under
objectsand the columns table undercolumns, one entry perGETitem with its alias, its text and where its value is in a record (QueryColumn). A compact (compression: 1) or sliced answer is an object already and always carriescolumns
Return values
$thissetCompression()
Sets compression
public
setCompression(int|null $compression) : $this
Parameters
- $compression : int|null
-
Output format of the JSON results. 0 (default): plain output, each object contains readable values such as qid and type. 1: compact output, version UUIDs and entity types are returned once in top-level vids/types arrays, and objects reference them by index (_v/_t) with _o as the object id. Only use 1 when you explicitly want the compact format, for example to reduce response size
Return values
$thissetFilename()
Sets filename
public
setFilename(string|null $filename) : $this
Parameters
- $filename : string|null
-
The file name of the Content-Disposition, for the formats csv, xlsx, ifc and ifcxml
Return values
$thissetForceGetQid()
Sets force_get_qid
public
setForceGetQid(bool|null $force_get_qid) : $this
Parameters
- $force_get_qid : bool|null
-
Format json; add the
qidof each object to its record, also when the query does notGETit
Return values
$thissetFormat()
Sets format
public
setFormat(string|null $format) : $this
Parameters
- $format : string|null
-
Absent, the Accept header decides, and json when it names none of these.
json: the records (application/json);count:{count}(application/json);qids:{qids: {version uuid: [oid]}}(application/json);csv: the records as a table (text/csv);xlsx: the same as a spreadsheet;ifc: the matching objects as IFC STEP (application/ifc);ifcxml: the same as ifcXML (application/xml). The IFC formats are a download of model content and also need the model:read scope
Return values
$thissetGroupKeys()
Sets group_keys
public
setGroupKeys(array<string|int, string>|null $group_keys) : $this
Parameters
- $group_keys : array<string|int, string>|null
-
The same slice as groupPath, addressed by value instead of by index - the
groupKeyof one group per level, as the slice records carry it. A key still names its group after the models change. Pass groupPath or groupKeys, not both
Return values
$thissetGroupLevel()
Sets group_level
public
setGroupLevel(int|null $group_level) : $this
Parameters
- $group_level : int|null
-
Optional validation aid for groupPath and groupKeys: must equal the number of their entries (the nesting level of the returned groups)
Return values
$thissetGroupPath()
Sets group_path
public
setGroupPath(array<string|int, int>|null $group_path) : $this
Parameters
- $group_path : array<string|int, int>|null
-
Slice mode for queries with a (multi-key) GROUP BY. Each entry addresses one group per nesting level, as an index into that level's groups (sorted by group key value). An empty array returns the level-0 groups. When entries remain below the addressed path, the response contains the next level's groups in a top-level "groups" array (same record shape as regular grouped results, plus "groupKey" and "groupValue" columns carrying the group's own key and display value); when the path consumes all group keys, the member objects of the addressed group are returned in "objects". Objects without a value for a level's group feature are grouped under a synthetic "[none]" group at that level, so every level fully partitions its parent. Group indices are stable for an identical model set and query. Without groupPath, a multi-key GROUP BY returns flat records, one per non-empty key combination (including [none] combinations), ordered by key 1, then key 2, etc.
Return values
$thissetModels()
Sets models
public
setModels(array<string|int, ModelIdentifier>|null $models) : $this
Parameters
- $models : array<string|int, ModelIdentifier>|null
-
Models to query, by Version or Node identifier (a Node stands for its latest Version). An empty model set validates the query instead
Return values
$thissetParameters()
Sets parameters
public
setParameters(array<string, mixed>|null $parameters) : $this
Parameters
- $parameters : array<string, mixed>|null
-
Values for the
$nameparameters of the query, by name. Every parameter of the query then needs a value. Not for formats ifc and ifcxml
Return values
$thissetQuery()
Sets query
public
setQuery(string|null $query) : $this
Parameters
- $query : string|null
-
The query, in BQL. Pass either
queryoraction_uuid
Return values
$thissetters()
Array of attributes to setter functions (for deserialization of responses)
public
static setters() : array<string, string>
Return values
array<string, string>setVirtualFeatures()
Sets virtual_features
public
setVirtualFeatures(mixed|null $virtual_features) : $this
Parameters
- $virtual_features : mixed|null
-
The virtual features to apply (formats json, count, qids, csv and xlsx):
\"enabled\"(the enabled definitions of the workspace the call works in: your default workspace, or the published workspace of a visitor),\"none\"(the default), an array of definition uuids, or an object{apply, include, exclude}
Return values
$thistoHeaderValue()
Gets a header-safe presentation of the object
public
toHeaderValue() : string
Return values
stringvalid()
Validate all the properties in the model return true if all passed
public
valid() : bool
Return values
bool —True if all properties are valid
openAPINullables()
Array of nullable properties
protected
static openAPINullables() : array<string, bool>
Return values
array<string, bool>fillIfExists()
Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this->openAPINullablesSetToNull array
private
fillIfExists(string $variableName, array<string|int, mixed> $fields, mixed $defaultValue) : void
Parameters
- $variableName : string
- $fields : array<string|int, mixed>
- $defaultValue : mixed
getOpenAPINullablesSetToNull()
Array of nullable field names deliberately set to null
private
getOpenAPINullablesSetToNull() : array<string, bool>
Return values
array<string, bool>setOpenAPINullablesSetToNull()
Setter - Array of nullable field names deliberately set to null
private
setOpenAPINullablesSetToNull(array<string, bool> $openAPINullablesSetToNull) : void
Parameters
- $openAPINullablesSetToNull : array<string, bool>