2023-02-12 18:38:13 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/** @noinspection PhpMissingFieldTypeInspection */
|
|
|
|
|
2023-02-14 17:41:38 -05:00
|
|
|
namespace TgBotLib\Objects\Telegram;
|
2023-02-12 18:38:13 -05:00
|
|
|
|
|
|
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
|
|
|
|
|
|
|
class MessageAutoDeleteTimerChanged implements ObjectTypeInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
*/
|
|
|
|
private $message_auto_delete_time;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getMessageAutoDeleteTime(): int
|
|
|
|
{
|
|
|
|
return $this->message_auto_delete_time;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns an array representation of the object.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function toArray(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'message_auto_delete_time' => $this->message_auto_delete_time,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructs the object from an array representation.
|
|
|
|
*
|
|
|
|
* @param array $data
|
|
|
|
* @return ObjectTypeInterface
|
|
|
|
*/
|
|
|
|
public static function fromArray(array $data): ObjectTypeInterface
|
|
|
|
{
|
|
|
|
$object = new self();
|
2023-02-14 17:35:16 -05:00
|
|
|
|
2023-02-12 18:38:13 -05:00
|
|
|
$object->message_auto_delete_time = $data['message_auto_delete_time'];
|
|
|
|
|
|
|
|
return $object;
|
|
|
|
}
|
|
|
|
}
|