1 package com.foxinmy.weixin4j.message;
2
3 import javax.xml.bind.annotation.XmlElement;
4
5 import com.foxinmy.weixin4j.request.WeixinMessage;
6 import com.foxinmy.weixin4j.type.MessageType;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 public class VoiceMessage extends WeixinMessage {
24
25 private static final long serialVersionUID = -7988380977182214003L;
26
27 public VoiceMessage() {
28 super(MessageType.voice.name());
29 }
30
31
32
33
34 @XmlElement(name = "MediaId")
35 private String mediaId;
36
37
38
39 @XmlElement(name = "Format")
40 private String format;
41
42
43
44 @XmlElement(name = "Recognition")
45 private String recognition;
46
47 public String getRecognition() {
48 return recognition;
49 }
50
51 public String getMediaId() {
52 return mediaId;
53 }
54
55 public String getFormat() {
56 return format;
57 }
58
59 @Override
60 public String toString() {
61 return "VoiceMessage [mediaId=" + mediaId + ", format=" + format
62 + ", recognition=" + recognition + ", " + super.toString()
63 + "]";
64 }
65 }