|
| 1 | +package me.chanjar.weixin.cp.bean.oa.wedrive; |
| 2 | + |
| 3 | +import com.google.gson.annotations.SerializedName; |
| 4 | +import lombok.Data; |
| 5 | +import lombok.Getter; |
| 6 | +import lombok.Setter; |
| 7 | +import me.chanjar.weixin.cp.bean.WxCpBaseResp; |
| 8 | +import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder; |
| 9 | + |
| 10 | +import java.io.Serializable; |
| 11 | +import java.util.List; |
| 12 | + |
| 13 | +/** |
| 14 | + * 获取空间信息. |
| 15 | + * |
| 16 | + * @author Wang_Wong |
| 17 | + */ |
| 18 | +@Data |
| 19 | +public class WxCpSpaceInfo extends WxCpBaseResp implements Serializable { |
| 20 | + private static final long serialVersionUID = -5028321625142879581L; |
| 21 | + |
| 22 | + @SerializedName("space_info") |
| 23 | + private SpaceInfo spaceInfo; |
| 24 | + |
| 25 | + @Getter |
| 26 | + @Setter |
| 27 | + public static class SpaceInfo implements Serializable { |
| 28 | + private static final long serialVersionUID = -4960239393895754598L; |
| 29 | + |
| 30 | + @SerializedName("spaceid") |
| 31 | + private String spaceId; |
| 32 | + |
| 33 | + @SerializedName("space_name") |
| 34 | + private String spaceName; |
| 35 | + |
| 36 | + @SerializedName("auth_list") |
| 37 | + private AuthList authList; |
| 38 | + |
| 39 | + public static SpaceInfo fromJson(String json) { |
| 40 | + return WxCpGsonBuilder.create().fromJson(json, SpaceInfo.class); |
| 41 | + } |
| 42 | + |
| 43 | + public String toJson() { |
| 44 | + return WxCpGsonBuilder.create().toJson(this); |
| 45 | + } |
| 46 | + |
| 47 | + } |
| 48 | + |
| 49 | + @Getter |
| 50 | + @Setter |
| 51 | + public static class AuthList implements Serializable { |
| 52 | + private static final long serialVersionUID = -4960239393895754598L; |
| 53 | + |
| 54 | + @SerializedName("auth_info") |
| 55 | + private List<AuthInfo> authInfo; |
| 56 | + |
| 57 | + @SerializedName("quit_userid") |
| 58 | + private List<String> quitUserId; |
| 59 | + |
| 60 | + public static AuthList fromJson(String json) { |
| 61 | + return WxCpGsonBuilder.create().fromJson(json, AuthList.class); |
| 62 | + } |
| 63 | + |
| 64 | + public String toJson() { |
| 65 | + return WxCpGsonBuilder.create().toJson(this); |
| 66 | + } |
| 67 | + |
| 68 | + } |
| 69 | + |
| 70 | + @Getter |
| 71 | + @Setter |
| 72 | + public static class AuthInfo implements Serializable { |
| 73 | + private static final long serialVersionUID = -4960239393895754598L; |
| 74 | + |
| 75 | + @SerializedName("type") |
| 76 | + private Integer type; |
| 77 | + |
| 78 | + @SerializedName("departmentid") |
| 79 | + private Integer departmentId; |
| 80 | + |
| 81 | + @SerializedName("auth") |
| 82 | + private Integer auth; |
| 83 | + |
| 84 | + @SerializedName("userid") |
| 85 | + private String userId; |
| 86 | + |
| 87 | + public static AuthInfo fromJson(String json) { |
| 88 | + return WxCpGsonBuilder.create().fromJson(json, AuthInfo.class); |
| 89 | + } |
| 90 | + |
| 91 | + public String toJson() { |
| 92 | + return WxCpGsonBuilder.create().toJson(this); |
| 93 | + } |
| 94 | + |
| 95 | + } |
| 96 | + |
| 97 | + public static WxCpSpaceInfo fromJson(String json) { |
| 98 | + return WxCpGsonBuilder.create().fromJson(json, WxCpSpaceInfo.class); |
| 99 | + } |
| 100 | + |
| 101 | + public String toJson() { |
| 102 | + return WxCpGsonBuilder.create().toJson(this); |
| 103 | + } |
| 104 | + |
| 105 | +} |
0 commit comments