| Total Complexity | 6 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class GetCallbackQueryAnswer extends TdFunction |
||
| 15 | { |
||
| 16 | public const TYPE_NAME = 'getCallbackQueryAnswer'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Identifier of the chat with the message. |
||
| 20 | */ |
||
| 21 | protected int $chatId; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Identifier of the message from which the query originated. |
||
| 25 | */ |
||
| 26 | protected int $messageId; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Query payload. |
||
| 30 | */ |
||
| 31 | protected CallbackQueryPayload $payload; |
||
| 32 | |||
| 33 | public function __construct(int $chatId, int $messageId, CallbackQueryPayload $payload) |
||
| 34 | { |
||
| 35 | $this->chatId = $chatId; |
||
| 36 | $this->messageId = $messageId; |
||
| 37 | $this->payload = $payload; |
||
| 38 | } |
||
| 39 | |||
| 40 | public static function fromArray(array $array): GetCallbackQueryAnswer |
||
| 41 | { |
||
| 42 | return new static( |
||
| 43 | $array['chat_id'], |
||
| 44 | $array['message_id'], |
||
| 45 | TdSchemaRegistry::fromArray($array['payload']), |
||
| 46 | ); |
||
| 47 | } |
||
| 48 | |||
| 49 | public function typeSerialize(): array |
||
| 56 | ]; |
||
| 57 | } |
||
| 58 | |||
| 59 | public function getChatId(): int |
||
| 62 | } |
||
| 63 | |||
| 64 | public function getMessageId(): int |
||
| 65 | { |
||
| 66 | return $this->messageId; |
||
| 67 | } |
||
| 68 | |||
| 69 | public function getPayload(): CallbackQueryPayload |
||
| 72 | } |
||
| 73 | } |
||
| 74 |