<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/retail/v2/common.proto

namespace Google\Cloud\Retail\V2\Rule;

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

/**
 * Prevents `query_term` from being associated with specified terms during
 * search.
 * Example: Don't associate "gShoe" and "cheap".
 *
 * Generated from protobuf message <code>google.cloud.retail.v2.Rule.DoNotAssociateAction</code>
 */
class DoNotAssociateAction extends \Google\Protobuf\Internal\Message
{
    /**
     * Terms from the search query.
     * Will not consider do_not_associate_terms for search if in search query.
     * Can specify up to 100 terms.
     *
     * Generated from protobuf field <code>repeated string query_terms = 2;</code>
     */
    private $query_terms;
    /**
     * Cannot contain duplicates or the query term.
     * Can specify up to 100 terms.
     *
     * Generated from protobuf field <code>repeated string do_not_associate_terms = 3;</code>
     */
    private $do_not_associate_terms;
    /**
     * Will be [deprecated = true] post migration;
     *
     * Generated from protobuf field <code>repeated string terms = 1;</code>
     */
    private $terms;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $query_terms
     *           Terms from the search query.
     *           Will not consider do_not_associate_terms for search if in search query.
     *           Can specify up to 100 terms.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $do_not_associate_terms
     *           Cannot contain duplicates or the query term.
     *           Can specify up to 100 terms.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $terms
     *           Will be [deprecated = true] post migration;
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Retail\V2\Common::initOnce();
        parent::__construct($data);
    }

    /**
     * Terms from the search query.
     * Will not consider do_not_associate_terms for search if in search query.
     * Can specify up to 100 terms.
     *
     * Generated from protobuf field <code>repeated string query_terms = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getQueryTerms()
    {
        return $this->query_terms;
    }

    /**
     * Terms from the search query.
     * Will not consider do_not_associate_terms for search if in search query.
     * Can specify up to 100 terms.
     *
     * Generated from protobuf field <code>repeated string query_terms = 2;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setQueryTerms($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->query_terms = $arr;

        return $this;
    }

    /**
     * Cannot contain duplicates or the query term.
     * Can specify up to 100 terms.
     *
     * Generated from protobuf field <code>repeated string do_not_associate_terms = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDoNotAssociateTerms()
    {
        return $this->do_not_associate_terms;
    }

    /**
     * Cannot contain duplicates or the query term.
     * Can specify up to 100 terms.
     *
     * Generated from protobuf field <code>repeated string do_not_associate_terms = 3;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDoNotAssociateTerms($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->do_not_associate_terms = $arr;

        return $this;
    }

    /**
     * Will be [deprecated = true] post migration;
     *
     * Generated from protobuf field <code>repeated string terms = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTerms()
    {
        return $this->terms;
    }

    /**
     * Will be [deprecated = true] post migration;
     *
     * Generated from protobuf field <code>repeated string terms = 1;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTerms($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->terms = $arr;

        return $this;
    }

}


