<?php
 
 
 

namespace Google\Protobuf\Internal;

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






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


    protected $name = null;
    


    private $field;
    


    private $extension;
    


    private $nested_type;
    


    private $enum_type;
    


    private $extension_range;
    


    private $oneof_decl;
    


    protected $options = null;
    


    private $reserved_range;
    





    private $reserved_name;
    




    protected $visibility = null;

    





















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

    



    public function getName()
    {
        return isset($this->name) ? $this->name : '';
    }

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

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

    




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

        return $this;
    }

    



    public function getField()
    {
        return $this->field;
    }

    




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

        return $this;
    }

    



    public function getExtension()
    {
        return $this->extension;
    }

    




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

        return $this;
    }

    



    public function getNestedType()
    {
        return $this->nested_type;
    }

    




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

        return $this;
    }

    



    public function getEnumType()
    {
        return $this->enum_type;
    }

    




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

        return $this;
    }

    



    public function getExtensionRange()
    {
        return $this->extension_range;
    }

    




    public function setExtensionRange($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto\ExtensionRange::class);
        $this->extension_range = $arr;

        return $this;
    }

    



    public function getOneofDecl()
    {
        return $this->oneof_decl;
    }

    




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

        return $this;
    }

    



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

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

    public function clearOptions()
    {
        unset($this->options);
    }

    




    public function setOptions($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Internal\MessageOptions::class);
        $this->options = $var;

        return $this;
    }

    



    public function getReservedRange()
    {
        return $this->reserved_range;
    }

    




    public function setReservedRange($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Internal\DescriptorProto\ReservedRange::class);
        $this->reserved_range = $arr;

        return $this;
    }

    






    public function getReservedName()
    {
        return $this->reserved_name;
    }

    







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

        return $this;
    }

    





    public function getVisibility()
    {
        return isset($this->visibility) ? $this->visibility : 0;
    }

    public function hasVisibility()
    {
        return isset($this->visibility);
    }

    public function clearVisibility()
    {
        unset($this->visibility);
    }

    






    public function setVisibility($var)
    {
        GPBUtil::checkEnum($var, \Google\Protobuf\Internal\SymbolVisibility::class);
        $this->visibility = $var;

        return $this;
    }

}

