<?php


namespace ModulesGarden\ProxmoxAddon\App\Events\Cloud;


use ModulesGarden\ProxmoxAddon\App\Models\VmModel;
use ModulesGarden\ProxmoxAddon\Core\Events\Event;

abstract class VmEvent extends Event
{

    /**
     * @var VmModel
     */
    protected $vmModel;
    /**
     * @var array
     */
    protected $config;

    public function __construct(VmModel $vm, $config=[])
    {
        $this->vmModel = $vm;
        $this->config = $config;

    }

    /**
     * @return VmModel
     */
    public function getVmModel()
    {
        return $this->vmModel;
    }

    /**
     * @param VmModel $vmModel
     */
    public function setVmModel($vmModel)
    {
        $this->vmModel = $vmModel;
    }

    /**
     * @return array
     */
    public function getConfig()
    {
        return $this->config;
    }

    /**
     * @param array $config
     * @return $this
     */
    public function setConfig($config)
    {
        $this->config = $config;
        return $this;
    }

}