All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.chanjar.weixin.mp.bean.menu.WxMpSelfMenuInfo Maven / Gradle / Ivy

There is a newer version: 4.7.1.B
Show newest version
package me.chanjar.weixin.mp.bean.menu;

import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.ToStringUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 * Created by Binary Wang on 2016-11-25.
 * @author binarywang(Binary Wang)
 * 
*/ public class WxMpSelfMenuInfo { /** * 菜单按钮 */ @SerializedName("button") private List buttons; @Override public String toString() { return ToStringUtils.toSimpleString(this); } public static class WxMpSelfMenuButton { /** *
     * 菜单的类型,公众平台官网上能够设置的菜单类型有view(跳转网页)、text(返回文本,下同)、img、photo、video、voice。
     * 使用API设置的则有8种,详见《自定义菜单创建接口》
     * 
*/ @SerializedName("type") private String type; /** * 菜单名称 */ @SerializedName("name") private String name; /** *
     * 对于不同的菜单类型,value的值意义不同。
     * 官网上设置的自定义菜单:
     *  
  • Text:保存文字到value; *
  • Img、voice:保存mediaID到value; *
  • Video:保存视频下载链接到value; *
  • News:保存图文消息到news_info,同时保存mediaID到value; *
  • View:保存链接到url。
  • * * 使用API设置的自定义菜单: *
  • click、scancode_push、scancode_waitmsg、pic_sysphoto、pic_photo_or_album、 pic_weixin、location_select:保存值到key; *
  • view:保存链接到url *
  • */ @SerializedName("key") private String key; /** * @see #key */ @SerializedName("url") private String url; /** * @see #key */ @SerializedName("value") private String value; /** * 子菜单信息 */ @SerializedName("sub_button") private SubButtons subButtons; /** * 图文消息的信息 */ @SerializedName("news_info") private NewsInfo newsInfo; @Override public String toString() { return ToStringUtils.toSimpleString(this); } public SubButtons getSubButtons() { return subButtons; } public void setSubButtons(SubButtons subButtons) { this.subButtons = subButtons; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public NewsInfo getNewsInfo() { return newsInfo; } public void setNewsInfo(NewsInfo newsInfo) { this.newsInfo = newsInfo; } public static class SubButtons { @SerializedName("list") private List subButtons = new ArrayList<>(); @Override public String toString() { return ToStringUtils.toSimpleString(this); } public List getSubButtons() { return subButtons; } public void setSubButtons(List subButtons) { this.subButtons = subButtons; } } public static class NewsInfo { @SerializedName("list") private List news = new ArrayList<>(); @Override public String toString() { return ToStringUtils.toSimpleString(this); } public List getNews() { return news; } public void setNews(List news) { this.news = news; } public static class NewsInButton { /** * 图文消息的标题 */ @SerializedName("title") private String title; /** * 摘要 */ @SerializedName("digest") private String digest; /** * 作者 */ @SerializedName("author") private String author; /** * show_cover * 是否显示封面,0为不显示,1为显示 */ @SerializedName("show_cover") private Integer showCover; /** * 封面图片的URL */ @SerializedName("cover_url") private String coverUrl; /** * 正文的URL */ @SerializedName("content_url") private String contentUrl; /** * 原文的URL,若置空则无查看原文入口 */ @SerializedName("source_url") private String sourceUrl; @Override public String toString() { return ToStringUtils.toSimpleString(this); } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDigest() { return digest; } public void setDigest(String digest) { this.digest = digest; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public Integer getShowCover() { return showCover; } public void setShowCover(Integer showCover) { this.showCover = showCover; } public String getCoverUrl() { return coverUrl; } public void setCoverUrl(String coverUrl) { this.coverUrl = coverUrl; } public String getContentUrl() { return contentUrl; } public void setContentUrl(String contentUrl) { this.contentUrl = contentUrl; } public String getSourceUrl() { return sourceUrl; } public void setSourceUrl(String sourceUrl) { this.sourceUrl = sourceUrl; } } } } }




    © 2015 - 2025 Weber Informatics LLC | Privacy Policy