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

namespace Keyapis\Device\V1;

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

/**
 * Статус камеры.
 * # Описание модели
 *
 * Generated from protobuf message <code>keyapis.device.v1.CameraStatus</code>
 */
class CameraStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор камеры uid.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue id = 1;</code>
     */
    protected $id = null;
    /**
     * Статус камеры
     *
     * Generated from protobuf field <code>.keyapis.device.v1.CameraStatus.StatusType status_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $status_type = 0;
    /**
     * Сообщение об ошибке
     *
     * Generated from protobuf field <code>string error_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $error_message = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\StringValue $id
     *           Идентификатор камеры uid.
     *           # Тип: Guid
     *     @type int $status_type
     *           Статус камеры
     *     @type string $error_message
     *           Сообщение об ошибке
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceDeviceV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор камеры uid.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue id = 1;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getId()
    {
        return $this->id;
    }

    public function hasId()
    {
        return isset($this->id);
    }

    public function clearId()
    {
        unset($this->id);
    }

    /**
     * Returns the unboxed value from <code>getId()</code>

     * Идентификатор камеры uid.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue id = 1;</code>
     * @return string|null
     */
    public function getIdUnwrapped()
    {
        return $this->readWrapperValue("id");
    }

    /**
     * Идентификатор камеры uid.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue id = 1;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->id = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object.

     * Идентификатор камеры uid.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue id = 1;</code>
     * @param string|null $var
     * @return $this
     */
    public function setIdUnwrapped($var)
    {
        $this->writeWrapperValue("id", $var);
        return $this;}

    /**
     * Статус камеры
     *
     * Generated from protobuf field <code>.keyapis.device.v1.CameraStatus.StatusType status_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getStatusType()
    {
        return $this->status_type;
    }

    /**
     * Статус камеры
     *
     * Generated from protobuf field <code>.keyapis.device.v1.CameraStatus.StatusType status_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setStatusType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Device\V1\CameraStatus\StatusType::class);
        $this->status_type = $var;

        return $this;
    }

    /**
     * Сообщение об ошибке
     *
     * Generated from protobuf field <code>string error_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getErrorMessage()
    {
        return $this->error_message;
    }

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

        return $this;
    }

}

