<?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\Device;

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

/**
 * Точка учета
 *
 * Generated from protobuf message <code>keyapis.telemetry_control.v1.Device.MetricPoint</code>
 */
class MetricPoint extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор
     *
     * Generated from protobuf field <code>string id = 1;</code>
     */
    protected $id = '';
    /**
     * Тип энергоресурса
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.MetricPoint.MetricType metric_type = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $metric_type = 0;
    /**
     * Номер помещения
     *
     * Generated from protobuf field <code>string room_number = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $room_number = '';
    /**
     * Лейбл помещения
     *
     * Generated from protobuf field <code>string room_label = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $room_label = '';
    /**
     * Зона
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue zone_label = 5;</code>
     */
    protected $zone_label = null;
    /**
     * Тип статуса
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.MetricPoint.StatusType status_type = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $status_type = 0;
    /**
     * Тип учёта
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.MetricPoint.AccountingType accounting_type = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $accounting_type = 0;
    /**
     * Дата создания
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $created_at = null;
    /**
     * Тип номинала первичного тока
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.MetricPoint.PrimaryCurrentType primary_current_type = 9;</code>
     */
    protected $primary_current_type = 0;
    /**
     * Тип номинала вторичной обмотки
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.SecondaryCurrentType secondary_current_type = 10;</code>
     */
    protected $secondary_current_type = 0;
    /**
     * Идентификатор объекта строительства
     *
     * Generated from protobuf field <code>int32 building_id = 11 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $building_id = 0;
    /**
     * Дата изменения
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $changed_at = null;
    /**
     * Уровень
     *
     * Generated from protobuf field <code>int32 building_level = 13;</code>
     */
    protected $building_level = 0;
    /**
     * Секция
     *
     * Generated from protobuf field <code>int32 building_section = 14;</code>
     */
    protected $building_section = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Идентификатор
     *     @type int $metric_type
     *           Тип энергоресурса
     *     @type string $room_number
     *           Номер помещения
     *     @type string $room_label
     *           Лейбл помещения
     *     @type \Google\Protobuf\StringValue $zone_label
     *           Зона
     *     @type int $status_type
     *           Тип статуса
     *     @type int $accounting_type
     *           Тип учёта
     *     @type \Google\Protobuf\Timestamp $created_at
     *           Дата создания
     *     @type int $primary_current_type
     *           Тип номинала первичного тока
     *     @type int $secondary_current_type
     *           Тип номинала вторичной обмотки
     *     @type int $building_id
     *           Идентификатор объекта строительства
     *     @type \Google\Protobuf\Timestamp $changed_at
     *           Дата изменения
     *     @type int $building_level
     *           Уровень
     *     @type int $building_section
     *           Секция
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\TelemetryControl\V1\KeyapisTelemetryControlDeviceV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Идентификатор
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * Тип энергоресурса
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.MetricPoint.MetricType metric_type = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getMetricType()
    {
        return $this->metric_type;
    }

    /**
     * Тип энергоресурса
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.MetricPoint.MetricType metric_type = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setMetricType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\TelemetryControl\V1\Device\MetricPoint\MetricType::class);
        $this->metric_type = $var;

        return $this;
    }

    /**
     * Номер помещения
     *
     * Generated from protobuf field <code>string room_number = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRoomNumber()
    {
        return $this->room_number;
    }

    /**
     * Номер помещения
     *
     * Generated from protobuf field <code>string room_number = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setRoomNumber($var)
    {
        GPBUtil::checkString($var, True);
        $this->room_number = $var;

        return $this;
    }

    /**
     * Лейбл помещения
     *
     * Generated from protobuf field <code>string room_label = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRoomLabel()
    {
        return $this->room_label;
    }

    /**
     * Лейбл помещения
     *
     * Generated from protobuf field <code>string room_label = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setRoomLabel($var)
    {
        GPBUtil::checkString($var, True);
        $this->room_label = $var;

        return $this;
    }

    /**
     * Зона
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue zone_label = 5;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getZoneLabel()
    {
        return $this->zone_label;
    }

    public function hasZoneLabel()
    {
        return isset($this->zone_label);
    }

    public function clearZoneLabel()
    {
        unset($this->zone_label);
    }

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

     * Зона
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue zone_label = 5;</code>
     * @return string|null
     */
    public function getZoneLabelUnwrapped()
    {
        return $this->readWrapperValue("zone_label");
    }

    /**
     * Зона
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue zone_label = 5;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setZoneLabel($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->zone_label = $var;

        return $this;
    }

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

     * Зона
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue zone_label = 5;</code>
     * @param string|null $var
     * @return $this
     */
    public function setZoneLabelUnwrapped($var)
    {
        $this->writeWrapperValue("zone_label", $var);
        return $this;}

    /**
     * Тип статуса
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.MetricPoint.StatusType status_type = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getStatusType()
    {
        return $this->status_type;
    }

    /**
     * Тип статуса
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.MetricPoint.StatusType status_type = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setStatusType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\TelemetryControl\V1\Device\MetricPoint\StatusType::class);
        $this->status_type = $var;

        return $this;
    }

    /**
     * Тип учёта
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.MetricPoint.AccountingType accounting_type = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getAccountingType()
    {
        return $this->accounting_type;
    }

    /**
     * Тип учёта
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.MetricPoint.AccountingType accounting_type = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setAccountingType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\TelemetryControl\V1\Device\MetricPoint\AccountingType::class);
        $this->accounting_type = $var;

        return $this;
    }

    /**
     * Дата создания
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreatedAt()
    {
        return $this->created_at;
    }

    public function hasCreatedAt()
    {
        return isset($this->created_at);
    }

    public function clearCreatedAt()
    {
        unset($this->created_at);
    }

    /**
     * Дата создания
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreatedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->created_at = $var;

        return $this;
    }

    /**
     * Тип номинала первичного тока
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.MetricPoint.PrimaryCurrentType primary_current_type = 9;</code>
     * @return int
     */
    public function getPrimaryCurrentType()
    {
        return $this->primary_current_type;
    }

    /**
     * Тип номинала первичного тока
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.MetricPoint.PrimaryCurrentType primary_current_type = 9;</code>
     * @param int $var
     * @return $this
     */
    public function setPrimaryCurrentType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\TelemetryControl\V1\Device\MetricPoint\PrimaryCurrentType::class);
        $this->primary_current_type = $var;

        return $this;
    }

    /**
     * Тип номинала вторичной обмотки
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.SecondaryCurrentType secondary_current_type = 10;</code>
     * @return int
     */
    public function getSecondaryCurrentType()
    {
        return $this->secondary_current_type;
    }

    /**
     * Тип номинала вторичной обмотки
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.Device.SecondaryCurrentType secondary_current_type = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setSecondaryCurrentType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\TelemetryControl\V1\Device\SecondaryCurrentType::class);
        $this->secondary_current_type = $var;

        return $this;
    }

    /**
     * Идентификатор объекта строительства
     *
     * Generated from protobuf field <code>int32 building_id = 11 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getBuildingId()
    {
        return $this->building_id;
    }

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

        return $this;
    }

    /**
     * Дата изменения
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getChangedAt()
    {
        return $this->changed_at;
    }

    public function hasChangedAt()
    {
        return isset($this->changed_at);
    }

    public function clearChangedAt()
    {
        unset($this->changed_at);
    }

    /**
     * Дата изменения
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setChangedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->changed_at = $var;

        return $this;
    }

    /**
     * Уровень
     *
     * Generated from protobuf field <code>int32 building_level = 13;</code>
     * @return int
     */
    public function getBuildingLevel()
    {
        return $this->building_level;
    }

    /**
     * Уровень
     *
     * Generated from protobuf field <code>int32 building_level = 13;</code>
     * @param int $var
     * @return $this
     */
    public function setBuildingLevel($var)
    {
        GPBUtil::checkInt32($var);
        $this->building_level = $var;

        return $this;
    }

    /**
     * Секция
     *
     * Generated from protobuf field <code>int32 building_section = 14;</code>
     * @return int
     */
    public function getBuildingSection()
    {
        return $this->building_section;
    }

    /**
     * Секция
     *
     * Generated from protobuf field <code>int32 building_section = 14;</code>
     * @param int $var
     * @return $this
     */
    public function setBuildingSection($var)
    {
        GPBUtil::checkInt32($var);
        $this->building_section = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MetricPoint::class, \Keyapis\TelemetryControl\V1\Device_MetricPoint::class);

