<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/discoveryengine/v1beta/control.proto

namespace Google\Cloud\DiscoveryEngine\V1beta\Control;

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

/**
 * Creates a set of terms that will act as synonyms of one another.
 * Example: "happy" will also be considered as "glad", "glad" will also be
 * considered as "happy".
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1beta.Control.SynonymsAction</code>
 */
class SynonymsAction extends \Google\Protobuf\Internal\Message
{
    /**
     * Defines a set of synonyms.
     * Can specify up to 100 synonyms.
     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
     * thrown.
     *
     * Generated from protobuf field <code>repeated string synonyms = 1;</code>
     */
    private $synonyms;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $synonyms
     *           Defines a set of synonyms.
     *           Can specify up to 100 synonyms.
     *           Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
     *           thrown.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Control::initOnce();
        parent::__construct($data);
    }

    /**
     * Defines a set of synonyms.
     * Can specify up to 100 synonyms.
     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
     * thrown.
     *
     * Generated from protobuf field <code>repeated string synonyms = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSynonyms()
    {
        return $this->synonyms;
    }

    /**
     * Defines a set of synonyms.
     * Can specify up to 100 synonyms.
     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
     * thrown.
     *
     * Generated from protobuf field <code>repeated string synonyms = 1;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSynonyms($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->synonyms = $arr;

        return $this;
    }

}


