<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.Location</code>
 */
class Location extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional double degreesLatitude = 1;</code>
     */
    protected $degreesLatitude = null;
    /**
     * Generated from protobuf field <code>optional double degreesLongitude = 2;</code>
     */
    protected $degreesLongitude = null;
    /**
     * Generated from protobuf field <code>optional string name = 3;</code>
     */
    protected $name = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $degreesLatitude
     *     @type float $degreesLongitude
     *     @type string $name
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional double degreesLatitude = 1;</code>
     * @return float
     */
    public function getDegreesLatitude()
    {
        return isset($this->degreesLatitude) ? $this->degreesLatitude : 0.0;
    }

    public function hasDegreesLatitude()
    {
        return isset($this->degreesLatitude);
    }

    public function clearDegreesLatitude()
    {
        unset($this->degreesLatitude);
    }

    /**
     * Generated from protobuf field <code>optional double degreesLatitude = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setDegreesLatitude($var)
    {
        GPBUtil::checkDouble($var);
        $this->degreesLatitude = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional double degreesLongitude = 2;</code>
     * @return float
     */
    public function getDegreesLongitude()
    {
        return isset($this->degreesLongitude) ? $this->degreesLongitude : 0.0;
    }

    public function hasDegreesLongitude()
    {
        return isset($this->degreesLongitude);
    }

    public function clearDegreesLongitude()
    {
        unset($this->degreesLongitude);
    }

    /**
     * Generated from protobuf field <code>optional double degreesLongitude = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setDegreesLongitude($var)
    {
        GPBUtil::checkDouble($var);
        $this->degreesLongitude = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string name = 3;</code>
     * @return string
     */
    public function getName()
    {
        return isset($this->name) ? $this->name : '';
    }

    public function hasName()
    {
        return isset($this->name);
    }

    public function clearName()
    {
        unset($this->name);
    }

    /**
     * Generated from protobuf field <code>optional string name = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

}

