mirror of
https://github.com/nextcloud/server.git
synced 2026-02-15 16:59:47 -05:00
43 lines
679 B
PHP
43 lines
679 B
PHP
<?php
|
|
|
|
namespace OCP\TaskProcessing;
|
|
|
|
class ShapeEnumValue implements \JsonSerializable {
|
|
/**
|
|
* @param string $name
|
|
* @param string $value
|
|
* @since 30.0.0
|
|
*/
|
|
public function __construct(
|
|
private string $name,
|
|
private string $value,
|
|
) {
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
* @since 30.0.0
|
|
*/
|
|
public function getName(): string {
|
|
return $this->name;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
* @since 30.0.0
|
|
*/
|
|
public function getValue(): string {
|
|
return $this->value;
|
|
}
|
|
|
|
/**
|
|
* @return array{name: string, value: string}
|
|
* @since 30.0.0
|
|
*/
|
|
public function jsonSerialize(): array {
|
|
return [
|
|
'name' => $this->getName(),
|
|
'value' => $this->getValue(),
|
|
];
|
|
}
|
|
}
|