|
| 1 | +package me.chanjar.weixin.cp.bean.article; |
| 2 | + |
| 3 | +/** |
| 4 | + * <pre> |
| 5 | + * Created by BinaryWang on 2017/3/27. |
| 6 | + * </pre> |
| 7 | + * @author Binary Wang |
| 8 | + */ |
| 9 | +public class MpnewsArticle { |
| 10 | + private String title; |
| 11 | + private String thumbMediaId; |
| 12 | + private String author; |
| 13 | + private String contentSourceUrl; |
| 14 | + private String content; |
| 15 | + private String digest; |
| 16 | + private String showCoverPic; |
| 17 | + |
| 18 | + private MpnewsArticle(Builder builder) { |
| 19 | + setTitle(builder.title); |
| 20 | + setThumbMediaId(builder.thumbMediaId); |
| 21 | + setAuthor(builder.author); |
| 22 | + setContentSourceUrl(builder.contentSourceUrl); |
| 23 | + setContent(builder.content); |
| 24 | + setDigest(builder.digest); |
| 25 | + setShowCoverPic(builder.showCoverPic); |
| 26 | + } |
| 27 | + |
| 28 | + public static Builder newBuilder() { |
| 29 | + return new Builder(); |
| 30 | + } |
| 31 | + |
| 32 | + public String getTitle() { |
| 33 | + return title; |
| 34 | + } |
| 35 | + |
| 36 | + public void setTitle(String title) { |
| 37 | + this.title = title; |
| 38 | + } |
| 39 | + |
| 40 | + public String getThumbMediaId() { |
| 41 | + return thumbMediaId; |
| 42 | + } |
| 43 | + |
| 44 | + public void setThumbMediaId(String thumbMediaId) { |
| 45 | + this.thumbMediaId = thumbMediaId; |
| 46 | + } |
| 47 | + |
| 48 | + public String getAuthor() { |
| 49 | + return author; |
| 50 | + } |
| 51 | + |
| 52 | + public void setAuthor(String author) { |
| 53 | + this.author = author; |
| 54 | + } |
| 55 | + |
| 56 | + public String getContentSourceUrl() { |
| 57 | + return contentSourceUrl; |
| 58 | + } |
| 59 | + |
| 60 | + public void setContentSourceUrl(String contentSourceUrl) { |
| 61 | + this.contentSourceUrl = contentSourceUrl; |
| 62 | + } |
| 63 | + |
| 64 | + public String getContent() { |
| 65 | + return content; |
| 66 | + } |
| 67 | + |
| 68 | + public void setContent(String content) { |
| 69 | + this.content = content; |
| 70 | + } |
| 71 | + |
| 72 | + public String getDigest() { |
| 73 | + return digest; |
| 74 | + } |
| 75 | + |
| 76 | + public void setDigest(String digest) { |
| 77 | + this.digest = digest; |
| 78 | + } |
| 79 | + |
| 80 | + public String getShowCoverPic() { |
| 81 | + return showCoverPic; |
| 82 | + } |
| 83 | + |
| 84 | + public void setShowCoverPic(String showCoverPic) { |
| 85 | + this.showCoverPic = showCoverPic; |
| 86 | + } |
| 87 | + |
| 88 | + public static final class Builder { |
| 89 | + private String title; |
| 90 | + private String thumbMediaId; |
| 91 | + private String author; |
| 92 | + private String contentSourceUrl; |
| 93 | + private String content; |
| 94 | + private String digest; |
| 95 | + private String showCoverPic; |
| 96 | + |
| 97 | + private Builder() { |
| 98 | + } |
| 99 | + |
| 100 | + public Builder title(String title) { |
| 101 | + this.title = title; |
| 102 | + return this; |
| 103 | + } |
| 104 | + |
| 105 | + public Builder thumbMediaId(String thumbMediaId) { |
| 106 | + this.thumbMediaId = thumbMediaId; |
| 107 | + return this; |
| 108 | + } |
| 109 | + |
| 110 | + public Builder author(String author) { |
| 111 | + this.author = author; |
| 112 | + return this; |
| 113 | + } |
| 114 | + |
| 115 | + public Builder contentSourceUrl(String contentSourceUrl) { |
| 116 | + this.contentSourceUrl = contentSourceUrl; |
| 117 | + return this; |
| 118 | + } |
| 119 | + |
| 120 | + public Builder content(String content) { |
| 121 | + this.content = content; |
| 122 | + return this; |
| 123 | + } |
| 124 | + |
| 125 | + public Builder digest(String digest) { |
| 126 | + this.digest = digest; |
| 127 | + return this; |
| 128 | + } |
| 129 | + |
| 130 | + public Builder showCoverPic(String showCoverPic) { |
| 131 | + this.showCoverPic = showCoverPic; |
| 132 | + return this; |
| 133 | + } |
| 134 | + |
| 135 | + public MpnewsArticle build() { |
| 136 | + return new MpnewsArticle(this); |
| 137 | + } |
| 138 | + } |
| 139 | +} |
0 commit comments