macro->getUuid()?->getString() ?? ''; } /** * Get the macro's display name. */ public function getName(): string { return $this->macro->getName(); } /** * Get the macro's color as an associative array, or null when unset. * * @return array{r: float, g: float, b: float, a: float}|null */ public function getColor(): ?array { if (!$this->macro->hasColor()) { return null; } $color = $this->macro->getColor(); return [ 'r' => $color->getRed(), 'g' => $color->getGreen(), 'b' => $color->getBlue(), 'a' => $color->getAlpha(), ]; } /** * Whether the macro is configured to fire on application startup. */ public function getTriggerOnStartup(): bool { return $this->macro->getTriggerOnStartup(); } /** * Number of action entries attached to this macro. * * Action payloads are not exposed by this wrapper; use {@see getProto()} to * inspect them via the generated protobuf classes. */ public function getActionCount(): int { return count($this->macro->getActions()); } /** * Icon enum value (see {@see \Rv\Data\MacrosDocument\Macro\ImageType}). */ public function getImageType(): int { return $this->macro->getImageType(); } /** * Get the underlying protobuf Macro message. */ public function getProto(): MacroProto { return $this->macro; } }