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

namespace Keyapis\Preset\V1;

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

/**
 * Задача ошибки при конфигурации устройства.
 * Очередь key.preset.configuration_fail
 *
 * Generated from protobuf message <code>keyapis.preset.v1.PresetConfigurationFailTask</code>
 */
class PresetConfigurationFailTask extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор ответа
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $request_id = '';
    /**
     * Идентификатор устройства
     *
     * Generated from protobuf field <code>int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $device_id = 0;
    /**
     * Идентификатор пресета
     *
     * Generated from protobuf field <code>int32 preset_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $preset_id = 0;
    /**
     * Текст ошибки
     *
     * Generated from protobuf field <code>string error_message = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $error_message = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $request_id
     *           Идентификатор ответа
     *     @type int $device_id
     *           Идентификатор устройства
     *     @type int $preset_id
     *           Идентификатор пресета
     *     @type string $error_message
     *           Текст ошибки
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Preset\V1\KeyapisPresetEventsV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор ответа
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * Идентификатор ответа
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_id = $var;

        return $this;
    }

    /**
     * Идентификатор устройства
     *
     * Generated from protobuf field <code>int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getDeviceId()
    {
        return $this->device_id;
    }

    /**
     * Идентификатор устройства
     *
     * Generated from protobuf field <code>int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setDeviceId($var)
    {
        GPBUtil::checkInt32($var);
        $this->device_id = $var;

        return $this;
    }

    /**
     * Идентификатор пресета
     *
     * Generated from protobuf field <code>int32 preset_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getPresetId()
    {
        return $this->preset_id;
    }

    /**
     * Идентификатор пресета
     *
     * Generated from protobuf field <code>int32 preset_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setPresetId($var)
    {
        GPBUtil::checkInt32($var);
        $this->preset_id = $var;

        return $this;
    }

    /**
     * Текст ошибки
     *
     * Generated from protobuf field <code>string error_message = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getErrorMessage()
    {
        return $this->error_message;
    }

    /**
     * Текст ошибки
     *
     * Generated from protobuf field <code>string error_message = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setErrorMessage($var)
    {
        GPBUtil::checkString($var, True);
        $this->error_message = $var;

        return $this;
    }

}

