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

namespace Keyapis\Multiapp\V1\NotificationTemplate;

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

/**
 * Ошибка сохранения.
 * Эти проверки выполняются при работе с базой данных и сторонними сервисами
 *
 * Generated from protobuf message <code>keyapis.multiapp.v1.NotificationTemplate.SavingError</code>
 */
class SavingError extends \Google\Protobuf\Internal\Message
{
    protected $reason;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Keyapis\Multiapp\V1\NotificationTemplate\SavingError\Conflict $conflict
     *           Конфликт версий
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Multiapp\V1\KeyapisMultiappNotificationTemplateV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Конфликт версий
     *
     * Generated from protobuf field <code>.keyapis.multiapp.v1.NotificationTemplate.SavingError.Conflict conflict = 1;</code>
     * @return \Keyapis\Multiapp\V1\NotificationTemplate\SavingError\Conflict|null
     */
    public function getConflict()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Конфликт версий
     *
     * Generated from protobuf field <code>.keyapis.multiapp.v1.NotificationTemplate.SavingError.Conflict conflict = 1;</code>
     * @param \Keyapis\Multiapp\V1\NotificationTemplate\SavingError\Conflict $var
     * @return $this
     */
    public function setConflict($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Multiapp\V1\NotificationTemplate\SavingError\Conflict::class);
        $this->writeOneof(1, $var);

        return $this;
    }

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

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SavingError::class, \Keyapis\Multiapp\V1\NotificationTemplate_SavingError::class);

