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

namespace Keyapis\Device\V1\Preset;

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

/**
 * Параметры конфигурации видео
 *
 * Generated from protobuf message <code>keyapis.device.v1.Preset.VideoConfig</code>
 */
class VideoConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Тип пресета
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.VideoConfig.QualityType quality_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $quality_type = 0;
    /**
     * Пользователь
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.VideoConfig.RtspUser rtsp_user = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $rtsp_user = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $quality_type
     *           Тип пресета
     *     @type \Keyapis\Device\V1\Preset\VideoConfig\RtspUser $rtsp_user
     *           Пользователь
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceDeviceV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Тип пресета
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.VideoConfig.QualityType quality_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getQualityType()
    {
        return $this->quality_type;
    }

    /**
     * Тип пресета
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.VideoConfig.QualityType quality_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setQualityType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Device\V1\Preset\VideoConfig\QualityType::class);
        $this->quality_type = $var;

        return $this;
    }

    /**
     * Пользователь
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.VideoConfig.RtspUser rtsp_user = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Keyapis\Device\V1\Preset\VideoConfig\RtspUser|null
     */
    public function getRtspUser()
    {
        return $this->rtsp_user;
    }

    public function hasRtspUser()
    {
        return isset($this->rtsp_user);
    }

    public function clearRtspUser()
    {
        unset($this->rtsp_user);
    }

    /**
     * Пользователь
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Preset.VideoConfig.RtspUser rtsp_user = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Keyapis\Device\V1\Preset\VideoConfig\RtspUser $var
     * @return $this
     */
    public function setRtspUser($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Device\V1\Preset\VideoConfig\RtspUser::class);
        $this->rtsp_user = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(VideoConfig::class, \Keyapis\Device\V1\Preset_VideoConfig::class);

