<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/event/v1/keyapis_event_events_v1.proto

namespace Keyapis\Event\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Задача создание события.
 * Очередь key.event.create
 *
 * Generated from protobuf message <code>keyapis.event.v1.CreateTask</code>
 */
class CreateTask extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $request_id = '';
    /**
     * Событие
     *
     * Generated from protobuf field <code>.keyapis.event.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $event = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $request_id
     *           Идентификатор запроса
     *     @type \Keyapis\Event\V1\Event $event
     *           Событие
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Event\V1\KeyapisEventEventsV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_id = $var;

        return $this;
    }

    /**
     * Событие
     *
     * Generated from protobuf field <code>.keyapis.event.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Keyapis\Event\V1\Event|null
     */
    public function getEvent()
    {
        return $this->event;
    }

    public function hasEvent()
    {
        return isset($this->event);
    }

    public function clearEvent()
    {
        unset($this->event);
    }

    /**
     * Событие
     *
     * Generated from protobuf field <code>.keyapis.event.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Keyapis\Event\V1\Event $var
     * @return $this
     */
    public function setEvent($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Event\V1\Event::class);
        $this->event = $var;

        return $this;
    }

}

