tgbotlib/src/TgBotLib/Objects/MessageAutoDeleteTimerChanged.php

45 lines
1,010 B
PHP
Raw Normal View History

<?php
2024-10-02 00:18:12 -04:00
namespace TgBotLib\Objects;
use TgBotLib\Interfaces\ObjectTypeInterface;
class MessageAutoDeleteTimerChanged implements ObjectTypeInterface
{
2024-10-05 00:32:01 -04:00
private int $message_auto_delete_time;
/**
* @return int
*/
public function getMessageAutoDeleteTime(): int
{
return $this->message_auto_delete_time;
}
/**
2024-10-05 00:32:01 -04:00
* @inheritDoc
*/
public function toArray(): array
{
return [
'message_auto_delete_time' => $this->message_auto_delete_time,
];
}
/**
2024-10-05 00:32:01 -04:00
* @inheritDoc
*/
2024-10-05 00:32:01 -04:00
public static function fromArray(?array $data): ?MessageAutoDeleteTimerChanged
{
2024-10-05 00:32:01 -04:00
if($data === null)
{
return null;
}
2023-02-14 17:35:16 -05:00
2024-10-05 00:32:01 -04:00
$object = new self();
$object->message_auto_delete_time = $data['message_auto_delete_time'];
return $object;
}
}