<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/telemetry_control/v1/keyapis_telemetry_control_template_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.TemplateIndicator</code>
 */
class TemplateIndicator extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     */
    protected $id = 0;
    /**
     * Дата создания
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $created_at = null;
    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $changed_at = null;
    /**
     * Шаблонное название индикатора
     *
     * Generated from protobuf field <code>string title = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $title = '';
    /**
     * Тип единицы измерения, в которой интерпретировано, получаемое измерение
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.UnitType unit_type = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $unit_type = 0;
    /**
     * Тип измерения
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.SignType sign_type = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $sign_type = 0;
    /**
     * Тип архивности показаний
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.ArchiveType archive_type = 7;</code>
     */
    protected $archive_type = 0;
    /**
     * Тип единицы измерения для отображения измерения.
     * При UNIT_TYPE_UNKNOWN отображаемые единицы совпадают с единицами источников значений, преобразования единиц не происходит.
     * Применяется после коэффициента
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.UnitType presentation_unit_type = 8;</code>
     */
    protected $presentation_unit_type = 0;
    /**
     * Код для совместимости с поставщиком метрик
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue compatibility_code = 9;</code>
     */
    protected $compatibility_code = null;
    /**
     * Флаг видимости индикатора для клиента ФЛ
     *
     * Generated from protobuf field <code>bool is_individual = 10;</code>
     */
    protected $is_individual = false;
    /**
     * Коэффициент, на который умножается отображаемое значение.
     * Применяется перед преобразованием единиц измерений к presentation_unit_type и после применения поправки
     *
     * Generated from protobuf field <code>.google.protobuf.FloatValue coefficient = 11;</code>
     */
    protected $coefficient = null;
    /**
     * Величина поправки к отображаемому значению.
     * Применяется перед применением коэффициента
     *
     * Generated from protobuf field <code>.google.protobuf.FloatValue shift = 12;</code>
     */
    protected $shift = null;
    /**
     * Количество возвращаемых десятичных знаков при округлении итогового значения.
     * При пустом параметре округления не происходит.
     * Применяется после преобразования единиц измерения
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value round_decimal_digits = 13;</code>
     */
    protected $round_decimal_digits = null;
    /**
     * Ожидаемая частота поступления показаний в днях
     *
     * Generated from protobuf field <code>int32 metric_expected_freq = 14;</code>
     */
    protected $metric_expected_freq = 0;
    /**
     * Посредник получения показаний
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.VendorType indicator_vendor_type = 15;</code>
     */
    protected $indicator_vendor_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $id
     *           Идентификатор
     *     @type \Google\Protobuf\Timestamp $created_at
     *           Дата создания
     *     @type \Google\Protobuf\Timestamp $changed_at
     *           Дата последнего изменения.
     *           Заполняется и обновляется сервером.
     *           Заполняется при создании и изменении
     *     @type string $title
     *           Шаблонное название индикатора
     *     @type int $unit_type
     *           Тип единицы измерения, в которой интерпретировано, получаемое измерение
     *     @type int $sign_type
     *           Тип измерения
     *     @type int $archive_type
     *           Тип архивности показаний
     *     @type int $presentation_unit_type
     *           Тип единицы измерения для отображения измерения.
     *           При UNIT_TYPE_UNKNOWN отображаемые единицы совпадают с единицами источников значений, преобразования единиц не происходит.
     *           Применяется после коэффициента
     *     @type \Google\Protobuf\StringValue $compatibility_code
     *           Код для совместимости с поставщиком метрик
     *     @type bool $is_individual
     *           Флаг видимости индикатора для клиента ФЛ
     *     @type \Google\Protobuf\FloatValue $coefficient
     *           Коэффициент, на который умножается отображаемое значение.
     *           Применяется перед преобразованием единиц измерений к presentation_unit_type и после применения поправки
     *     @type \Google\Protobuf\FloatValue $shift
     *           Величина поправки к отображаемому значению.
     *           Применяется перед применением коэффициента
     *     @type \Google\Protobuf\Int32Value $round_decimal_digits
     *           Количество возвращаемых десятичных знаков при округлении итогового значения.
     *           При пустом параметре округления не происходит.
     *           Применяется после преобразования единиц измерения
     *     @type int $metric_expected_freq
     *           Ожидаемая частота поступления показаний в днях
     *     @type int $indicator_vendor_type
     *           Посредник получения показаний
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\TelemetryControl\V1\KeyapisTelemetryControlTemplateV1::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Дата создания
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 2 [(.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 = 2 [(.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>.google.protobuf.Timestamp changed_at = 3 [(.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 = 3 [(.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>string title = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Шаблонное название индикатора
     *
     * Generated from protobuf field <code>string title = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setTitle($var)
    {
        GPBUtil::checkString($var, True);
        $this->title = $var;

        return $this;
    }

    /**
     * Тип единицы измерения, в которой интерпретировано, получаемое измерение
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.UnitType unit_type = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getUnitType()
    {
        return $this->unit_type;
    }

    /**
     * Тип единицы измерения, в которой интерпретировано, получаемое измерение
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.UnitType unit_type = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setUnitType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\TelemetryControl\V1\TemplateIndicator\UnitType::class);
        $this->unit_type = $var;

        return $this;
    }

    /**
     * Тип измерения
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.SignType sign_type = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getSignType()
    {
        return $this->sign_type;
    }

    /**
     * Тип измерения
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.SignType sign_type = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setSignType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\TelemetryControl\V1\TemplateIndicator\SignType::class);
        $this->sign_type = $var;

        return $this;
    }

    /**
     * Тип архивности показаний
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.ArchiveType archive_type = 7;</code>
     * @return int
     */
    public function getArchiveType()
    {
        return $this->archive_type;
    }

    /**
     * Тип архивности показаний
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.ArchiveType archive_type = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setArchiveType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\TelemetryControl\V1\TemplateIndicator\ArchiveType::class);
        $this->archive_type = $var;

        return $this;
    }

    /**
     * Тип единицы измерения для отображения измерения.
     * При UNIT_TYPE_UNKNOWN отображаемые единицы совпадают с единицами источников значений, преобразования единиц не происходит.
     * Применяется после коэффициента
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.UnitType presentation_unit_type = 8;</code>
     * @return int
     */
    public function getPresentationUnitType()
    {
        return $this->presentation_unit_type;
    }

    /**
     * Тип единицы измерения для отображения измерения.
     * При UNIT_TYPE_UNKNOWN отображаемые единицы совпадают с единицами источников значений, преобразования единиц не происходит.
     * Применяется после коэффициента
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.UnitType presentation_unit_type = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setPresentationUnitType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\TelemetryControl\V1\TemplateIndicator\UnitType::class);
        $this->presentation_unit_type = $var;

        return $this;
    }

    /**
     * Код для совместимости с поставщиком метрик
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue compatibility_code = 9;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getCompatibilityCode()
    {
        return $this->compatibility_code;
    }

    public function hasCompatibilityCode()
    {
        return isset($this->compatibility_code);
    }

    public function clearCompatibilityCode()
    {
        unset($this->compatibility_code);
    }

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

     * Код для совместимости с поставщиком метрик
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue compatibility_code = 9;</code>
     * @return string|null
     */
    public function getCompatibilityCodeUnwrapped()
    {
        return $this->readWrapperValue("compatibility_code");
    }

    /**
     * Код для совместимости с поставщиком метрик
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue compatibility_code = 9;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setCompatibilityCode($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->compatibility_code = $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 compatibility_code = 9;</code>
     * @param string|null $var
     * @return $this
     */
    public function setCompatibilityCodeUnwrapped($var)
    {
        $this->writeWrapperValue("compatibility_code", $var);
        return $this;}

    /**
     * Флаг видимости индикатора для клиента ФЛ
     *
     * Generated from protobuf field <code>bool is_individual = 10;</code>
     * @return bool
     */
    public function getIsIndividual()
    {
        return $this->is_individual;
    }

    /**
     * Флаг видимости индикатора для клиента ФЛ
     *
     * Generated from protobuf field <code>bool is_individual = 10;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsIndividual($var)
    {
        GPBUtil::checkBool($var);
        $this->is_individual = $var;

        return $this;
    }

    /**
     * Коэффициент, на который умножается отображаемое значение.
     * Применяется перед преобразованием единиц измерений к presentation_unit_type и после применения поправки
     *
     * Generated from protobuf field <code>.google.protobuf.FloatValue coefficient = 11;</code>
     * @return \Google\Protobuf\FloatValue|null
     */
    public function getCoefficient()
    {
        return $this->coefficient;
    }

    public function hasCoefficient()
    {
        return isset($this->coefficient);
    }

    public function clearCoefficient()
    {
        unset($this->coefficient);
    }

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

     * Коэффициент, на который умножается отображаемое значение.
     * Применяется перед преобразованием единиц измерений к presentation_unit_type и после применения поправки
     *
     * Generated from protobuf field <code>.google.protobuf.FloatValue coefficient = 11;</code>
     * @return float|null
     */
    public function getCoefficientUnwrapped()
    {
        return $this->readWrapperValue("coefficient");
    }

    /**
     * Коэффициент, на который умножается отображаемое значение.
     * Применяется перед преобразованием единиц измерений к presentation_unit_type и после применения поправки
     *
     * Generated from protobuf field <code>.google.protobuf.FloatValue coefficient = 11;</code>
     * @param \Google\Protobuf\FloatValue $var
     * @return $this
     */
    public function setCoefficient($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FloatValue::class);
        $this->coefficient = $var;

        return $this;
    }

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

     * Коэффициент, на который умножается отображаемое значение.
     * Применяется перед преобразованием единиц измерений к presentation_unit_type и после применения поправки
     *
     * Generated from protobuf field <code>.google.protobuf.FloatValue coefficient = 11;</code>
     * @param float|null $var
     * @return $this
     */
    public function setCoefficientUnwrapped($var)
    {
        $this->writeWrapperValue("coefficient", $var);
        return $this;}

    /**
     * Величина поправки к отображаемому значению.
     * Применяется перед применением коэффициента
     *
     * Generated from protobuf field <code>.google.protobuf.FloatValue shift = 12;</code>
     * @return \Google\Protobuf\FloatValue|null
     */
    public function getShift()
    {
        return $this->shift;
    }

    public function hasShift()
    {
        return isset($this->shift);
    }

    public function clearShift()
    {
        unset($this->shift);
    }

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

     * Величина поправки к отображаемому значению.
     * Применяется перед применением коэффициента
     *
     * Generated from protobuf field <code>.google.protobuf.FloatValue shift = 12;</code>
     * @return float|null
     */
    public function getShiftUnwrapped()
    {
        return $this->readWrapperValue("shift");
    }

    /**
     * Величина поправки к отображаемому значению.
     * Применяется перед применением коэффициента
     *
     * Generated from protobuf field <code>.google.protobuf.FloatValue shift = 12;</code>
     * @param \Google\Protobuf\FloatValue $var
     * @return $this
     */
    public function setShift($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FloatValue::class);
        $this->shift = $var;

        return $this;
    }

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

     * Величина поправки к отображаемому значению.
     * Применяется перед применением коэффициента
     *
     * Generated from protobuf field <code>.google.protobuf.FloatValue shift = 12;</code>
     * @param float|null $var
     * @return $this
     */
    public function setShiftUnwrapped($var)
    {
        $this->writeWrapperValue("shift", $var);
        return $this;}

    /**
     * Количество возвращаемых десятичных знаков при округлении итогового значения.
     * При пустом параметре округления не происходит.
     * Применяется после преобразования единиц измерения
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value round_decimal_digits = 13;</code>
     * @return \Google\Protobuf\Int32Value|null
     */
    public function getRoundDecimalDigits()
    {
        return $this->round_decimal_digits;
    }

    public function hasRoundDecimalDigits()
    {
        return isset($this->round_decimal_digits);
    }

    public function clearRoundDecimalDigits()
    {
        unset($this->round_decimal_digits);
    }

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

     * Количество возвращаемых десятичных знаков при округлении итогового значения.
     * При пустом параметре округления не происходит.
     * Применяется после преобразования единиц измерения
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value round_decimal_digits = 13;</code>
     * @return int|null
     */
    public function getRoundDecimalDigitsUnwrapped()
    {
        return $this->readWrapperValue("round_decimal_digits");
    }

    /**
     * Количество возвращаемых десятичных знаков при округлении итогового значения.
     * При пустом параметре округления не происходит.
     * Применяется после преобразования единиц измерения
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value round_decimal_digits = 13;</code>
     * @param \Google\Protobuf\Int32Value $var
     * @return $this
     */
    public function setRoundDecimalDigits($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class);
        $this->round_decimal_digits = $var;

        return $this;
    }

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

     * Количество возвращаемых десятичных знаков при округлении итогового значения.
     * При пустом параметре округления не происходит.
     * Применяется после преобразования единиц измерения
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value round_decimal_digits = 13;</code>
     * @param int|null $var
     * @return $this
     */
    public function setRoundDecimalDigitsUnwrapped($var)
    {
        $this->writeWrapperValue("round_decimal_digits", $var);
        return $this;}

    /**
     * Ожидаемая частота поступления показаний в днях
     *
     * Generated from protobuf field <code>int32 metric_expected_freq = 14;</code>
     * @return int
     */
    public function getMetricExpectedFreq()
    {
        return $this->metric_expected_freq;
    }

    /**
     * Ожидаемая частота поступления показаний в днях
     *
     * Generated from protobuf field <code>int32 metric_expected_freq = 14;</code>
     * @param int $var
     * @return $this
     */
    public function setMetricExpectedFreq($var)
    {
        GPBUtil::checkInt32($var);
        $this->metric_expected_freq = $var;

        return $this;
    }

    /**
     * Посредник получения показаний
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.VendorType indicator_vendor_type = 15;</code>
     * @return int
     */
    public function getIndicatorVendorType()
    {
        return $this->indicator_vendor_type;
    }

    /**
     * Посредник получения показаний
     *
     * Generated from protobuf field <code>.keyapis.telemetry_control.v1.TemplateIndicator.VendorType indicator_vendor_type = 15;</code>
     * @param int $var
     * @return $this
     */
    public function setIndicatorVendorType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\TelemetryControl\V1\TemplateIndicator\VendorType::class);
        $this->indicator_vendor_type = $var;

        return $this;
    }

}

