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

namespace Keyapis\Multiapp\V1;

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

/**
 * Ответ на запрос получения шаблона уведомления
 *
 * Generated from protobuf message <code>keyapis.multiapp.v1.GetNotificationTemplateResponse</code>
 */
class GetNotificationTemplateResponse extends \Google\Protobuf\Internal\Message
{
    protected $type;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Keyapis\Multiapp\V1\NotificationTemplate $data
     *           Шаблон уведомления
     *     @type \Keyapis\Multiapp\V1\GetNotificationTemplateResponse\Error $error
     *           Ошибка
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Multiapp\V1\KeyapisMultiappNotificationTemplateV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Шаблон уведомления
     *
     * Generated from protobuf field <code>.keyapis.multiapp.v1.NotificationTemplate data = 1;</code>
     * @return \Keyapis\Multiapp\V1\NotificationTemplate|null
     */
    public function getData()
    {
        return $this->readOneof(1);
    }

    public function hasData()
    {
        return $this->hasOneof(1);
    }

    /**
     * Шаблон уведомления
     *
     * Generated from protobuf field <code>.keyapis.multiapp.v1.NotificationTemplate data = 1;</code>
     * @param \Keyapis\Multiapp\V1\NotificationTemplate $var
     * @return $this
     */
    public function setData($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Multiapp\V1\NotificationTemplate::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Ошибка
     *
     * Generated from protobuf field <code>.keyapis.multiapp.v1.GetNotificationTemplateResponse.Error error = 2;</code>
     * @return \Keyapis\Multiapp\V1\GetNotificationTemplateResponse\Error|null
     */
    public function getError()
    {
        return $this->readOneof(2);
    }

    public function hasError()
    {
        return $this->hasOneof(2);
    }

    /**
     * Ошибка
     *
     * Generated from protobuf field <code>.keyapis.multiapp.v1.GetNotificationTemplateResponse.Error error = 2;</code>
     * @param \Keyapis\Multiapp\V1\GetNotificationTemplateResponse\Error $var
     * @return $this
     */
    public function setError($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Multiapp\V1\GetNotificationTemplateResponse\Error::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

