<?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.Zone</code>
 */
class Zone extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Generated from protobuf field <code>int32 id = 2;</code>
     */
    protected $id = 0;
    /**
     *0:node-group, 1:edge-loop, 2:face-surface, 3:cell-volume
     *
     * Generated from protobuf field <code>uint32 dimensionality = 3;</code>
     */
    protected $dimensionality = 0;
    /**
     * Generated from protobuf field <code>.Messages.Revision revision = 4;</code>
     */
    protected $revision = null;
    /**
     *optional set of element indices (else, all by this id)
     *
     * Generated from protobuf field <code>repeated uint32 elements = 5;</code>
     */
    private $elements;
    /**
     * Generated from protobuf field <code>uint32 element_count = 6;</code>
     */
    protected $element_count = 0;
    /**
     * Generated from protobuf field <code>string comments = 7;</code>
     */
    protected $comments = '';
    /**
     * Generated from protobuf field <code>string info = 8;</code>
     */
    protected $info = '';
    /**
     * Generated from protobuf field <code>string resource_name = 9;</code>
     */
    protected $resource_name = '';
    /**
     * Generated from protobuf field <code>.Messages.Extrema bounds = 10;</code>
     */
    protected $bounds = null;
    /**
     *in symbol icon's coordinates [0,1]
     *
     * Generated from protobuf field <code>repeated float terminal_coord = 11;</code>
     */
    private $terminal_coord;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *     @type int $id
     *     @type int $dimensionality
     *          0:node-group, 1:edge-loop, 2:face-surface, 3:cell-volume
     *     @type \Messages\Revision $revision
     *     @type int[]|\Google\Protobuf\Internal\RepeatedField $elements
     *          optional set of element indices (else, all by this id)
     *     @type int $element_count
     *     @type string $comments
     *     @type string $info
     *     @type string $resource_name
     *     @type \Messages\Extrema $bounds
     *     @type float[]|\Google\Protobuf\Internal\RepeatedField $terminal_coord
     *          in symbol icon's coordinates [0,1]
     * }
     */
    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>int32 id = 2;</code>
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Generated from protobuf field <code>int32 id = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkInt32($var);
        $this->id = $var;

        return $this;
    }

    /**
     *0:node-group, 1:edge-loop, 2:face-surface, 3:cell-volume
     *
     * Generated from protobuf field <code>uint32 dimensionality = 3;</code>
     * @return int
     */
    public function getDimensionality()
    {
        return $this->dimensionality;
    }

    /**
     *0:node-group, 1:edge-loop, 2:face-surface, 3:cell-volume
     *
     * Generated from protobuf field <code>uint32 dimensionality = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setDimensionality($var)
    {
        GPBUtil::checkUint32($var);
        $this->dimensionality = $var;

        return $this;
    }

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

        return $this;
    }

    /**
     *optional set of element indices (else, all by this id)
     *
     * Generated from protobuf field <code>repeated uint32 elements = 5;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getElements()
    {
        return $this->elements;
    }

    /**
     *optional set of element indices (else, all by this id)
     *
     * Generated from protobuf field <code>repeated uint32 elements = 5;</code>
     * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setElements($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32);
        $this->elements = $arr;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string comments = 7;</code>
     * @return string
     */
    public function getComments()
    {
        return $this->comments;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string info = 8;</code>
     * @return string
     */
    public function getInfo()
    {
        return $this->info;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string resource_name = 9;</code>
     * @return string
     */
    public function getResourceName()
    {
        return $this->resource_name;
    }

    /**
     * Generated from protobuf field <code>string resource_name = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setResourceName($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_name = $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;
    }

    /**
     *in symbol icon's coordinates [0,1]
     *
     * Generated from protobuf field <code>repeated float terminal_coord = 11;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getTerminalCoord()
    {
        return $this->terminal_coord;
    }

    /**
     *in symbol icon's coordinates [0,1]
     *
     * Generated from protobuf field <code>repeated float terminal_coord = 11;</code>
     * @param float[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setTerminalCoord($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT);
        $this->terminal_coord = $arr;

        return $this;
    }

}

