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 String name;
private List pushAccessLevels;
private List mergeAccessLevels;
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 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;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}