chat_id; } /** * Returns an array representation of the object * * @return array */ public function toArray(): array { return [ 'type' => $this->type->value, 'chat_id' => $this->chat_id ]; } /** * Constructs object from an array representation * * @param array $data * @return BotCommandScopeAllChatAdministrators */ public static function fromArray(array $data): BotCommandScopeAllChatAdministrators { $object = new self(); $object->type = BotCommandScopeType::ALL_CHAT_ADMINISTRATORS; $object->chat_id = $data['chat_id'] ?? null; return $object; } }