Unverified Commit f2fe6932 authored by Jérémie Bresson's avatar Jérémie Bresson Committed by GitHub
Browse files

Add "sharedWithGroups" to Group (#1057)

Fixes https://github.com/gitlab4j/gitlab4j-api/issues/1053
parent 5890189f
......@@ -60,6 +60,7 @@ public class Group extends AbstractGroup<Group> {
private List<Project> projects;
private List<Project> sharedProjects;
private Date createdAt;
private List<SharedGroup> sharedWithGroups;
private String runnersToken;
@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
......@@ -161,6 +162,14 @@ public class Group extends AbstractGroup<Group> {
this.createdAt = createdAt;
}
public List<SharedGroup> getSharedWithGroups() {
return sharedWithGroups;
}
public void setSharedWithGroups(List<SharedGroup> sharedWithGroups) {
this.sharedWithGroups = sharedWithGroups;
}
public String getRunnersToken() {
return runnersToken;
}
......
package org.gitlab4j.api.models;
import org.gitlab4j.api.utils.JacksonJson;
public class ProjectSharedGroup {
private Long groupId;
private String groupName;
private String groupFullPath;
private AccessLevel groupAccessLevel;
public long getGroupId() {
return groupId;
}
public void setGroupId(long groupId) {
this.groupId = groupId;
}
public String getGroupName() {
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName;
}
public AccessLevel getGroupAccessLevel() {
return (groupAccessLevel);
}
public void setGroupAccessLevel(AccessLevel accessLevel) {
this.groupAccessLevel = accessLevel;
}
public String getGroupFullPath() {
return groupFullPath;
}
public void setGroupFullPath(String groupFullPath) {
this.groupFullPath = groupFullPath;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
/**
* @deprecated use {@link SharedGroup} instead
*/
@Deprecated
public class ProjectSharedGroup extends SharedGroup {
}
package org.gitlab4j.api.models;
import java.util.Date;
import org.gitlab4j.api.utils.JacksonJson;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
public class SharedGroup {
private Long groupId;
private String groupName;
private String groupFullPath;
private AccessLevel groupAccessLevel;
@JsonSerialize(using = JacksonJson.DateOnlySerializer.class)
private Date expiresAt;
public long getGroupId() {
return groupId;
}
public void setGroupId(long groupId) {
this.groupId = groupId;
}
public String getGroupName() {
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName;
}
public AccessLevel getGroupAccessLevel() {
return (groupAccessLevel);
}
public void setGroupAccessLevel(AccessLevel accessLevel) {
this.groupAccessLevel = accessLevel;
}
public String getGroupFullPath() {
return groupFullPath;
}
public void setGroupFullPath(String groupFullPath) {
this.groupFullPath = groupFullPath;
}
public Date getExpiresAt() {
return expiresAt;
}
public void setExpiresAt(Date expiresAt) {
this.expiresAt = expiresAt;
}
@Override
public String toString() {
return (JacksonJson.toJsonString(this));
}
}
......@@ -17,6 +17,16 @@
"lfs_objects_size" : 123,
"job_artifacts_size" : 57
},
"shared_with_groups": [
{
"group_id": 104,
"group_name": "A Group",
"group_full_path": "a-group",
"group_access_level": 10,
"expires_at": "2023-11-19"
}
],
"runners_token": "GRnEE2mDc13489411jmS2d5R1XTfM",
"projects": [
{
"id": 7,
......
......@@ -73,13 +73,15 @@
"group_id": 4,
"group_name": "Twitter",
"group_full_path": "twitter",
"group_access_level": 30
"group_access_level": 30,
"expires_at": "2023-11-19"
},
{
"group_id": 3,
"group_name": "Gitlab Org",
"group_full_path": "gitlab-org",
"group_access_level": 10
"group_access_level": 10,
"expires_at": "2023-11-19"
}
],
"repository_storage": "default",
......
Supports Markdown
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