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

namespace Keyapis\EncryptionProfile\V1\DeleteEncryptionProfileResponse;

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

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

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Keyapis\EncryptionProfile\V1\DeleteEncryptionProfileResponse\Error\LinkedDevicesExists $linked_devices_exists
     *           Существуют устройства, связанные с этим профилем шифрования
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\EncryptionProfile\V1\KeyapisEncryptionProfileEncryptionProfileV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Существуют устройства, связанные с этим профилем шифрования
     *
     * Generated from protobuf field <code>.keyapis.encryption_profile.v1.DeleteEncryptionProfileResponse.Error.LinkedDevicesExists linked_devices_exists = 1;</code>
     * @return \Keyapis\EncryptionProfile\V1\DeleteEncryptionProfileResponse\Error\LinkedDevicesExists|null
     */
    public function getLinkedDevicesExists()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Существуют устройства, связанные с этим профилем шифрования
     *
     * Generated from protobuf field <code>.keyapis.encryption_profile.v1.DeleteEncryptionProfileResponse.Error.LinkedDevicesExists linked_devices_exists = 1;</code>
     * @param \Keyapis\EncryptionProfile\V1\DeleteEncryptionProfileResponse\Error\LinkedDevicesExists $var
     * @return $this
     */
    public function setLinkedDevicesExists($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\EncryptionProfile\V1\DeleteEncryptionProfileResponse\Error\LinkedDevicesExists::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\EncryptionProfile\V1\DeleteEncryptionProfileResponse_Error::class);

