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

namespace Google\Cloud\Vision\V1;

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

/**
 * Request message for the `UpdateProduct` method.
 *
 * Generated from protobuf message <code>google.cloud.vision.v1.UpdateProductRequest</code>
 */
class UpdateProductRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The Product resource which replaces the one on the server.
     * product.name is immutable.
     *
     * Generated from protobuf field <code>.google.cloud.vision.v1.Product product = 1;</code>
     */
    private $product = null;
    /**
     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
     * to update.
     * If update_mask isn't specified, all mutable fields are to be updated.
     * Valid mask paths include `product_labels`, `display_name`, and
     * `description`.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     */
    private $update_mask = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Vision\V1\Product $product
     *           The Product resource which replaces the one on the server.
     *           product.name is immutable.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           The [FieldMask][google.protobuf.FieldMask] that specifies which fields
     *           to update.
     *           If update_mask isn't specified, all mutable fields are to be updated.
     *           Valid mask paths include `product_labels`, `display_name`, and
     *           `description`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Vision\V1\ProductSearchService::initOnce();
        parent::__construct($data);
    }

    /**
     * The Product resource which replaces the one on the server.
     * product.name is immutable.
     *
     * Generated from protobuf field <code>.google.cloud.vision.v1.Product product = 1;</code>
     * @return \Google\Cloud\Vision\V1\Product
     */
    public function getProduct()
    {
        return $this->product;
    }

    /**
     * The Product resource which replaces the one on the server.
     * product.name is immutable.
     *
     * Generated from protobuf field <code>.google.cloud.vision.v1.Product product = 1;</code>
     * @param \Google\Cloud\Vision\V1\Product $var
     * @return $this
     */
    public function setProduct($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\Product::class);
        $this->product = $var;

        return $this;
    }

    /**
     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
     * to update.
     * If update_mask isn't specified, all mutable fields are to be updated.
     * Valid mask paths include `product_labels`, `display_name`, and
     * `description`.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</code>
     * @return \Google\Protobuf\FieldMask
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

    /**
     * The [FieldMask][google.protobuf.FieldMask] that specifies which fields
     * to update.
     * If update_mask isn't specified, all mutable fields are to be updated.
     * Valid mask paths include `product_labels`, `display_name`, and
     * `description`.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</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;
    }

}

