<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/aiplatform/v1/feature_online_store_service.proto

namespace Google\Cloud\AIPlatform\V1\NearestNeighborQuery;

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

/**
 * String filter is used to search a subset of the entities by using boolean
 * rules on string columns.
 * For example: if a query specifies string filter
 * with 'name = color, allow_tokens = {red, blue}, deny_tokens = {purple}','
 * then that query will match entities that are red or blue, but if those
 * points are also purple, then they will be excluded even if they are
 * red/blue. Only string filter is supported for now, numeric filter will be
 * supported in the near future.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.NearestNeighborQuery.StringFilter</code>
 */
class StringFilter extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Column names in BigQuery that used as filters.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $name = '';
    /**
     * Optional. The allowed tokens.
     *
     * Generated from protobuf field <code>repeated string allow_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $allow_tokens;
    /**
     * Optional. The denied tokens.
     *
     * Generated from protobuf field <code>repeated string deny_tokens = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $deny_tokens;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. Column names in BigQuery that used as filters.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $allow_tokens
     *           Optional. The allowed tokens.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $deny_tokens
     *           Optional. The denied tokens.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\FeatureOnlineStoreService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Column names in BigQuery that used as filters.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. Column names in BigQuery that used as filters.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Optional. The allowed tokens.
     *
     * Generated from protobuf field <code>repeated string allow_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getAllowTokens()
    {
        return $this->allow_tokens;
    }

    /**
     * Optional. The allowed tokens.
     *
     * Generated from protobuf field <code>repeated string allow_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setAllowTokens($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->allow_tokens = $arr;

        return $this;
    }

    /**
     * Optional. The denied tokens.
     *
     * Generated from protobuf field <code>repeated string deny_tokens = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDenyTokens()
    {
        return $this->deny_tokens;
    }

    /**
     * Optional. The denied tokens.
     *
     * Generated from protobuf field <code>repeated string deny_tokens = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDenyTokens($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->deny_tokens = $arr;

        return $this;
    }

}


