<?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.play_start
 *
 * Generated from protobuf message <code>keyapis.device.v1.PlayStartTask</code>
 */
class PlayStartTask extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор запроса.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $request_id = '';
    /**
     * Идентификатор устройства
     *
     * Generated from protobuf field <code>int32 device_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $device_id = 0;
    /**
     * Ссылка на звуковой файл для проигрывания.
     * Файл должен лежать на внутреннем хранилище.
     * # Диапазон: 7..100
     *
     * Generated from protobuf field <code>string sound_file_uri = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $sound_file_uri = '';
    /**
     * Сетевой адрес.
     * # Паттерн: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
     *
     * Generated from protobuf field <code>string ip_address = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $ip_address = '';
    /**
     * Сетевой порт.
     * # Диапазон: 0..65535
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value port = 5;</code>
     */
    protected $port = null;
    /**
     * Модель устройства.
     * # Диапазон: 2..100
     *
     * Generated from protobuf field <code>string model = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $model = '';
    /**
     * Длительность воспроизведения такта в секундах.
     * Такт включает в себя проигрывание файла на трубках или на динамике.
     * # Диапазон: 0..65536
     *
     * Generated from protobuf field <code>int32 tact_play_duration = 7 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $tact_play_duration = 0;
    /**
     * Количество последовательных повторов тактов перед сменой динамика на трубки или наоборот.
     * # Диапазон: 0..65536
     *
     * Generated from protobuf field <code>int32 tact_repeat_count = 8 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $tact_repeat_count = 0;
    /**
     * Количество повторов заданного количества тактов, где умолчание=0 - это один повтор.
     * # Диапазон: 0..65536
     *
     * Generated from protobuf field <code>int32 play_repeat_count = 9 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $play_repeat_count = 0;
    /**
     * Тип проигрывания
     *
     * Generated from protobuf field <code>.keyapis.device.v1.PlayStartTask.PlayType play_type = 10 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $play_type = 0;
    /**
     * Логин.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue login = 11;</code>
     */
    protected $login = null;
    /**
     * Пароль.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue password = 12;</code>
     */
    protected $password = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $request_id
     *           Идентификатор запроса.
     *           # Тип: Guid
     *     @type int $device_id
     *           Идентификатор устройства
     *     @type string $sound_file_uri
     *           Ссылка на звуковой файл для проигрывания.
     *           Файл должен лежать на внутреннем хранилище.
     *           # Диапазон: 7..100
     *     @type string $ip_address
     *           Сетевой адрес.
     *           # Паттерн: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
     *     @type \Google\Protobuf\Int32Value $port
     *           Сетевой порт.
     *           # Диапазон: 0..65535
     *     @type string $model
     *           Модель устройства.
     *           # Диапазон: 2..100
     *     @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
     *           Тип проигрывания
     *     @type \Google\Protobuf\StringValue $login
     *           Логин.
     *           # Диапазон: 0..100
     *     @type \Google\Protobuf\StringValue $password
     *           Пароль.
     *           # Диапазон: 0..100
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceEventAlertV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор запроса.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string request_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * Идентификатор запроса.
     * # Тип: Guid
     *
     * 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;
    }

    /**
     * Идентификатор устройства
     *
     * 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;
    }

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

    /**
     * Ссылка на звуковой файл для проигрывания.
     * Файл должен лежать на внутреннем хранилище.
     * # Диапазон: 7..100
     *
     * Generated from protobuf field <code>string sound_file_uri = 3 [(.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;
    }

    /**
     * Сетевой адрес.
     * # Паттерн: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
     *
     * Generated from protobuf field <code>string ip_address = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getIpAddress()
    {
        return $this->ip_address;
    }

    /**
     * Сетевой адрес.
     * # Паттерн: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
     *
     * Generated from protobuf field <code>string ip_address = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setIpAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->ip_address = $var;

        return $this;
    }

    /**
     * Сетевой порт.
     * # Диапазон: 0..65535
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value port = 5;</code>
     * @return \Google\Protobuf\Int32Value|null
     */
    public function getPort()
    {
        return $this->port;
    }

    public function hasPort()
    {
        return isset($this->port);
    }

    public function clearPort()
    {
        unset($this->port);
    }

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

     * Сетевой порт.
     * # Диапазон: 0..65535
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value port = 5;</code>
     * @return int|null
     */
    public function getPortUnwrapped()
    {
        return $this->readWrapperValue("port");
    }

    /**
     * Сетевой порт.
     * # Диапазон: 0..65535
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value port = 5;</code>
     * @param \Google\Protobuf\Int32Value $var
     * @return $this
     */
    public function setPort($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class);
        $this->port = $var;

        return $this;
    }

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

     * Сетевой порт.
     * # Диапазон: 0..65535
     *
     * Generated from protobuf field <code>.google.protobuf.Int32Value port = 5;</code>
     * @param int|null $var
     * @return $this
     */
    public function setPortUnwrapped($var)
    {
        $this->writeWrapperValue("port", $var);
        return $this;}

    /**
     * Модель устройства.
     * # Диапазон: 2..100
     *
     * Generated from protobuf field <code>string model = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getModel()
    {
        return $this->model;
    }

    /**
     * Модель устройства.
     * # Диапазон: 2..100
     *
     * Generated from protobuf field <code>string model = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setModel($var)
    {
        GPBUtil::checkString($var, True);
        $this->model = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Логин.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue login = 11;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getLogin()
    {
        return $this->login;
    }

    public function hasLogin()
    {
        return isset($this->login);
    }

    public function clearLogin()
    {
        unset($this->login);
    }

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

     * Логин.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue login = 11;</code>
     * @return string|null
     */
    public function getLoginUnwrapped()
    {
        return $this->readWrapperValue("login");
    }

    /**
     * Логин.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue login = 11;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setLogin($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->login = $var;

        return $this;
    }

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

     * Логин.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue login = 11;</code>
     * @param string|null $var
     * @return $this
     */
    public function setLoginUnwrapped($var)
    {
        $this->writeWrapperValue("login", $var);
        return $this;}

    /**
     * Пароль.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue password = 12;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getPassword()
    {
        return $this->password;
    }

    public function hasPassword()
    {
        return isset($this->password);
    }

    public function clearPassword()
    {
        unset($this->password);
    }

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

     * Пароль.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue password = 12;</code>
     * @return string|null
     */
    public function getPasswordUnwrapped()
    {
        return $this->readWrapperValue("password");
    }

    /**
     * Пароль.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue password = 12;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setPassword($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->password = $var;

        return $this;
    }

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

     * Пароль.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue password = 12;</code>
     * @param string|null $var
     * @return $this
     */
    public function setPasswordUnwrapped($var)
    {
        $this->writeWrapperValue("password", $var);
        return $this;}

}

