Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
digitalascetic/google-api-client / Event / GoogleApiNotificationsEvent.php
Size: Mime:
<?php
/**
 * Created by PhpStorm.
 * User: eduarddezacastellano
 * Date: 02/10/2018
 * Time: 14:12
 */

namespace DigitalAscetic\GoogleApiClientBundle\Event;

use DigitalAscetic\GoogleApiClientBundle\Entity\IGoogleApiUser;
use Symfony\Contracts\EventDispatcher\Event;


class GoogleApiNotificationsEvent extends Event
{
    const EVENT_NAME = 'ascetic_google_api_client.event.google_notifications_event';

    const TYPE_NOTIFIED = 'notified';

    const TYPE_START = 'start';

    const TYPE_STOP = 'stop';

    const TYPE_RENEW = 'renew';

    /** @var IGoogleApiUser */
    private $googleApiUser;

    /** @var string $resourceId */
    private $resourceId;

    /** @var string $channelId */
    private $channelId;

    /** @var string $type */
    private $type;

    /** @var string $host */
    private $host;

    /**
     * GoogleApiNotificationsEvent constructor.
     * @param $type
     * @param null|IGoogleApiUser $googleUser
     * @param null|string $host
     * @param null|string $channelId
     * @param null|string $resourceId
     */
    public function __construct($type, IGoogleApiUser $googleUser = null, string $host = null, string $channelId = null, string $resourceId = null)
    {
        $this->type = $type;
        $this->googleApiUser = $googleUser;
        $this->host = $host;
        $this->channelId = $channelId;
        $this->resourceId = $resourceId;
    }

    /**
     * @return string
     */
    public function getType(): string
    {
        return $this->type;
    }

    /**
     * @return IGoogleApiUser
     */
    public function getGoogleApiUser(): IGoogleApiUser
    {
        return $this->googleApiUser;
    }

    /**
     * @param IGoogleApiUser $googleApiUser
     */
    public function setGoogleApiUser(IGoogleApiUser $googleApiUser): void
    {
        $this->googleApiUser = $googleApiUser;
    }

    /**
     * @return string
     */
    public function getResourceId(): string
    {
        return $this->resourceId;
    }

    /**
     * @param string $resourceId
     */
    public function setResourceId(string $resourceId): void
    {
        $this->resourceId = $resourceId;
    }

    /**
     * @return string
     */
    public function getChannelId(): string
    {
        return $this->channelId;
    }

    /**
     * @param string $channelId
     */
    public function setChannelId(string $channelId): void
    {
        $this->channelId = $channelId;
    }

    /**
     * @return string
     */
    public function getHost(): string
    {
        return $this->host;
    }

    /**
     * @param string $host
     */
    public function setHost(string $host): void
    {
        $this->host = $host;
    }
}