<?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 Glossary Request
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.UpdateGlossaryRequest</code>
 */
class UpdateGlossaryRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The Glossary to update.
     * The Glossary's `name` field is used to identify the Glossary to update.
     * Format:
     * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.Glossary glossary = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $glossary = 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;
    /**
     * Optional. Validates the request without actually updating the Glossary.
     * Default: false.
     *
     * Generated from protobuf field <code>bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $validate_only = false;

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

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

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

    public function hasGlossary()
    {
        return isset($this->glossary);
    }

    public function clearGlossary()
    {
        unset($this->glossary);
    }

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

    /**
     * Optional. Validates the request without actually updating the Glossary.
     * Default: false.
     *
     * Generated from protobuf field <code>bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getValidateOnly()
    {
        return $this->validate_only;
    }

    /**
     * Optional. Validates the request without actually updating the Glossary.
     * Default: false.
     *
     * Generated from protobuf field <code>bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setValidateOnly($var)
    {
        GPBUtil::checkBool($var);
        $this->validate_only = $var;

        return $this;
    }

}

