|
2 | 2 | package org.gitlab4j.api.models;
|
3 | 3 |
|
4 | 4 | import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
| 5 | + |
| 6 | +import org.gitlab4j.api.Constants.DefaultBranchProtectionLevel; |
| 7 | +import org.gitlab4j.api.Constants.ProjectCreationLevel; |
| 8 | +import org.gitlab4j.api.Constants.SubgroupCreationLevel; |
5 | 9 | import org.gitlab4j.api.utils.JacksonJson;
|
6 | 10 |
|
7 | 11 | import java.util.Date;
|
@@ -63,6 +67,11 @@ public void setJobArtifactsSize(Long jobArtifactsSize) {
|
63 | 67 | private Date createdAt;
|
64 | 68 | private List<SharedGroup> sharedWithGroups;
|
65 | 69 | private String runnersToken;
|
| 70 | + private Boolean preventSharingGroupsOutsideHierarchy; |
| 71 | + private Boolean preventForkingOutsideGroup; |
| 72 | + private ProjectCreationLevel projectCreationLevel; |
| 73 | + private SubgroupCreationLevel subgroupCreationLevel; |
| 74 | + private DefaultBranchProtectionLevel defaultBranchProtection; |
66 | 75 |
|
67 | 76 | @JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
|
68 | 77 | private Date markedForDeletionOn;
|
@@ -179,6 +188,46 @@ public void setRunnersToken(String runnersToken) {
|
179 | 188 | this.runnersToken = runnersToken;
|
180 | 189 | }
|
181 | 190 |
|
| 191 | + public Boolean getPreventSharingGroupsOutsideHierarchy() { |
| 192 | + return preventSharingGroupsOutsideHierarchy; |
| 193 | + } |
| 194 | + |
| 195 | + public void setPreventSharingGroupsOutsideHierarchy(Boolean preventSharingGroupsOutsideHierarchy) { |
| 196 | + this.preventSharingGroupsOutsideHierarchy = preventSharingGroupsOutsideHierarchy; |
| 197 | + } |
| 198 | + |
| 199 | + public Boolean getPreventForkingOutsideGroup() { |
| 200 | + return preventForkingOutsideGroup; |
| 201 | + } |
| 202 | + |
| 203 | + public void setPreventForkingOutsideGroup(Boolean preventForkingOutsideGroup) { |
| 204 | + this.preventForkingOutsideGroup = preventForkingOutsideGroup; |
| 205 | + } |
| 206 | + |
| 207 | + public ProjectCreationLevel getProjectCreationLevel() { |
| 208 | + return this.projectCreationLevel; |
| 209 | + } |
| 210 | + |
| 211 | + public void setProjectCreationLevel(ProjectCreationLevel projectCreationLevel) { |
| 212 | + this.projectCreationLevel = projectCreationLevel; |
| 213 | + } |
| 214 | + |
| 215 | + public SubgroupCreationLevel getSubgroupCreationLevel() { |
| 216 | + return this.subgroupCreationLevel; |
| 217 | + } |
| 218 | + |
| 219 | + public void setSubgroupCreationLevel(SubgroupCreationLevel subgroupCreationLevel) { |
| 220 | + this.subgroupCreationLevel = subgroupCreationLevel; |
| 221 | + } |
| 222 | + |
| 223 | + public DefaultBranchProtectionLevel getDefaultBranchProtection() { |
| 224 | + return this.defaultBranchProtection; |
| 225 | + } |
| 226 | + |
| 227 | + public void setDefaultBranchProtection(DefaultBranchProtectionLevel defaultBranchProtection) { |
| 228 | + this.defaultBranchProtection = defaultBranchProtection; |
| 229 | + } |
| 230 | + |
182 | 231 | public Group withPath(String path) {
|
183 | 232 | this.path = path;
|
184 | 233 | return this;
|
@@ -229,6 +278,31 @@ public Group withSharedProjects(List<Project> sharedProjects) {
|
229 | 278 | return this;
|
230 | 279 | }
|
231 | 280 |
|
| 281 | + public Group withPreventSharingGroupsOutsideHierarchy(Boolean preventSharingGroupsOutsideHierarchy) { |
| 282 | + this.preventSharingGroupsOutsideHierarchy = preventSharingGroupsOutsideHierarchy; |
| 283 | + return this; |
| 284 | + } |
| 285 | + |
| 286 | + public Group withPreventForkingOutsideGroup(Boolean preventForkingOutsideGroup) { |
| 287 | + this.preventForkingOutsideGroup = preventForkingOutsideGroup; |
| 288 | + return this; |
| 289 | + } |
| 290 | + |
| 291 | + public Group withProjectCreationLevel(ProjectCreationLevel projectCreationLevel) { |
| 292 | + this.projectCreationLevel = projectCreationLevel; |
| 293 | + return this; |
| 294 | + } |
| 295 | + |
| 296 | + public Group withSubgroupCreationLevel(SubgroupCreationLevel subgroupCreationLevel) { |
| 297 | + this.subgroupCreationLevel = subgroupCreationLevel; |
| 298 | + return this; |
| 299 | + } |
| 300 | + |
| 301 | + public Group withDefaultBranchProtection(DefaultBranchProtectionLevel defaultBranchProtection) { |
| 302 | + this.defaultBranchProtection = defaultBranchProtection; |
| 303 | + return this; |
| 304 | + } |
| 305 | + |
232 | 306 | @Override
|
233 | 307 | public String toString() {
|
234 | 308 | return (JacksonJson.toJsonString(this));
|
|
0 commit comments