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

namespace Google\Cloud\Dialogflow\Cx\V3;

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

/**
 * Intent coverage represents the percentage of all possible intents in the
 * agent that are triggered in any of a parent's test cases.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.cx.v3.IntentCoverage</code>
 */
class IntentCoverage extends \Google\Protobuf\Internal\Message
{
    /**
     * The list of Intents present in the agent
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1;</code>
     */
    private $intents;
    /**
     * The percent of intents in the agent that are covered.
     *
     * Generated from protobuf field <code>float coverage_score = 2;</code>
     */
    protected $coverage_score = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage\Intent[] $intents
     *           The list of Intents present in the agent
     *     @type float $coverage_score
     *           The percent of intents in the agent that are covered.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\TestCase::initOnce();
        parent::__construct($data);
    }

    /**
     * The list of Intents present in the agent
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1;</code>
     * @return RepeatedField<\Google\Cloud\Dialogflow\Cx\V3\IntentCoverage\Intent>
     */
    public function getIntents()
    {
        return $this->intents;
    }

    /**
     * The list of Intents present in the agent
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.cx.v3.IntentCoverage.Intent intents = 1;</code>
     * @param \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage\Intent[] $var
     * @return $this
     */
    public function setIntents($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\Cx\V3\IntentCoverage\Intent::class);
        $this->intents = $arr;

        return $this;
    }

    /**
     * The percent of intents in the agent that are covered.
     *
     * Generated from protobuf field <code>float coverage_score = 2;</code>
     * @return float
     */
    public function getCoverageScore()
    {
        return $this->coverage_score;
    }

    /**
     * The percent of intents in the agent that are covered.
     *
     * Generated from protobuf field <code>float coverage_score = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setCoverageScore($var)
    {
        GPBUtil::checkFloat($var);
        $this->coverage_score = $var;

        return $this;
    }

}

