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

namespace Google\Cloud\Dataplex\V1;

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

/**
 * Update GlossaryTerm Request
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.UpdateGlossaryTermRequest</code>
 */
class UpdateGlossaryTermRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The GlossaryTerm to update.
     * The GlossaryTerm's `name` field is used to identify the GlossaryTerm to
     * update. Format:
     * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.GlossaryTerm term = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $term = null;
    /**
     * Required. The list of fields to update.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $update_mask = null;

    /**
     * @param \Google\Cloud\Dataplex\V1\GlossaryTerm $term       Required. The GlossaryTerm to update.
     *                                                           The GlossaryTerm's `name` field is used to identify the GlossaryTerm to
     *                                                           update. Format:
     *                                                           projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
     * @param \Google\Protobuf\FieldMask             $updateMask Required. The list of fields to update.
     *
     * @return \Google\Cloud\Dataplex\V1\UpdateGlossaryTermRequest
     *
     * @experimental
     */
    public static function build(\Google\Cloud\Dataplex\V1\GlossaryTerm $term, \Google\Protobuf\FieldMask $updateMask): self
    {
        return (new self())
            ->setTerm($term)
            ->setUpdateMask($updateMask);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dataplex\V1\GlossaryTerm $term
     *           Required. The GlossaryTerm to update.
     *           The GlossaryTerm's `name` field is used to identify the GlossaryTerm to
     *           update. Format:
     *           projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Required. The list of fields to update.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\BusinessGlossary::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The GlossaryTerm to update.
     * The GlossaryTerm's `name` field is used to identify the GlossaryTerm to
     * update. Format:
     * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.GlossaryTerm term = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dataplex\V1\GlossaryTerm|null
     */
    public function getTerm()
    {
        return $this->term;
    }

    public function hasTerm()
    {
        return isset($this->term);
    }

    public function clearTerm()
    {
        unset($this->term);
    }

    /**
     * Required. The GlossaryTerm to update.
     * The GlossaryTerm's `name` field is used to identify the GlossaryTerm to
     * update. Format:
     * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.GlossaryTerm term = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dataplex\V1\GlossaryTerm $var
     * @return $this
     */
    public function setTerm($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\GlossaryTerm::class);
        $this->term = $var;

        return $this;
    }

    /**
     * Required. The list of fields to update.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\FieldMask|null
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

    public function hasUpdateMask()
    {
        return isset($this->update_mask);
    }

    public function clearUpdateMask()
    {
        unset($this->update_mask);
    }

    /**
     * Required. The list of fields to update.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setUpdateMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->update_mask = $var;

        return $this;
    }

}

