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

namespace Keyapis\TelemetryControl\V1;

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

/**
 * Запрос создания задачи с клиента на сервере
 *
 * Generated from protobuf message <code>keyapis.telemetry_control.v1.PostDeviceFullDuplexRequest</code>
 */
class PostDeviceFullDuplexRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $request_id = '';
    protected $task;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $request_id
     *           Идентификатор запроса
     *     @type \Keyapis\TelemetryControl\V1\PostDeviceFullDuplexRequest\DeviceAsyncStatus $post_device_full_duplex_device_async_status
     *           Результат обработки устройства на клиенте
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\TelemetryControl\V1\KeyapisTelemetryControlDeviceV1::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>.keyapis.telemetry_control.v1.PostDeviceFullDuplexRequest.DeviceAsyncStatus post_device_full_duplex_device_async_status = 2;</code>
     * @return \Keyapis\TelemetryControl\V1\PostDeviceFullDuplexRequest\DeviceAsyncStatus|null
     */
    public function getPostDeviceFullDuplexDeviceAsyncStatus()
    {
        return $this->readOneof(2);
    }

    public function hasPostDeviceFullDuplexDeviceAsyncStatus()
    {
        return $this->hasOneof(2);
    }

    /**
     * Результат обработки устройства на клиенте
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.PostDeviceFullDuplexRequest.DeviceAsyncStatus post_device_full_duplex_device_async_status = 2;</code>
     * @param \Keyapis\TelemetryControl\V1\PostDeviceFullDuplexRequest\DeviceAsyncStatus $var
     * @return $this
     */
    public function setPostDeviceFullDuplexDeviceAsyncStatus($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\TelemetryControl\V1\PostDeviceFullDuplexRequest\DeviceAsyncStatus::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

