code: public Variable createVariable(Object groupIdOrPath, String key, String value, Boolean isProtected) throws GitLabApiException {
  
          GitLabApiForm formData = new GitLabApiForm()
                  .withParam("key", key, true)
                  .withParam("value", value, true)
                  .withParam("protected", isProtected);
          Response response = post(Response.Status.CREATED, formData, "groups", getGroupIdOrPath(groupIdOrPath), "variables");
          return (response.readEntity(Variable.class));
      }
docs: Create a new group variable.
  
  <pre><code>GitLab Endpoint: POST /groups/:id/variables</code></pre>
  
  @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required
  @param key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, required
  @param value the value for the variable, required
  @param isProtected whether the variable is protected, optional
  @return a Variable instance with the newly created variable
  @throws GitLabApiException if any exception occurs during execution