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

namespace Google\Cloud\Translate\V3;

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

/**
 * Request message for UpdateGlossaryEntry
 *
 * Generated from protobuf message <code>google.cloud.translation.v3.UpdateGlossaryEntryRequest</code>
 */
class UpdateGlossaryEntryRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The glossary entry to update.
     *
     * Generated from protobuf field <code>.google.cloud.translation.v3.GlossaryEntry glossary_entry = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $glossary_entry = null;

    /**
     * @param \Google\Cloud\Translate\V3\GlossaryEntry $glossaryEntry Required. The glossary entry to update.
     *
     * @return \Google\Cloud\Translate\V3\UpdateGlossaryEntryRequest
     *
     * @experimental
     */
    public static function build(\Google\Cloud\Translate\V3\GlossaryEntry $glossaryEntry): self
    {
        return (new self())
            ->setGlossaryEntry($glossaryEntry);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Translate\V3\GlossaryEntry $glossary_entry
     *           Required. The glossary entry to update.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Translate\V3\TranslationService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The glossary entry to update.
     *
     * Generated from protobuf field <code>.google.cloud.translation.v3.GlossaryEntry glossary_entry = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Translate\V3\GlossaryEntry|null
     */
    public function getGlossaryEntry()
    {
        return $this->glossary_entry;
    }

    public function hasGlossaryEntry()
    {
        return isset($this->glossary_entry);
    }

    public function clearGlossaryEntry()
    {
        unset($this->glossary_entry);
    }

    /**
     * Required. The glossary entry to update.
     *
     * Generated from protobuf field <code>.google.cloud.translation.v3.GlossaryEntry glossary_entry = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Translate\V3\GlossaryEntry $var
     * @return $this
     */
    public function setGlossaryEntry($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Translate\V3\GlossaryEntry::class);
        $this->glossary_entry = $var;

        return $this;
    }

}

