$present
$present : bool
Battery metadata entity
__construct(bool $present, string|null $type = null, float|null $changeThreshold = null, bool|null $conditioning = null) : mixed
Constructs Battery metadata object.
| bool | $present | Power supplied from a battery. |
| string|null | $type | Battery type identifier. |
| float|null | $changeThreshold | Voltage (in V) threshold indicating a change of battery is recommended. |
| bool|null | $conditioning | Product periodically takes action to extend lifespan of battery. |
fromApiResponseV0(array{present: bool, type: string|null, changeThreshold: float|null} $response) : \Iqrf\Repository\Entities\Metadata\Battery
Parses the provided response data into a Battery object (Version 0).
| array{present: bool, type: string|null, changeThreshold: float|null} | $response | API response body |
Thrown if required properties are missing
The parsed Battery object
fromApiResponseV1(array{present: bool, type: string|null, changeThreshold: float|null, conditioning?: bool} $response) : \Iqrf\Repository\Entities\Metadata\Battery
Parses the provided array into a Battery object (Version 1).
| array{present: bool, type: string|null, changeThreshold: float|null, conditioning?: bool} | $response | API response body |
Thrown if required properties are missing
The parsed Battery object