org.gitlab4j.api.models.ApprovalRuleParams Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gitlab4j-api Show documentation
Show all versions of gitlab4j-api Show documentation
GitLab4J-API (gitlab4j-api) provides a full featured Java client library for working with GitLab repositories and servers via the GitLab REST API.
package org.gitlab4j.api.models;
import java.util.List;
import org.gitlab4j.api.GitLabApiForm;
public class ApprovalRuleParams {
private String name;
private Integer approvalsRequired;
private List userIds;
private List groupIds;
public ApprovalRuleParams withName(String name) {
this.name = name;
return (this);
}
public ApprovalRuleParams withApprovalsRequired(Integer approvalsRequired) {
this.approvalsRequired = approvalsRequired;
return (this);
}
public ApprovalRuleParams withUserIds(List userIds) {
this.userIds = userIds;
return (this);
}
public ApprovalRuleParams withGroupIds(List groupIds) {
this.groupIds = groupIds;
return (this);
}
/**
* Get the form params specified by this instance.
*
* @return a GitLabApiForm instance holding the form parameters for this ApprovalRuleParams instance
*/
public GitLabApiForm getForm() {
return new GitLabApiForm()
.withParam("name", name)
.withParam("approvals_required", approvalsRequired, true)
.withParam("user_ids", userIds)
.withParam("group_ids", groupIds);
}
}