/**
* Obtain the rule for the given field (repeated, optional, required).
*
* @param \google\protobuf\FieldDescriptorProto $field
*
* @return string
*/
protected function getFieldLabelName(FieldDescriptorProto $field)
{
$label = $field->getLabel()->value();
$name = Field::getLabelName($label);
return $name ?: 'unknown';
}