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

namespace Google\Cloud\Translate\V3\GlossaryEntry;

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

/**
 * Represents a single entry for an equivalent term set glossary. This is used
 * for equivalent term sets where each term can be replaced by the other terms
 * in the set.
 *
 * Generated from protobuf message <code>google.cloud.translation.v3.GlossaryEntry.GlossaryTermsSet</code>
 */
class GlossaryTermsSet extends \Google\Protobuf\Internal\Message
{
    /**
     * Each term in the set represents a term that can be replaced by the other
     * terms.
     *
     * Generated from protobuf field <code>repeated .google.cloud.translation.v3.GlossaryTerm terms = 1;</code>
     */
    private $terms;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Translate\V3\GlossaryTerm>|\Google\Protobuf\Internal\RepeatedField $terms
     *           Each term in the set represents a term that can be replaced by the other
     *           terms.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Translate\V3\Common::initOnce();
        parent::__construct($data);
    }

    /**
     * Each term in the set represents a term that can be replaced by the other
     * terms.
     *
     * Generated from protobuf field <code>repeated .google.cloud.translation.v3.GlossaryTerm terms = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTerms()
    {
        return $this->terms;
    }

    /**
     * Each term in the set represents a term that can be replaced by the other
     * terms.
     *
     * Generated from protobuf field <code>repeated .google.cloud.translation.v3.GlossaryTerm terms = 1;</code>
     * @param array<\Google\Cloud\Translate\V3\GlossaryTerm>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTerms($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Translate\V3\GlossaryTerm::class);
        $this->terms = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GlossaryTermsSet::class, \Google\Cloud\Translate\V3\GlossaryEntry_GlossaryTermsSet::class);

