<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: spatial.proto

namespace Messages;

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

/**
 * Generated from protobuf message <code>Messages.GridControl</code>
 */
class GridControl extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>uint32 basis = 1;</code>
     */
    protected $basis = 0;
    /**
     * Generated from protobuf field <code>repeated uint32 size = 2;</code>
     */
    private $size;
    /**
     * Generated from protobuf field <code>repeated double spacing = 3;</code>
     */
    private $spacing;
    /**
     * Generated from protobuf field <code>repeated double grading = 4;</code>
     */
    private $grading;
    /**
     * 0-7: mm, cm, m, km, in, ft, yd, mi (defined in common/space.h)       
     *
     * Generated from protobuf field <code>uint32 length_units = 8;</code>
     */
    protected $length_units = 0;
    /**
     * Generated from protobuf field <code>uint64 target_n = 9;</code>
     */
    protected $target_n = 0;
    /**
     * Generated from protobuf field <code>.Messages.Extrema bounds = 10;</code>
     */
    protected $bounds = null;
    /**
     * Generated from protobuf field <code>repeated bool symmetries = 11;</code>
     */
    private $symmetries;
    /**
     * Generated from protobuf field <code>bool interior = 12;</code>
     */
    protected $interior = false;
    /**
     * Generated from protobuf field <code>bool exterior = 13;</code>
     */
    protected $exterior = false;
    /**
     * Generated from protobuf field <code>bool shell = 14;</code>
     */
    protected $shell = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $basis
     *     @type int[]|\Google\Protobuf\Internal\RepeatedField $size
     *     @type float[]|\Google\Protobuf\Internal\RepeatedField $spacing
     *     @type float[]|\Google\Protobuf\Internal\RepeatedField $grading
     *     @type int $length_units
     *           0-7: mm, cm, m, km, in, ft, yd, mi (defined in common/space.h)       
     *     @type int|string $target_n
     *     @type \Messages\Extrema $bounds
     *     @type bool[]|\Google\Protobuf\Internal\RepeatedField $symmetries
     *     @type bool $interior
     *     @type bool $exterior
     *     @type bool $shell
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Spatial::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>uint32 basis = 1;</code>
     * @return int
     */
    public function getBasis()
    {
        return $this->basis;
    }

    /**
     * Generated from protobuf field <code>uint32 basis = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setBasis($var)
    {
        GPBUtil::checkUint32($var);
        $this->basis = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated uint32 size = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSize()
    {
        return $this->size;
    }

    /**
     * Generated from protobuf field <code>repeated uint32 size = 2;</code>
     * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSize($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32);
        $this->size = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated double spacing = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSpacing()
    {
        return $this->spacing;
    }

    /**
     * Generated from protobuf field <code>repeated double spacing = 3;</code>
     * @param float[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSpacing($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE);
        $this->spacing = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated double grading = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getGrading()
    {
        return $this->grading;
    }

    /**
     * Generated from protobuf field <code>repeated double grading = 4;</code>
     * @param float[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setGrading($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE);
        $this->grading = $arr;

        return $this;
    }

    /**
     * 0-7: mm, cm, m, km, in, ft, yd, mi (defined in common/space.h)       
     *
     * Generated from protobuf field <code>uint32 length_units = 8;</code>
     * @return int
     */
    public function getLengthUnits()
    {
        return $this->length_units;
    }

    /**
     * 0-7: mm, cm, m, km, in, ft, yd, mi (defined in common/space.h)       
     *
     * Generated from protobuf field <code>uint32 length_units = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setLengthUnits($var)
    {
        GPBUtil::checkUint32($var);
        $this->length_units = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint64 target_n = 9;</code>
     * @return int|string
     */
    public function getTargetN()
    {
        return $this->target_n;
    }

    /**
     * Generated from protobuf field <code>uint64 target_n = 9;</code>
     * @param int|string $var
     * @return $this
     */
    public function setTargetN($var)
    {
        GPBUtil::checkUint64($var);
        $this->target_n = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.Messages.Extrema bounds = 10;</code>
     * @return \Messages\Extrema|null
     */
    public function getBounds()
    {
        return $this->bounds;
    }

    public function hasBounds()
    {
        return isset($this->bounds);
    }

    public function clearBounds()
    {
        unset($this->bounds);
    }

    /**
     * Generated from protobuf field <code>.Messages.Extrema bounds = 10;</code>
     * @param \Messages\Extrema $var
     * @return $this
     */
    public function setBounds($var)
    {
        GPBUtil::checkMessage($var, \Messages\Extrema::class);
        $this->bounds = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated bool symmetries = 11;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSymmetries()
    {
        return $this->symmetries;
    }

    /**
     * Generated from protobuf field <code>repeated bool symmetries = 11;</code>
     * @param bool[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSymmetries($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BOOL);
        $this->symmetries = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool interior = 12;</code>
     * @return bool
     */
    public function getInterior()
    {
        return $this->interior;
    }

    /**
     * Generated from protobuf field <code>bool interior = 12;</code>
     * @param bool $var
     * @return $this
     */
    public function setInterior($var)
    {
        GPBUtil::checkBool($var);
        $this->interior = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool exterior = 13;</code>
     * @return bool
     */
    public function getExterior()
    {
        return $this->exterior;
    }

    /**
     * Generated from protobuf field <code>bool exterior = 13;</code>
     * @param bool $var
     * @return $this
     */
    public function setExterior($var)
    {
        GPBUtil::checkBool($var);
        $this->exterior = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool shell = 14;</code>
     * @return bool
     */
    public function getShell()
    {
        return $this->shell;
    }

    /**
     * Generated from protobuf field <code>bool shell = 14;</code>
     * @param bool $var
     * @return $this
     */
    public function setShell($var)
    {
        GPBUtil::checkBool($var);
        $this->shell = $var;

        return $this;
    }

}

