<?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.UpdateCompletionConfig][google.cloud.retail.v2.CatalogService.UpdateCompletionConfig]
 * method.
 *
 * Generated from protobuf message <code>google.cloud.retail.v2.UpdateCompletionConfigRequest</code>
 */
class UpdateCompletionConfigRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The [CompletionConfig][google.cloud.retail.v2.CompletionConfig]
     * to update.
     * If the caller does not have permission to update the
     * [CompletionConfig][google.cloud.retail.v2.CompletionConfig], then a
     * PERMISSION_DENIED error is returned.
     * If the [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to
     * update does not exist, a NOT_FOUND error is returned.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.CompletionConfig completion_config = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $completion_config = null;
    /**
     * Indicates which fields in the provided
     * [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update. The
     * following are the only supported fields:
     * * [CompletionConfig.matching_order][google.cloud.retail.v2.CompletionConfig.matching_order]
     * * [CompletionConfig.max_suggestions][google.cloud.retail.v2.CompletionConfig.max_suggestions]
     * * [CompletionConfig.min_prefix_length][google.cloud.retail.v2.CompletionConfig.min_prefix_length]
     * * [CompletionConfig.auto_learning][google.cloud.retail.v2.CompletionConfig.auto_learning]
     * 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\CompletionConfig $completion_config
     *           Required. The [CompletionConfig][google.cloud.retail.v2.CompletionConfig]
     *           to update.
     *           If the caller does not have permission to update the
     *           [CompletionConfig][google.cloud.retail.v2.CompletionConfig], then a
     *           PERMISSION_DENIED error is returned.
     *           If the [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to
     *           update does not exist, a NOT_FOUND error is returned.
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Indicates which fields in the provided
     *           [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update. The
     *           following are the only supported fields:
     *           * [CompletionConfig.matching_order][google.cloud.retail.v2.CompletionConfig.matching_order]
     *           * [CompletionConfig.max_suggestions][google.cloud.retail.v2.CompletionConfig.max_suggestions]
     *           * [CompletionConfig.min_prefix_length][google.cloud.retail.v2.CompletionConfig.min_prefix_length]
     *           * [CompletionConfig.auto_learning][google.cloud.retail.v2.CompletionConfig.auto_learning]
     *           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 [CompletionConfig][google.cloud.retail.v2.CompletionConfig]
     * to update.
     * If the caller does not have permission to update the
     * [CompletionConfig][google.cloud.retail.v2.CompletionConfig], then a
     * PERMISSION_DENIED error is returned.
     * If the [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to
     * update does not exist, a NOT_FOUND error is returned.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.CompletionConfig completion_config = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Retail\V2\CompletionConfig|null
     */
    public function getCompletionConfig()
    {
        return $this->completion_config;
    }

    public function hasCompletionConfig()
    {
        return isset($this->completion_config);
    }

    public function clearCompletionConfig()
    {
        unset($this->completion_config);
    }

    /**
     * Required. The [CompletionConfig][google.cloud.retail.v2.CompletionConfig]
     * to update.
     * If the caller does not have permission to update the
     * [CompletionConfig][google.cloud.retail.v2.CompletionConfig], then a
     * PERMISSION_DENIED error is returned.
     * If the [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to
     * update does not exist, a NOT_FOUND error is returned.
     *
     * Generated from protobuf field <code>.google.cloud.retail.v2.CompletionConfig completion_config = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Retail\V2\CompletionConfig $var
     * @return $this
     */
    public function setCompletionConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Retail\V2\CompletionConfig::class);
        $this->completion_config = $var;

        return $this;
    }

    /**
     * Indicates which fields in the provided
     * [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update. The
     * following are the only supported fields:
     * * [CompletionConfig.matching_order][google.cloud.retail.v2.CompletionConfig.matching_order]
     * * [CompletionConfig.max_suggestions][google.cloud.retail.v2.CompletionConfig.max_suggestions]
     * * [CompletionConfig.min_prefix_length][google.cloud.retail.v2.CompletionConfig.min_prefix_length]
     * * [CompletionConfig.auto_learning][google.cloud.retail.v2.CompletionConfig.auto_learning]
     * 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
     * [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update. The
     * following are the only supported fields:
     * * [CompletionConfig.matching_order][google.cloud.retail.v2.CompletionConfig.matching_order]
     * * [CompletionConfig.max_suggestions][google.cloud.retail.v2.CompletionConfig.max_suggestions]
     * * [CompletionConfig.min_prefix_length][google.cloud.retail.v2.CompletionConfig.min_prefix_length]
     * * [CompletionConfig.auto_learning][google.cloud.retail.v2.CompletionConfig.auto_learning]
     * 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;
    }

}

