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

namespace Keyapis\Device\V1;

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

/**
 * Команда на подготовку и старт проигрывания файла через домофон.
 * Очередь key.device.alert.prepare_start
 *
 * Generated from protobuf message <code>keyapis.device.v1.PrepareStartTask</code>
 */
class PrepareStartTask extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор запроса
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $request_id = '';
    /**
     * Ссылка на звуковой файл для проигрывания.
     * Файл должен лежать на внутреннем хранилище.
     * # Диапазон: 2..100
     *
     * Generated from protobuf field <code>string sound_file_uri = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $sound_file_uri = '';
    /**
     * Идентификатор устройства
     *
     * Generated from protobuf field <code>int32 device_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $device_id = 0;
    /**
     * Длительность воспроизведения такта в секундах.
     * Такт включает в себя проигрывание файла на трубках или на динамике.
     * # Диапазон: 0..65536
     *
     * Generated from protobuf field <code>int32 tact_play_duration = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $tact_play_duration = 0;
    /**
     * Количество последовательных повторов тактов перед сменой динамика на трубки или наоборот.
     * # Диапазон: 0..65536
     *
     * Generated from protobuf field <code>int32 tact_repeat_count = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $tact_repeat_count = 0;
    /**
     * Количество дополнительных повторов тактов, т.е. умолчание=0 - это проигрывание одного такта.
     * # Диапазон: 0..65536
     *
     * Generated from protobuf field <code>int32 play_repeat_count = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $play_repeat_count = 0;
    /**
     * Тип проигрывания
     *
     * Generated from protobuf field <code>.keyapis.device.v1.PrepareStartTask.PlayType play_type = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $play_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $request_id
     *           Идентификатор запроса
     *     @type string $sound_file_uri
     *           Ссылка на звуковой файл для проигрывания.
     *           Файл должен лежать на внутреннем хранилище.
     *           # Диапазон: 2..100
     *     @type int $device_id
     *           Идентификатор устройства
     *     @type int $tact_play_duration
     *           Длительность воспроизведения такта в секундах.
     *           Такт включает в себя проигрывание файла на трубках или на динамике.
     *           # Диапазон: 0..65536
     *     @type int $tact_repeat_count
     *           Количество последовательных повторов тактов перед сменой динамика на трубки или наоборот.
     *           # Диапазон: 0..65536
     *     @type int $play_repeat_count
     *           Количество дополнительных повторов тактов, т.е. умолчание=0 - это проигрывание одного такта.
     *           # Диапазон: 0..65536
     *     @type int $play_type
     *           Тип проигрывания
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceEventAlertV1::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;
    }

    /**
     * Ссылка на звуковой файл для проигрывания.
     * Файл должен лежать на внутреннем хранилище.
     * # Диапазон: 2..100
     *
     * Generated from protobuf field <code>string sound_file_uri = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getSoundFileUri()
    {
        return $this->sound_file_uri;
    }

    /**
     * Ссылка на звуковой файл для проигрывания.
     * Файл должен лежать на внутреннем хранилище.
     * # Диапазон: 2..100
     *
     * Generated from protobuf field <code>string sound_file_uri = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setSoundFileUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->sound_file_uri = $var;

        return $this;
    }

    /**
     * Идентификатор устройства
     *
     * Generated from protobuf field <code>int32 device_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getDeviceId()
    {
        return $this->device_id;
    }

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

        return $this;
    }

    /**
     * Длительность воспроизведения такта в секундах.
     * Такт включает в себя проигрывание файла на трубках или на динамике.
     * # Диапазон: 0..65536
     *
     * Generated from protobuf field <code>int32 tact_play_duration = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getTactPlayDuration()
    {
        return $this->tact_play_duration;
    }

    /**
     * Длительность воспроизведения такта в секундах.
     * Такт включает в себя проигрывание файла на трубках или на динамике.
     * # Диапазон: 0..65536
     *
     * Generated from protobuf field <code>int32 tact_play_duration = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setTactPlayDuration($var)
    {
        GPBUtil::checkInt32($var);
        $this->tact_play_duration = $var;

        return $this;
    }

    /**
     * Количество последовательных повторов тактов перед сменой динамика на трубки или наоборот.
     * # Диапазон: 0..65536
     *
     * Generated from protobuf field <code>int32 tact_repeat_count = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getTactRepeatCount()
    {
        return $this->tact_repeat_count;
    }

    /**
     * Количество последовательных повторов тактов перед сменой динамика на трубки или наоборот.
     * # Диапазон: 0..65536
     *
     * Generated from protobuf field <code>int32 tact_repeat_count = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setTactRepeatCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->tact_repeat_count = $var;

        return $this;
    }

    /**
     * Количество дополнительных повторов тактов, т.е. умолчание=0 - это проигрывание одного такта.
     * # Диапазон: 0..65536
     *
     * Generated from protobuf field <code>int32 play_repeat_count = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getPlayRepeatCount()
    {
        return $this->play_repeat_count;
    }

    /**
     * Количество дополнительных повторов тактов, т.е. умолчание=0 - это проигрывание одного такта.
     * # Диапазон: 0..65536
     *
     * Generated from protobuf field <code>int32 play_repeat_count = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setPlayRepeatCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->play_repeat_count = $var;

        return $this;
    }

    /**
     * Тип проигрывания
     *
     * Generated from protobuf field <code>.keyapis.device.v1.PrepareStartTask.PlayType play_type = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getPlayType()
    {
        return $this->play_type;
    }

    /**
     * Тип проигрывания
     *
     * Generated from protobuf field <code>.keyapis.device.v1.PrepareStartTask.PlayType play_type = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setPlayType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Device\V1\PrepareStartTask\PlayType::class);
        $this->play_type = $var;

        return $this;
    }

}

