internal_desc = $internal_desc; } /** * @return string The name of the oneof */ public function getName() { return $this->internal_desc->getName(); } /** * @param int $index Must be >= 0 and < getFieldCount() * @return FieldDescriptor */ public function getField($index) { return $this->getPublicDescriptor($this->internal_desc->getFields()[$index]); } /** * @return int Number of fields in the oneof */ public function getFieldCount() { return count($this->internal_desc->getFields()); } }