org.gitlab4j.api.models.ProtectedBranch 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.utils.JacksonJson;
public class ProtectedBranch {
private Long id;
private String name;
private List pushAccessLevels;
private List mergeAccessLevels;
private List unprotectAccessLevels;
private Boolean codeOwnerApprovalRequired;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public List getPushAccessLevels() {
return this.pushAccessLevels;
}
public void setPushAccessLevels(List pushAccessLevels) {
this.pushAccessLevels = pushAccessLevels;
}
public List getMergeAccessLevels() {
return this.mergeAccessLevels;
}
public void setMergeAccessLevels(List mergeAccessLevels) {
this.mergeAccessLevels = mergeAccessLevels;
}
public List getUnprotectAccessLevels() {
return unprotectAccessLevels;
}
public void setUnprotectAccessLevels(List unprotectAccessLevels) {
this.unprotectAccessLevels = unprotectAccessLevels;
}
public static final boolean isValid(ProtectedBranch branch) {
return (branch != null && branch.getName() != null);
}
public ProtectedBranch withName(String name) {
this.name = name;
return this;
}
public ProtectedBranch withPushAccessLevels(List pushAccessLevels) {
this.pushAccessLevels = pushAccessLevels;
return this;
}
public ProtectedBranch withMergeAccessLevels(List mergeAccessLevels) {
this.mergeAccessLevels = mergeAccessLevels;
return this;
}
public Boolean getCodeOwnerApprovalRequired() {
return codeOwnerApprovalRequired;
}
public void setCodeOwnerApprovalRequired(Boolean codeOwnerApprovalRequired) {
this.codeOwnerApprovalRequired = codeOwnerApprovalRequired;
}
public ProtectedBranch withCodeOwnerApprovalRequired(Boolean codeOwnerApprovalRequired) {
this.codeOwnerApprovalRequired = codeOwnerApprovalRequired;
return this;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}