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

namespace Keyapis\Device\V1\DeleteTrunkConfigResponse;

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

/**
 * Ошибка запроса восстановления Trunk-конфигурации
 *
 * Generated from protobuf message <code>keyapis.device.v1.DeleteTrunkConfigResponse.Error</code>
 */
class Error extends \Google\Protobuf\Internal\Message
{
    protected $reason;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Keyapis\Device\V1\ValidationError $validation
     *           Ошибка валидации
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceTrunkConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * Ошибка валидации
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ValidationError validation = 1;</code>
     * @return \Keyapis\Device\V1\ValidationError|null
     */
    public function getValidation()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Ошибка валидации
     *
     * Generated from protobuf field <code>.keyapis.device.v1.ValidationError validation = 1;</code>
     * @param \Keyapis\Device\V1\ValidationError $var
     * @return $this
     */
    public function setValidation($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\ValidationError::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(Error::class, \Keyapis\Device\V1\DeleteTrunkConfigResponse_Error::class);

