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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Config for suggestion deduping.
 * NEXT_ID: 3
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.SuggestionDedupingConfig</code>
 */
class SuggestionDedupingConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Whether to enable suggestion deduping.
     *
     * Generated from protobuf field <code>bool enable_deduping = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $enable_deduping = false;
    /**
     * Optional. The threshold for similarity between two suggestions.
     * Acceptable value is [0.0, 1.0], default to 0.8
     *
     * Generated from protobuf field <code>float similarity_threshold = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $similarity_threshold = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $enable_deduping
     *           Optional. Whether to enable suggestion deduping.
     *     @type float $similarity_threshold
     *           Optional. The threshold for similarity between two suggestions.
     *           Acceptable value is [0.0, 1.0], default to 0.8
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Generator::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Whether to enable suggestion deduping.
     *
     * Generated from protobuf field <code>bool enable_deduping = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return bool
     */
    public function getEnableDeduping()
    {
        return $this->enable_deduping;
    }

    /**
     * Optional. Whether to enable suggestion deduping.
     *
     * Generated from protobuf field <code>bool enable_deduping = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param bool $var
     * @return $this
     */
    public function setEnableDeduping($var)
    {
        GPBUtil::checkBool($var);
        $this->enable_deduping = $var;

        return $this;
    }

    /**
     * Optional. The threshold for similarity between two suggestions.
     * Acceptable value is [0.0, 1.0], default to 0.8
     *
     * Generated from protobuf field <code>float similarity_threshold = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return float
     */
    public function getSimilarityThreshold()
    {
        return $this->similarity_threshold;
    }

    /**
     * Optional. The threshold for similarity between two suggestions.
     * Acceptable value is [0.0, 1.0], default to 0.8
     *
     * Generated from protobuf field <code>float similarity_threshold = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param float $var
     * @return $this
     */
    public function setSimilarityThreshold($var)
    {
        GPBUtil::checkFloat($var);
        $this->similarity_threshold = $var;

        return $this;
    }

}

