<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/videointelligence/v1/video_intelligence.proto

namespace Google\Cloud\VideoIntelligence\V1;

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

/**
 * A generic detected attribute represented by name in string format.
 *
 * Generated from protobuf message <code>google.cloud.videointelligence.v1.DetectedAttribute</code>
 */
class DetectedAttribute extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the attribute, for example, glasses, dark_glasses, mouth_open.
     * A full list of supported type names will be provided in the document.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * Detected attribute confidence. Range [0, 1].
     *
     * Generated from protobuf field <code>float confidence = 2;</code>
     */
    private $confidence = 0.0;
    /**
     * Text value of the detection result. For example, the value for "HairColor"
     * can be "black", "blonde", etc.
     *
     * Generated from protobuf field <code>string value = 3;</code>
     */
    private $value = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The name of the attribute, for example, glasses, dark_glasses, mouth_open.
     *           A full list of supported type names will be provided in the document.
     *     @type float $confidence
     *           Detected attribute confidence. Range [0, 1].
     *     @type string $value
     *           Text value of the detection result. For example, the value for "HairColor"
     *           can be "black", "blonde", etc.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the attribute, for example, glasses, dark_glasses, mouth_open.
     * A full list of supported type names will be provided in the document.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The name of the attribute, for example, glasses, dark_glasses, mouth_open.
     * A full list of supported type names will be provided in the document.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Detected attribute confidence. Range [0, 1].
     *
     * Generated from protobuf field <code>float confidence = 2;</code>
     * @return float
     */
    public function getConfidence()
    {
        return $this->confidence;
    }

    /**
     * Detected attribute confidence. Range [0, 1].
     *
     * Generated from protobuf field <code>float confidence = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setConfidence($var)
    {
        GPBUtil::checkFloat($var);
        $this->confidence = $var;

        return $this;
    }

    /**
     * Text value of the detection result. For example, the value for "HairColor"
     * can be "black", "blonde", etc.
     *
     * Generated from protobuf field <code>string value = 3;</code>
     * @return string
     */
    public function getValue()
    {
        return $this->value;
    }

    /**
     * Text value of the detection result. For example, the value for "HairColor"
     * can be "black", "blonde", etc.
     *
     * Generated from protobuf field <code>string value = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setValue($var)
    {
        GPBUtil::checkString($var, True);
        $this->value = $var;

        return $this;
    }

}

