forked from binarywang/WxJava
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWxCpUserExternalContactInfo.java
144 lines (117 loc) · 3.08 KB
/
WxCpUserExternalContactInfo.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
package me.chanjar.weixin.cp.bean;
import com.google.gson.annotations.SerializedName;
import lombok.*;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.util.List;
/**
* <pre>
* 外部联系人详情
* Created by Binary Wang on 2018/9/16.
* 参考文档:https://work.weixin.qq.com/api/doc#13878
* </pre>
*
* @author <a href="https://github.com/binarywang">Binary Wang</a>
*/
@Getter
@Setter
public class WxCpUserExternalContactInfo {
@SerializedName("external_contact")
private ExternalContact externalContact;
@SerializedName("follow_user")
private List<FollowedUser> followedUsers;
@Getter
@Setter
public static class ExternalContact {
@SerializedName("external_userid")
private String externalUserId;
@SerializedName("position")
private String position;
@SerializedName("name")
private String name;
@SerializedName("avatar")
private String avatar;
@SerializedName("corp_name")
private String corpName;
@SerializedName("corp_full_name")
private String corpFullName;
@SerializedName("type")
private Integer type;
@SerializedName("gender")
private Integer gender;
@SerializedName("unionid")
private String unionId;
@SerializedName("external_profile")
private ExternalProfile externalProfile;
}
@Setter
@Getter
public static class ExternalProfile {
@SerializedName("external_attr")
private List<ExternalAttribute> externalAttrs;
}
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class ExternalAttribute {
@Setter
@Getter
public static class Text {
private String value;
}
@Setter
@Getter
public static class Web {
private String title;
private String url;
}
@Setter
@Getter
public static class MiniProgram {
@SerializedName("pagepath")
private String pagePath;
private String appid;
private String title;
}
private int type;
private String name;
private Text text;
private Web web;
@SerializedName("miniprogram")
private MiniProgram miniProgram;
}
@Setter
@Getter
public static class FollowedUser {
@SerializedName("userid")
private String userId;
private String remark;
private String description;
@SerializedName("createtime")
private Long createTime;
private String state;
@SerializedName("remark_company")
private String remarkCompany;
@SerializedName("remark_mobiles")
private String[] remarkMobiles;
private Tag[] tags;
@SerializedName("remark_corp_name")
private String remarkCorpName;
@SerializedName("add_way")
private String addWay;
@SerializedName("oper_userid")
private String operUserId;
}
public static WxCpUserExternalContactInfo fromJson(String json) {
return WxCpGsonBuilder.create().fromJson(json, WxCpUserExternalContactInfo.class);
}
@Setter
@Getter
public static class Tag {
@SerializedName("group_name")
private String groupName;
@SerializedName("tag_name")
private String tagName;
private int type;
}
}