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

namespace Keyapis\TelemetryAlerting\V1;

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

/**
 * Факты сработки алерта на устройствах
 *
 * Generated from protobuf message <code>keyapis.telemetry_alerting.v1.AlertDevice</code>
 */
class AlertDevice extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор алерта
     *
     * Generated from protobuf field <code>int32 alert_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $alert_id = 0;
    /**
     * Идентификатор устройства
     *
     * Generated from protobuf field <code>int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $device_id = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $alert_id
     *           Идентификатор алерта
     *     @type int $device_id
     *           Идентификатор устройства
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\TelemetryAlerting\V1\KeyapisTelemetryAlertingTriggerV1::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Идентификатор алерта
     *
     * Generated from protobuf field <code>int32 alert_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setAlertId($var)
    {
        GPBUtil::checkInt32($var);
        $this->alert_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;
    }

}

