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

namespace Google\Cloud\Dialogflow\V2\AgentCoachingSuggestion\DuplicateCheckResult;

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

/**
 * The duplicate suggestion details.
 * Keeping answer_record and sources together as they are identifiers for
 * duplicate suggestions.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.AgentCoachingSuggestion.DuplicateCheckResult.DuplicateSuggestion</code>
 */
class DuplicateSuggestion extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The answer record id of the past duplicate suggestion.
     *
     * Generated from protobuf field <code>string answer_record = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $answer_record = '';
    /**
     * Output only. Sources for the suggestion.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.AgentCoachingSuggestion.Sources sources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $sources = null;
    /**
     * Output only. The index of the duplicate suggestion in the past
     * suggestion list.
     *
     * Generated from protobuf field <code>int32 suggestion_index = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $suggestion_index = 0;
    /**
     * Output only. The similarity score of between the past and current
     * suggestion.
     *
     * Generated from protobuf field <code>float similarity_score = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $similarity_score = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $answer_record
     *           Output only. The answer record id of the past duplicate suggestion.
     *     @type \Google\Cloud\Dialogflow\V2\AgentCoachingSuggestion\Sources $sources
     *           Output only. Sources for the suggestion.
     *     @type int $suggestion_index
     *           Output only. The index of the duplicate suggestion in the past
     *           suggestion list.
     *     @type float $similarity_score
     *           Output only. The similarity score of between the past and current
     *           suggestion.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Generator::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The answer record id of the past duplicate suggestion.
     *
     * Generated from protobuf field <code>string answer_record = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getAnswerRecord()
    {
        return $this->answer_record;
    }

    /**
     * Output only. The answer record id of the past duplicate suggestion.
     *
     * Generated from protobuf field <code>string answer_record = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setAnswerRecord($var)
    {
        GPBUtil::checkString($var, True);
        $this->answer_record = $var;

        return $this;
    }

    /**
     * Output only. Sources for the suggestion.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.AgentCoachingSuggestion.Sources sources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Cloud\Dialogflow\V2\AgentCoachingSuggestion\Sources|null
     */
    public function getSources()
    {
        return $this->sources;
    }

    public function hasSources()
    {
        return isset($this->sources);
    }

    public function clearSources()
    {
        unset($this->sources);
    }

    /**
     * Output only. Sources for the suggestion.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.AgentCoachingSuggestion.Sources sources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dialogflow\V2\AgentCoachingSuggestion\Sources $var
     * @return $this
     */
    public function setSources($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\AgentCoachingSuggestion\Sources::class);
        $this->sources = $var;

        return $this;
    }

    /**
     * Output only. The index of the duplicate suggestion in the past
     * suggestion list.
     *
     * Generated from protobuf field <code>int32 suggestion_index = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getSuggestionIndex()
    {
        return $this->suggestion_index;
    }

    /**
     * Output only. The index of the duplicate suggestion in the past
     * suggestion list.
     *
     * Generated from protobuf field <code>int32 suggestion_index = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setSuggestionIndex($var)
    {
        GPBUtil::checkInt32($var);
        $this->suggestion_index = $var;

        return $this;
    }

    /**
     * Output only. The similarity score of between the past and current
     * suggestion.
     *
     * Generated from protobuf field <code>float similarity_score = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return float
     */
    public function getSimilarityScore()
    {
        return $this->similarity_score;
    }

    /**
     * Output only. The similarity score of between the past and current
     * suggestion.
     *
     * Generated from protobuf field <code>float similarity_score = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param float $var
     * @return $this
     */
    public function setSimilarityScore($var)
    {
        GPBUtil::checkFloat($var);
        $this->similarity_score = $var;

        return $this;
    }

}


