<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/retail/v2/catalog_service.proto

namespace Google\Cloud\Retail\V2;

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

/**
 * Request for
 * [CatalogService.UpdateAttributesConfig][google.cloud.retail.v2.CatalogService.UpdateAttributesConfig]
 * method.
 *
 * Generated from protobuf message <code>google.cloud.retail.v2.UpdateAttributesConfigRequest</code>
 */
class UpdateAttributesConfigRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The [AttributesConfig][google.cloud.retail.v2.AttributesConfig]
     * to update.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.AttributesConfig attributes_config = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $attributes_config = null;
    /**
     * Indicates which fields in the provided
     * [AttributesConfig][google.cloud.retail.v2.AttributesConfig] to update. The
     * following is the only supported field:
     * * [AttributesConfig.catalog_attributes][google.cloud.retail.v2.AttributesConfig.catalog_attributes]
     * If not set, all supported fields are updated.
     *
     * 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\Retail\V2\AttributesConfig $attributes_config
     *           Required. The [AttributesConfig][google.cloud.retail.v2.AttributesConfig]
     *           to update.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Indicates which fields in the provided
     *           [AttributesConfig][google.cloud.retail.v2.AttributesConfig] to update. The
     *           following is the only supported field:
     *           * [AttributesConfig.catalog_attributes][google.cloud.retail.v2.AttributesConfig.catalog_attributes]
     *           If not set, all supported fields are updated.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Retail\V2\CatalogService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The [AttributesConfig][google.cloud.retail.v2.AttributesConfig]
     * to update.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.AttributesConfig attributes_config = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Retail\V2\AttributesConfig|null
     */
    public function getAttributesConfig()
    {
        return $this->attributes_config;
    }

    public function hasAttributesConfig()
    {
        return isset($this->attributes_config);
    }

    public function clearAttributesConfig()
    {
        unset($this->attributes_config);
    }

    /**
     * Required. The [AttributesConfig][google.cloud.retail.v2.AttributesConfig]
     * to update.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.AttributesConfig attributes_config = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Retail\V2\AttributesConfig $var
     * @return $this
     */
    public function setAttributesConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Retail\V2\AttributesConfig::class);
        $this->attributes_config = $var;

        return $this;
    }

    /**
     * Indicates which fields in the provided
     * [AttributesConfig][google.cloud.retail.v2.AttributesConfig] to update. The
     * following is the only supported field:
     * * [AttributesConfig.catalog_attributes][google.cloud.retail.v2.AttributesConfig.catalog_attributes]
     * If not set, all supported fields are updated.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 2;</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);
    }

    /**
     * Indicates which fields in the provided
     * [AttributesConfig][google.cloud.retail.v2.AttributesConfig] to update. The
     * following is the only supported field:
     * * [AttributesConfig.catalog_attributes][google.cloud.retail.v2.AttributesConfig.catalog_attributes]
     * If not set, all supported fields are updated.
     *
     * 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;
    }

}

