routeguide.Feature
 */
class Feature extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the feature.
     *
     * Generated from protobuf field string name = 1;
     */
    protected $name = '';
    /**
     * The point where the feature is detected.
     *
     * Generated from protobuf field .routeguide.Point location = 2;
     */
    protected $location = null;
    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The name of the feature.
     *     @type \Routeguide\Point $location
     *           The point where the feature is detected.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\RouteGuide::initOnce();
        parent::__construct($data);
    }
    /**
     * The name of the feature.
     *
     * Generated from protobuf field string name = 1;
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * The name of the feature.
     *
     * Generated from protobuf field string name = 1;
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;
        return $this;
    }
    /**
     * The point where the feature is detected.
     *
     * Generated from protobuf field .routeguide.Point location = 2;
     * @return \Routeguide\Point|null
     */
    public function getLocation()
    {
        return isset($this->location) ? $this->location : null;
    }
    public function hasLocation()
    {
        return isset($this->location);
    }
    public function clearLocation()
    {
        unset($this->location);
    }
    /**
     * The point where the feature is detected.
     *
     * Generated from protobuf field .routeguide.Point location = 2;
     * @param \Routeguide\Point $var
     * @return $this
     */
    public function setLocation($var)
    {
        GPBUtil::checkMessage($var, \Routeguide\Point::class);
        $this->location = $var;
        return $this;
    }
}