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

namespace Keyapis\Banner\V1;

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

/**
 * Упрощённый фильтр по баннерам
 *
 * Generated from protobuf message <code>keyapis.banner.v1.BannerLiteFilter</code>
 */
class BannerLiteFilter extends \Google\Protobuf\Internal\Message
{
    /**
     * По типам баннеров
     *
     * Generated from protobuf field <code>repeated .keyapis.banner.v1.Banner.Type types = 1;</code>
     */
    private $types;
    /**
     * Название приложения.
     * # Диапазон: 1..19.
     * # Паттерн: /^[0-9A-Z-]{1,19}$/
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_name = 2;</code>
     */
    protected $app_name = null;
    /**
     * Тип платформы
     *
     * Generated from protobuf field <code>.keyapis.banner.v1.Banner.PlatformType platform_type = 3;</code>
     */
    protected $platform_type = 0;
    /**
     * Версия приложения.
     * # Диапазон: 1..19.
     * # Паттерн: /^[0-9A-Z-]{1,19}$/
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue version = 4;</code>
     */
    protected $version = null;
    /**
     * По тегам пользователя.
     * Тэг - максимум 5 символов, значение - максимум 19 символов, количество сегментов - максимум 10.
     * # Диапазон: 1..20.
     * # Паттерн: /^[A-Z-]{1,5}_[0-9A-Z-]{1,19}(?:\.[A-Z-]{1,5}_[0-9A-Z-]{1,19}){0,9}$/
     *
     * Generated from protobuf field <code>repeated string user_tags = 5;</code>
     */
    private $user_tags;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $types
     *           По типам баннеров
     *     @type \Google\Protobuf\StringValue $app_name
     *           Название приложения.
     *           # Диапазон: 1..19.
     *           # Паттерн: /^[0-9A-Z-]{1,19}$/
     *     @type int $platform_type
     *           Тип платформы
     *     @type \Google\Protobuf\StringValue $version
     *           Версия приложения.
     *           # Диапазон: 1..19.
     *           # Паттерн: /^[0-9A-Z-]{1,19}$/
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $user_tags
     *           По тегам пользователя.
     *           Тэг - максимум 5 символов, значение - максимум 19 символов, количество сегментов - максимум 10.
     *           # Диапазон: 1..20.
     *           # Паттерн: /^[A-Z-]{1,5}_[0-9A-Z-]{1,19}(?:\.[A-Z-]{1,5}_[0-9A-Z-]{1,19}){0,9}$/
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Banner\V1\KeyapisBannerBannerV1::initOnce();
        parent::__construct($data);
    }

    /**
     * По типам баннеров
     *
     * Generated from protobuf field <code>repeated .keyapis.banner.v1.Banner.Type types = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTypes()
    {
        return $this->types;
    }

    /**
     * По типам баннеров
     *
     * Generated from protobuf field <code>repeated .keyapis.banner.v1.Banner.Type types = 1;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTypes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Keyapis\Banner\V1\Banner\Type::class);
        $this->types = $arr;

        return $this;
    }

    /**
     * Название приложения.
     * # Диапазон: 1..19.
     * # Паттерн: /^[0-9A-Z-]{1,19}$/
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_name = 2;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getAppName()
    {
        return $this->app_name;
    }

    public function hasAppName()
    {
        return isset($this->app_name);
    }

    public function clearAppName()
    {
        unset($this->app_name);
    }

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

     * Название приложения.
     * # Диапазон: 1..19.
     * # Паттерн: /^[0-9A-Z-]{1,19}$/
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_name = 2;</code>
     * @return string|null
     */
    public function getAppNameUnwrapped()
    {
        return $this->readWrapperValue("app_name");
    }

    /**
     * Название приложения.
     * # Диапазон: 1..19.
     * # Паттерн: /^[0-9A-Z-]{1,19}$/
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_name = 2;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setAppName($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->app_name = $var;

        return $this;
    }

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

     * Название приложения.
     * # Диапазон: 1..19.
     * # Паттерн: /^[0-9A-Z-]{1,19}$/
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_name = 2;</code>
     * @param string|null $var
     * @return $this
     */
    public function setAppNameUnwrapped($var)
    {
        $this->writeWrapperValue("app_name", $var);
        return $this;}

    /**
     * Тип платформы
     *
     * Generated from protobuf field <code>.keyapis.banner.v1.Banner.PlatformType platform_type = 3;</code>
     * @return int
     */
    public function getPlatformType()
    {
        return $this->platform_type;
    }

    /**
     * Тип платформы
     *
     * Generated from protobuf field <code>.keyapis.banner.v1.Banner.PlatformType platform_type = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setPlatformType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Banner\V1\Banner\PlatformType::class);
        $this->platform_type = $var;

        return $this;
    }

    /**
     * Версия приложения.
     * # Диапазон: 1..19.
     * # Паттерн: /^[0-9A-Z-]{1,19}$/
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue version = 4;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getVersion()
    {
        return $this->version;
    }

    public function hasVersion()
    {
        return isset($this->version);
    }

    public function clearVersion()
    {
        unset($this->version);
    }

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

     * Версия приложения.
     * # Диапазон: 1..19.
     * # Паттерн: /^[0-9A-Z-]{1,19}$/
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue version = 4;</code>
     * @return string|null
     */
    public function getVersionUnwrapped()
    {
        return $this->readWrapperValue("version");
    }

    /**
     * Версия приложения.
     * # Диапазон: 1..19.
     * # Паттерн: /^[0-9A-Z-]{1,19}$/
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue version = 4;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setVersion($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->version = $var;

        return $this;
    }

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

     * Версия приложения.
     * # Диапазон: 1..19.
     * # Паттерн: /^[0-9A-Z-]{1,19}$/
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue version = 4;</code>
     * @param string|null $var
     * @return $this
     */
    public function setVersionUnwrapped($var)
    {
        $this->writeWrapperValue("version", $var);
        return $this;}

    /**
     * По тегам пользователя.
     * Тэг - максимум 5 символов, значение - максимум 19 символов, количество сегментов - максимум 10.
     * # Диапазон: 1..20.
     * # Паттерн: /^[A-Z-]{1,5}_[0-9A-Z-]{1,19}(?:\.[A-Z-]{1,5}_[0-9A-Z-]{1,19}){0,9}$/
     *
     * Generated from protobuf field <code>repeated string user_tags = 5;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getUserTags()
    {
        return $this->user_tags;
    }

    /**
     * По тегам пользователя.
     * Тэг - максимум 5 символов, значение - максимум 19 символов, количество сегментов - максимум 10.
     * # Диапазон: 1..20.
     * # Паттерн: /^[A-Z-]{1,5}_[0-9A-Z-]{1,19}(?:\.[A-Z-]{1,5}_[0-9A-Z-]{1,19}){0,9}$/
     *
     * Generated from protobuf field <code>repeated string user_tags = 5;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setUserTags($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->user_tags = $arr;

        return $this;
    }

}

