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

namespace Google\Cloud\Dataplex\V1;

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

/**
 * Request message for updating a data product.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.UpdateDataProductRequest</code>
 */
class UpdateDataProductRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The data product to update.
     * The data product's `name` field is used to identify the data product to
     * update.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataProduct data_product = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $data_product = null;
    /**
     * Optional. The list of fields to update.
     * If this is empty or not set, then all the fields will be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $update_mask = null;
    /**
     * Optional. Validates the request without actually updating the data product.
     * 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\DataProduct $dataProduct Required. The data product to update.
     *                                                           The data product's `name` field is used to identify the data product to
     *                                                           update.
     * @param \Google\Protobuf\FieldMask            $updateMask  Optional. The list of fields to update.
     *                                                           If this is empty or not set, then all the fields will be updated.
     *
     * @return \Google\Cloud\Dataplex\V1\UpdateDataProductRequest
     *
     * @experimental
     */
    public static function build(\Google\Cloud\Dataplex\V1\DataProduct $dataProduct, \Google\Protobuf\FieldMask $updateMask): self
    {
        return (new self())
            ->setDataProduct($dataProduct)
            ->setUpdateMask($updateMask);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dataplex\V1\DataProduct $data_product
     *           Required. The data product to update.
     *           The data product's `name` field is used to identify the data product to
     *           update.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Optional. The list of fields to update.
     *           If this is empty or not set, then all the fields will be updated.
     *     @type bool $validate_only
     *           Optional. Validates the request without actually updating the data product.
     *           Default: false.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\DataProducts::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The data product to update.
     * The data product's `name` field is used to identify the data product to
     * update.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataProduct data_product = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dataplex\V1\DataProduct|null
     */
    public function getDataProduct()
    {
        return $this->data_product;
    }

    public function hasDataProduct()
    {
        return isset($this->data_product);
    }

    public function clearDataProduct()
    {
        unset($this->data_product);
    }

    /**
     * Required. The data product to update.
     * The data product's `name` field is used to identify the data product to
     * update.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.DataProduct data_product = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dataplex\V1\DataProduct $var
     * @return $this
     */
    public function setDataProduct($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataProduct::class);
        $this->data_product = $var;

        return $this;
    }

    /**
     * Optional. The list of fields to update.
     * If this is empty or not set, then all the fields will be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];</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);
    }

    /**
     * Optional. The list of fields to update.
     * If this is empty or not set, then all the fields will be updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL];</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 data product.
     * 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 data product.
     * 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;
    }

}

