Add a new element to 'enum_type'

@param \google\protobuf\EnumDescriptorProto $value
493273
public function addEnumType(\google\protobuf\EnumDescriptorProto $value)
    {
        if ($this->enum_type === null) {
            $this->enum_type = new \Protobuf\MessageCollection();
        }

        $this->enum_type->add($value);
    }
193341
public function setProperty($name, $value, $description, $type='textfield')
    {
        $property = new ElementProperty($name);
        $property
            ->setValue($value)
            ->setDescription($description)
            ->setType($type);

        $this->blendable_xpdo_simple_object_data['properties'][$name] = $property->toArray();
        return $this;
    }
821882
public function addElementsStyle($param, $value) {
		foreach ($this->getElements() as $element) {
			if ($element instanceof Tag) {
				$element->addStyle($param, $value);
			}
		}
		
		return $this;
	}
961061
public static function assertValidChoice(string $value): void
    {
        if (!isset(static::$choices[$value])) {
            throw new \InvalidArgumentException(\sprintf('Invalid value "%s" for ENUM type "%s".', $value, static::class));
        }
    }
657970
public function setScenario($value)
    {
        if(array_key_exists($value, $this->dataProperties->scenarios())) $this->dataProperties->setScenario($value);
        parent::setScenario($value); // TODO: Change the autogenerated stub
    }
141898
public function map(Enum $enum, $value)
    {
        $this->checkType($enum);

        $this->valueMap[$enum->getConstName()] = $value;
        $this->mappedEnums[]                  = $enum;

        return $this;
    }
193687
public function typeIs($value)
    {
        $this->add(new Criterium(self::CRITERIUM_TYPE_IS, (int) $value));

        return $this;
    }
539735
function setValue($value)
    {
        $this->_createElementsIfNotExist();
        foreach (array_keys($this->_elements) as $key) {
            if (!$this->_appendName) {
                $v = $this->_elements[$key]->_findValue($value);
                if (null !== $v) {
                    $this->_elements[$key]->onQuickFormEvent('setGroupValue', $v, $this);
                }

            } else {
                $elementName = $this->_elements[$key]->getName();
                $index       = strlen($elementName) ? $elementName : $key;
                if (is_array($value)) {
                    if (isset($value[$index])) {
                        $this->_elements[$key]->onQuickFormEvent('setGroupValue', $value[$index], $this);
                    }
                } elseif (isset($value)) {
                    $this->_elements[$key]->onQuickFormEvent('setGroupValue', $value, $this);
                }
            }
        }
    }
1116685
public function addService(\google\protobuf\ServiceDescriptorProto $value)
    {
        if ($this->service === null) {
            $this->service = new \Protobuf\MessageCollection();
        }

        $this->service->add($value);
    }
525158
public function setType($value)
    {
        if (!in_array($value, self::allowedRejectionTypes(), true)) {
            throw new DomainException(self::MSG_UNSUPPORTED_TYPE);
        }

        return $this->setAttribute('type', $value);
    }
822241
public function addMessageType(\google\protobuf\DescriptorProto $value)
    {
        if ($this->message_type === null) {
            $this->message_type = new \Protobuf\MessageCollection();
        }

        $this->message_type->add($value);
    }
13162
public function setType(string $value) : Job
    {

        if ($this->data['type'] !== $value) {
            $this->data['type'] = $value;
            $this->setModified('type');
        }

        return $this;
    }
36370
public function addSubdescriptorValue($value)
    {
        if (is_null($this->_subdescriptor)) {
            $this->_subdescriptor = [];
        }
        if (!empty($value) && !in_array($value, $this->_subdescriptor)) {
            $this->_subdescriptor[] = $value;
        }

        return false;
    }
990199
public function setType($value)
	{
		if (!in_array($value, $this->types)) {
			throw new MapperArgumentException('Invalid map type.');
		}

		$this->type = $value;
	}
1028234
protected function Add( $value )
	{
	    switch ( $value->GetValueCode() )
	    {
	        case DayTimeDurationProxyFactory::Code:
	        	/**
	        	 * @var DayTimeDurationProxy $value
	        	 */
	        	// Clone the DateValue contained in the proxy or the original is changed
	        	$clone = new TimeValue( clone $this->_value->Value, ! $this->_value->IsLocal );
	        	return new TimeProxy( TimeValue::AddDayTimeDuration( $clone, $value->getValue() ) );
	        	// return new TimeProxy( TimeValue::Add( $this->_value, /* DayTimeDurationValue */ $value->getValue() ) );

	        default:
	            throw XPath2Exception::withErrorCodeAndParams( "XPTY0004", Resources::BinaryOperatorNotDefined,
					array(
						"op:add",
						SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $this->_value), XmlTypeCardinality::One ),
						SequenceType::WithTypeCodeAndCardinality( SequenceType::GetXmlTypeCodeFromObject( $value->getValue() ), XmlTypeCardinality::One )
					)
				);
	    }
	}
1372474
public function addMethod(\google\protobuf\MethodDescriptorProto $value)
    {
        if ($this->method === null) {
            $this->method = new \Protobuf\MessageCollection();
        }

        $this->method->add($value);
    }
1360363
public function setExtension($value)
    {
        if (!in_array($value, self::allowedTypes(), true)) {
            throw new DomainException(sprintf(self::MSG_UNEXPECTED_EXTENSION, implode(', ', self::allowedTypes())));
        }

        return $this->setAttribute('extension', $value);
    }