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

namespace Keyapis\Subscription\V1;

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

/**
 * Фильтр по технологическим планам
 *
 * Generated from protobuf message <code>keyapis.subscription.v1.PlanFilter</code>
 */
class PlanFilter extends \Google\Protobuf\Internal\Message
{
    /**
     * По тексту.
     * Если значение не передано то поиск по нему не производится.
     * # Поиск производится по полям:
     * # - Название;
     * # - Описание;
     * # - Краткое описание
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue text = 1;</code>
     */
    protected $text = null;
    /**
     * По идентификаторам регионов
     *
     * Generated from protobuf field <code>repeated int32 rf_ids = 2;</code>
     */
    private $rf_ids;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\StringValue $text
     *           По тексту.
     *           Если значение не передано то поиск по нему не производится.
     *           # Поиск производится по полям:
     *           # - Название;
     *           # - Описание;
     *           # - Краткое описание
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $rf_ids
     *           По идентификаторам регионов
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Subscription\V1\KeyapisSubscriptionPlanV1::initOnce();
        parent::__construct($data);
    }

    /**
     * По тексту.
     * Если значение не передано то поиск по нему не производится.
     * # Поиск производится по полям:
     * # - Название;
     * # - Описание;
     * # - Краткое описание
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue text = 1;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getText()
    {
        return $this->text;
    }

    public function hasText()
    {
        return isset($this->text);
    }

    public function clearText()
    {
        unset($this->text);
    }

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

     * По тексту.
     * Если значение не передано то поиск по нему не производится.
     * # Поиск производится по полям:
     * # - Название;
     * # - Описание;
     * # - Краткое описание
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue text = 1;</code>
     * @return string|null
     */
    public function getTextUnwrapped()
    {
        return $this->readWrapperValue("text");
    }

    /**
     * По тексту.
     * Если значение не передано то поиск по нему не производится.
     * # Поиск производится по полям:
     * # - Название;
     * # - Описание;
     * # - Краткое описание
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue text = 1;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setText($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->text = $var;

        return $this;
    }

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

     * По тексту.
     * Если значение не передано то поиск по нему не производится.
     * # Поиск производится по полям:
     * # - Название;
     * # - Описание;
     * # - Краткое описание
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue text = 1;</code>
     * @param string|null $var
     * @return $this
     */
    public function setTextUnwrapped($var)
    {
        $this->writeWrapperValue("text", $var);
        return $this;}

    /**
     * По идентификаторам регионов
     *
     * Generated from protobuf field <code>repeated int32 rf_ids = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRfIds()
    {
        return $this->rf_ids;
    }

    /**
     * По идентификаторам регионов
     *
     * Generated from protobuf field <code>repeated int32 rf_ids = 2;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRfIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->rf_ids = $arr;

        return $this;
    }

}

