<?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;

/**
 * Note:  message 'Elements' is defined in vector.proto to utilize arena/packed allocation
 *
 * Generated from protobuf message <code>Messages.Topology</code>
 */
class Topology extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Generated from protobuf field <code>uint32 type = 2;</code>
     */
    protected $type = 0;
    /**
     * Generated from protobuf field <code>uint32 ndim = 3;</code>
     */
    protected $ndim = 0;
    /**
     * Generated from protobuf field <code>uint32 basis = 4;</code>
     */
    protected $basis = 0;
    /**
     * Generated from protobuf field <code>string filename = 5;</code>
     */
    protected $filename = '';
    /**
     * Generated from protobuf field <code>.Messages.Revision revision = 6;</code>
     */
    protected $revision = null;
    /**
     * as defined in common/space.hpp: mm=0, cm=1, m=2, km=3, in=4, ft=5, yd=6, mi=7
     *
     * Generated from protobuf field <code>string info = 7;</code>
     */
    protected $info = '';
    /**
     *reserved
     *
     * Generated from protobuf field <code>.Messages.Elements nodes = 10;</code>
     */
    protected $nodes = null;
    /**
     * Generated from protobuf field <code>.Messages.Elements edges = 11;</code>
     */
    protected $edges = null;
    /**
     * Generated from protobuf field <code>.Messages.Elements faces = 12;</code>
     */
    protected $faces = null;
    /**
     * Generated from protobuf field <code>.Messages.Elements cells = 13;</code>
     */
    protected $cells = null;
    /**
     * Generated from protobuf field <code>.Messages.Record64 data = 15;</code>
     */
    protected $data = null;
    /**
     * Generated from protobuf field <code>repeated .Messages.SparseMatrix sparse_data = 16;</code>
     */
    private $sparse_data;
    /**
     *reserved
     *
     * Generated from protobuf field <code>.Messages.GridControl grid_control = 20;</code>
     */
    protected $grid_control = null;
    /**
     * Generated from protobuf field <code>.Messages.MeshControl mesh_control = 21;</code>
     */
    protected $mesh_control = null;
    /**
     * Generated from protobuf field <code>.Messages.TreeControl tree_control = 22;</code>
     */
    protected $tree_control = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *     @type int $type
     *     @type int $ndim
     *     @type int $basis
     *     @type string $filename
     *     @type \Messages\Revision $revision
     *     @type string $info
     *           as defined in common/space.hpp: mm=0, cm=1, m=2, km=3, in=4, ft=5, yd=6, mi=7
     *     @type \Messages\Elements $nodes
     *          reserved
     *     @type \Messages\Elements $edges
     *     @type \Messages\Elements $faces
     *     @type \Messages\Elements $cells
     *     @type \Messages\Record64 $data
     *     @type \Messages\SparseMatrix[]|\Google\Protobuf\Internal\RepeatedField $sparse_data
     *     @type \Messages\GridControl $grid_control
     *          reserved
     *     @type \Messages\MeshControl $mesh_control
     *     @type \Messages\TreeControl $tree_control
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Spatial::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * 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;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string filename = 5;</code>
     * @return string
     */
    public function getFilename()
    {
        return $this->filename;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.Messages.Revision revision = 6;</code>
     * @return \Messages\Revision|null
     */
    public function getRevision()
    {
        return $this->revision;
    }

    public function hasRevision()
    {
        return isset($this->revision);
    }

    public function clearRevision()
    {
        unset($this->revision);
    }

    /**
     * Generated from protobuf field <code>.Messages.Revision revision = 6;</code>
     * @param \Messages\Revision $var
     * @return $this
     */
    public function setRevision($var)
    {
        GPBUtil::checkMessage($var, \Messages\Revision::class);
        $this->revision = $var;

        return $this;
    }

    /**
     * as defined in common/space.hpp: mm=0, cm=1, m=2, km=3, in=4, ft=5, yd=6, mi=7
     *
     * Generated from protobuf field <code>string info = 7;</code>
     * @return string
     */
    public function getInfo()
    {
        return $this->info;
    }

    /**
     * as defined in common/space.hpp: mm=0, cm=1, m=2, km=3, in=4, ft=5, yd=6, mi=7
     *
     * Generated from protobuf field <code>string info = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setInfo($var)
    {
        GPBUtil::checkString($var, True);
        $this->info = $var;

        return $this;
    }

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

    public function hasNodes()
    {
        return isset($this->nodes);
    }

    public function clearNodes()
    {
        unset($this->nodes);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.Messages.Elements edges = 11;</code>
     * @return \Messages\Elements|null
     */
    public function getEdges()
    {
        return $this->edges;
    }

    public function hasEdges()
    {
        return isset($this->edges);
    }

    public function clearEdges()
    {
        unset($this->edges);
    }

    /**
     * Generated from protobuf field <code>.Messages.Elements edges = 11;</code>
     * @param \Messages\Elements $var
     * @return $this
     */
    public function setEdges($var)
    {
        GPBUtil::checkMessage($var, \Messages\Elements::class);
        $this->edges = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.Messages.Elements faces = 12;</code>
     * @return \Messages\Elements|null
     */
    public function getFaces()
    {
        return $this->faces;
    }

    public function hasFaces()
    {
        return isset($this->faces);
    }

    public function clearFaces()
    {
        unset($this->faces);
    }

    /**
     * Generated from protobuf field <code>.Messages.Elements faces = 12;</code>
     * @param \Messages\Elements $var
     * @return $this
     */
    public function setFaces($var)
    {
        GPBUtil::checkMessage($var, \Messages\Elements::class);
        $this->faces = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.Messages.Elements cells = 13;</code>
     * @return \Messages\Elements|null
     */
    public function getCells()
    {
        return $this->cells;
    }

    public function hasCells()
    {
        return isset($this->cells);
    }

    public function clearCells()
    {
        unset($this->cells);
    }

    /**
     * Generated from protobuf field <code>.Messages.Elements cells = 13;</code>
     * @param \Messages\Elements $var
     * @return $this
     */
    public function setCells($var)
    {
        GPBUtil::checkMessage($var, \Messages\Elements::class);
        $this->cells = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.Messages.Record64 data = 15;</code>
     * @return \Messages\Record64|null
     */
    public function getData()
    {
        return $this->data;
    }

    public function hasData()
    {
        return isset($this->data);
    }

    public function clearData()
    {
        unset($this->data);
    }

    /**
     * Generated from protobuf field <code>.Messages.Record64 data = 15;</code>
     * @param \Messages\Record64 $var
     * @return $this
     */
    public function setData($var)
    {
        GPBUtil::checkMessage($var, \Messages\Record64::class);
        $this->data = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .Messages.SparseMatrix sparse_data = 16;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSparseData()
    {
        return $this->sparse_data;
    }

    /**
     * Generated from protobuf field <code>repeated .Messages.SparseMatrix sparse_data = 16;</code>
     * @param \Messages\SparseMatrix[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSparseData($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Messages\SparseMatrix::class);
        $this->sparse_data = $arr;

        return $this;
    }

    /**
     *reserved
     *
     * Generated from protobuf field <code>.Messages.GridControl grid_control = 20;</code>
     * @return \Messages\GridControl|null
     */
    public function getGridControl()
    {
        return $this->grid_control;
    }

    public function hasGridControl()
    {
        return isset($this->grid_control);
    }

    public function clearGridControl()
    {
        unset($this->grid_control);
    }

    /**
     *reserved
     *
     * Generated from protobuf field <code>.Messages.GridControl grid_control = 20;</code>
     * @param \Messages\GridControl $var
     * @return $this
     */
    public function setGridControl($var)
    {
        GPBUtil::checkMessage($var, \Messages\GridControl::class);
        $this->grid_control = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.Messages.MeshControl mesh_control = 21;</code>
     * @return \Messages\MeshControl|null
     */
    public function getMeshControl()
    {
        return $this->mesh_control;
    }

    public function hasMeshControl()
    {
        return isset($this->mesh_control);
    }

    public function clearMeshControl()
    {
        unset($this->mesh_control);
    }

    /**
     * Generated from protobuf field <code>.Messages.MeshControl mesh_control = 21;</code>
     * @param \Messages\MeshControl $var
     * @return $this
     */
    public function setMeshControl($var)
    {
        GPBUtil::checkMessage($var, \Messages\MeshControl::class);
        $this->mesh_control = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.Messages.TreeControl tree_control = 22;</code>
     * @return \Messages\TreeControl|null
     */
    public function getTreeControl()
    {
        return $this->tree_control;
    }

    public function hasTreeControl()
    {
        return isset($this->tree_control);
    }

    public function clearTreeControl()
    {
        unset($this->tree_control);
    }

    /**
     * Generated from protobuf field <code>.Messages.TreeControl tree_control = 22;</code>
     * @param \Messages\TreeControl $var
     * @return $this
     */
    public function setTreeControl($var)
    {
        GPBUtil::checkMessage($var, \Messages\TreeControl::class);
        $this->tree_control = $var;

        return $this;
    }

}

