2023-02-12 21:49:53 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
2024-10-02 00:18:12 -04:00
|
|
|
namespace TgBotLib\Objects;
|
2023-02-12 21:49:53 -05:00
|
|
|
|
|
|
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
|
|
|
|
|
|
|
class VideoChatScheduled implements ObjectTypeInterface
|
|
|
|
{
|
2024-10-06 16:04:40 -04:00
|
|
|
private int $start_date;
|
2023-02-12 21:49:53 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator
|
|
|
|
*
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getStartDate(): int
|
|
|
|
{
|
|
|
|
return $this->start_date;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2024-10-06 16:04:40 -04:00
|
|
|
* @inheritDoc
|
2023-02-12 21:49:53 -05:00
|
|
|
*/
|
|
|
|
public function toArray(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'start_date' => $this->start_date,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2024-10-06 16:04:40 -04:00
|
|
|
* @inheritDoc
|
2023-02-12 21:49:53 -05:00
|
|
|
*/
|
2024-10-06 16:04:40 -04:00
|
|
|
public static function fromArray(?array $data): ?VideoChatScheduled
|
2023-02-12 21:49:53 -05:00
|
|
|
{
|
2024-10-06 16:04:40 -04:00
|
|
|
if($data === null)
|
|
|
|
{
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2023-02-12 21:49:53 -05:00
|
|
|
$object = new self();
|
|
|
|
$object->start_date = $data['start_date'];
|
2024-10-06 16:04:40 -04:00
|
|
|
|
2023-02-12 21:49:53 -05:00
|
|
|
return $object;
|
|
|
|
}
|
|
|
|
}
|