Added information about function params in builtin proto file.

RELNOTES: None
PiperOrigin-RevId: 212796678
diff --git a/src/main/java/com/google/devtools/build/docgen/RuleDocumentationAttribute.java b/src/main/java/com/google/devtools/build/docgen/RuleDocumentationAttribute.java
index 5f543f9..cac1303 100644
--- a/src/main/java/com/google/devtools/build/docgen/RuleDocumentationAttribute.java
+++ b/src/main/java/com/google/devtools/build/docgen/RuleDocumentationAttribute.java
@@ -147,6 +147,14 @@
     return expandedHtmlDoc;
   }
 
+  /** Returns whether the param is required or optional. */
+  public boolean isMandatory() {
+    if (attribute == null) {
+      return false;
+    }
+    return attribute.isMandatory();
+  }
+
   private String getDefaultValue() {
     if (attribute == null) {
       return "";