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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Debug information related to SearchKnowledge feature.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.SearchKnowledgeDebugInfo</code>
 */
class SearchKnowledgeDebugInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Response reason from datastore which indicates data serving status or
     * answer quality degradation.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.DatastoreResponseReason datastore_response_reason = 1;</code>
     */
    protected $datastore_response_reason = 0;
    /**
     * Configured behaviors for SearchKnowledge.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.SearchKnowledgeDebugInfo.SearchKnowledgeBehavior search_knowledge_behavior = 2;</code>
     */
    protected $search_knowledge_behavior = null;
    /**
     * Information about parameters ingested for search knowledge.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.IngestedContextReferenceDebugInfo ingested_context_reference_debug_info = 3;</code>
     */
    protected $ingested_context_reference_debug_info = null;
    /**
     * The latency of the service.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ServiceLatency service_latency = 4;</code>
     */
    protected $service_latency = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $datastore_response_reason
     *           Response reason from datastore which indicates data serving status or
     *           answer quality degradation.
     *     @type \Google\Cloud\Dialogflow\V2\SearchKnowledgeDebugInfo\SearchKnowledgeBehavior $search_knowledge_behavior
     *           Configured behaviors for SearchKnowledge.
     *     @type \Google\Cloud\Dialogflow\V2\IngestedContextReferenceDebugInfo $ingested_context_reference_debug_info
     *           Information about parameters ingested for search knowledge.
     *     @type \Google\Cloud\Dialogflow\V2\ServiceLatency $service_latency
     *           The latency of the service.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce();
        parent::__construct($data);
    }

    /**
     * Response reason from datastore which indicates data serving status or
     * answer quality degradation.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.DatastoreResponseReason datastore_response_reason = 1;</code>
     * @return int
     */
    public function getDatastoreResponseReason()
    {
        return $this->datastore_response_reason;
    }

    /**
     * Response reason from datastore which indicates data serving status or
     * answer quality degradation.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.DatastoreResponseReason datastore_response_reason = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setDatastoreResponseReason($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\DatastoreResponseReason::class);
        $this->datastore_response_reason = $var;

        return $this;
    }

    /**
     * Configured behaviors for SearchKnowledge.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.SearchKnowledgeDebugInfo.SearchKnowledgeBehavior search_knowledge_behavior = 2;</code>
     * @return \Google\Cloud\Dialogflow\V2\SearchKnowledgeDebugInfo\SearchKnowledgeBehavior|null
     */
    public function getSearchKnowledgeBehavior()
    {
        return $this->search_knowledge_behavior;
    }

    public function hasSearchKnowledgeBehavior()
    {
        return isset($this->search_knowledge_behavior);
    }

    public function clearSearchKnowledgeBehavior()
    {
        unset($this->search_knowledge_behavior);
    }

    /**
     * Configured behaviors for SearchKnowledge.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.SearchKnowledgeDebugInfo.SearchKnowledgeBehavior search_knowledge_behavior = 2;</code>
     * @param \Google\Cloud\Dialogflow\V2\SearchKnowledgeDebugInfo\SearchKnowledgeBehavior $var
     * @return $this
     */
    public function setSearchKnowledgeBehavior($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SearchKnowledgeDebugInfo\SearchKnowledgeBehavior::class);
        $this->search_knowledge_behavior = $var;

        return $this;
    }

    /**
     * Information about parameters ingested for search knowledge.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.IngestedContextReferenceDebugInfo ingested_context_reference_debug_info = 3;</code>
     * @return \Google\Cloud\Dialogflow\V2\IngestedContextReferenceDebugInfo|null
     */
    public function getIngestedContextReferenceDebugInfo()
    {
        return $this->ingested_context_reference_debug_info;
    }

    public function hasIngestedContextReferenceDebugInfo()
    {
        return isset($this->ingested_context_reference_debug_info);
    }

    public function clearIngestedContextReferenceDebugInfo()
    {
        unset($this->ingested_context_reference_debug_info);
    }

    /**
     * Information about parameters ingested for search knowledge.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.IngestedContextReferenceDebugInfo ingested_context_reference_debug_info = 3;</code>
     * @param \Google\Cloud\Dialogflow\V2\IngestedContextReferenceDebugInfo $var
     * @return $this
     */
    public function setIngestedContextReferenceDebugInfo($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\IngestedContextReferenceDebugInfo::class);
        $this->ingested_context_reference_debug_info = $var;

        return $this;
    }

    /**
     * The latency of the service.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ServiceLatency service_latency = 4;</code>
     * @return \Google\Cloud\Dialogflow\V2\ServiceLatency|null
     */
    public function getServiceLatency()
    {
        return $this->service_latency;
    }

    public function hasServiceLatency()
    {
        return isset($this->service_latency);
    }

    public function clearServiceLatency()
    {
        unset($this->service_latency);
    }

    /**
     * The latency of the service.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.ServiceLatency service_latency = 4;</code>
     * @param \Google\Cloud\Dialogflow\V2\ServiceLatency $var
     * @return $this
     */
    public function setServiceLatency($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\ServiceLatency::class);
        $this->service_latency = $var;

        return $this;
    }

}

