Commit 36e858e3 authored by Brian Krische's avatar Brian Krische Committed by Tim Olshansky

Add support for projects shared with a group. (#185)

parent efd607fe
...@@ -2,6 +2,8 @@ package org.gitlab.api.models; ...@@ -2,6 +2,8 @@ package org.gitlab.api.models;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
public class GitlabGroup { public class GitlabGroup {
public static final String URL = "/groups"; public static final String URL = "/groups";
...@@ -16,6 +18,9 @@ public class GitlabGroup { ...@@ -16,6 +18,9 @@ public class GitlabGroup {
@JsonProperty("ldap_access") @JsonProperty("ldap_access")
private Integer ldapAccess; private Integer ldapAccess;
@JsonProperty("shared_projects")
private List<GitlabProject> sharedProjects;
public Integer getId() { public Integer getId() {
return id; return id;
} }
...@@ -60,4 +65,12 @@ public class GitlabGroup { ...@@ -60,4 +65,12 @@ public class GitlabGroup {
this.ldapAccess = ldapGitlabAccessLevel.accessValue; this.ldapAccess = ldapGitlabAccessLevel.accessValue;
} }
} }
public List<GitlabProject> getSharedProjects() {
return sharedProjects;
}
public void setSharedProjects(List<GitlabProject> sharedProjects) {
this.sharedProjects = sharedProjects;
}
} }
...@@ -95,6 +95,9 @@ public class GitlabProject { ...@@ -95,6 +95,9 @@ public class GitlabProject {
@JsonProperty("tag_list") @JsonProperty("tag_list")
private List<String> tagList; private List<String> tagList;
@JsonProperty("shared_with_groups")
private List<GitlabProjectSharedGroup> sharedWithGroups;
public Integer getId() { public Integer getId() {
return id; return id;
} }
...@@ -350,4 +353,12 @@ public class GitlabProject { ...@@ -350,4 +353,12 @@ public class GitlabProject {
public void setTagList(List<String> tagList) { public void setTagList(List<String> tagList) {
this.tagList = tagList; this.tagList = tagList;
} }
public List<GitlabProjectSharedGroup> getSharedWithGroups() {
return sharedWithGroups;
}
public void setSharedWithGroups(List<GitlabProjectSharedGroup> sharedWithGroups) {
this.sharedWithGroups = sharedWithGroups;
}
} }
package org.gitlab.api.models;
import com.fasterxml.jackson.annotation.JsonProperty;
public class GitlabProjectSharedGroup {
@JsonProperty("group_id")
private int groupId;
@JsonProperty("group_name")
private String groupName;
@JsonProperty("group_access_level")
private int groupAccessLevel;
public int getGroupId() {
return groupId;
}
public void setGroupId(int groupId) {
this.groupId = groupId;
}
public String getGroupName() {
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName;
}
public GitlabAccessLevel getAccessLevel() {
return GitlabAccessLevel.fromAccessValue(groupAccessLevel);
}
public void setAccessLevel(GitlabAccessLevel accessLevel) {
this.groupAccessLevel = accessLevel.accessValue;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment