<?php
 
 
 

namespace Google\Protobuf;

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






class Type extends \Google\Protobuf\Internal\Message
{
    




    protected $name = '';
    




    private $fields;
    




    private $oneofs;
    




    private $options;
    




    protected $source_context = null;
    




    protected $syntax = 0;
    




    protected $edition = '';

    





















    public function __construct($data = NULL) {
        \GPBMetadata\Google\Protobuf\Type::initOnce();
        parent::__construct($data);
    }

    





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

    






    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    





    public function getFields()
    {
        return $this->fields;
    }

    






    public function setFields($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Field::class);
        $this->fields = $arr;

        return $this;
    }

    





    public function getOneofs()
    {
        return $this->oneofs;
    }

    






    public function setOneofs($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->oneofs = $arr;

        return $this;
    }

    





    public function getOptions()
    {
        return $this->options;
    }

    






    public function setOptions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Option::class);
        $this->options = $arr;

        return $this;
    }

    





    public function getSourceContext()
    {
        return $this->source_context;
    }

    public function hasSourceContext()
    {
        return isset($this->source_context);
    }

    public function clearSourceContext()
    {
        unset($this->source_context);
    }

    






    public function setSourceContext($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\SourceContext::class);
        $this->source_context = $var;

        return $this;
    }

    





    public function getSyntax()
    {
        return $this->syntax;
    }

    






    public function setSyntax($var)
    {
        GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
        $this->syntax = $var;

        return $this;
    }

    





    public function getEdition()
    {
        return $this->edition;
    }

    






    public function setEdition($var)
    {
        GPBUtil::checkString($var, True);
        $this->edition = $var;

        return $this;
    }

}

