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

namespace Keyapis\Device\V1\GetTrunkConfigCountResponse;

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

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

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

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

    public function hasValidationError()
    {
        return isset($this->validation_error);
    }

    public function clearValidationError()
    {
        unset($this->validation_error);
    }

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

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Error::class, \Keyapis\Device\V1\GetTrunkConfigCountResponse_Error::class);

